jira-spaces

GitHub

通过 Confluence Cloud REST API 管理项目文档空间,支持创建、列出和删除空间,适用于搭建新项目文档结构或维护知识库内容区域。

data/skills-md/01000001-01001110/agent-jira-skills/jira-spaces/SKILL.md NeverSight/learn-skills.dev

Trigger Scenarios

设置新项目文档结构 为不同团队创建空间 查找或列出可用文档空间 归档或删除过时空间

Install

npx skills add NeverSight/learn-skills.dev --skill jira-spaces -g -y
More Options

Non-standard path

npx skills add https://github.com/NeverSight/learn-skills.dev/tree/main/data/skills-md/01000001-01001110/agent-jira-skills/jira-spaces -g -y

Use without installing

npx skills use NeverSight/learn-skills.dev@jira-spaces

指定 Agent (Claude Code)

npx skills add NeverSight/learn-skills.dev --skill jira-spaces -a claude-code -g -y

安装 repo 全部 skill

npx skills add NeverSight/learn-skills.dev --all -g -y

预览 repo 内 skill

npx skills add NeverSight/learn-skills.dev --list

SKILL.md

Frontmatter
{
    "name": "jira-spaces",
    "description": "Manage Confluence spaces for project documentation. Create, list, and delete spaces with templates. Use when setting up project documentation structure or managing Confluence content areas."
}

Jira Spaces Skill

Manage Confluence spaces through the Confluence Cloud REST API. Spaces are the top-level containers for organizing project documentation, wikis, and knowledge bases.

When to Use

  • Setting up documentation structure for a new project
  • Creating spaces for different teams or initiatives
  • Listing available spaces to find documentation
  • Archiving or deleting obsolete spaces

Prerequisites

  • Confluence Cloud instance (same Atlassian account as Jira)
  • API token with Confluence access
  • Environment variables configured in .env

API Reference

Base URL

Confluence Cloud uses the same base URL as Jira Cloud but different API path:

https://your-domain.atlassian.net/wiki/rest/api

Authentication

Same as Jira - Basic Auth with email:token.

Key Endpoints

Endpoint Method Description
/space GET List all spaces
/space POST Create a new space
/space/{spaceKey} GET Get space details
/space/{spaceKey} DELETE Delete a space
/space/{spaceKey}/content GET List space content

Space Types

Type Description Use Case
global Site-wide space Company wikis, shared docs
personal User's personal space Individual notes, drafts

Creating a Space

Request

const response = await fetch(`${CONFLUENCE_URL}/wiki/rest/api/space`, {
  method: 'POST',
  headers: {
    'Authorization': `Basic ${auth}`,
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    key: 'PROJ',           // Unique space key (uppercase)
    name: 'Project Docs',   // Display name
    type: 'global',         // 'global' or 'personal'
    description: {
      plain: {
        value: 'Documentation for the project',
        representation: 'plain'
      }
    }
  })
});

Response

{
  "id": 12345,
  "key": "PROJ",
  "name": "Project Docs",
  "type": "global",
  "status": "current",
  "_links": {
    "webui": "/spaces/PROJ",
    "self": "https://your-domain.atlassian.net/wiki/rest/api/space/PROJ"
  }
}

Listing Spaces

Request

const response = await fetch(`${CONFLUENCE_URL}/wiki/rest/api/space?limit=25&type=global`, {
  headers: {
    'Authorization': `Basic ${auth}`,
    'Accept': 'application/json'
  }
});

Response

{
  "results": [
    {
      "id": 12345,
      "key": "PROJ",
      "name": "Project Docs",
      "type": "global",
      "status": "current"
    }
  ],
  "start": 0,
  "limit": 25,
  "size": 1,
  "_links": {}
}

Deleting a Space

WARNING: Deleting a space removes all pages and content permanently!

Request

const response = await fetch(`${CONFLUENCE_URL}/wiki/rest/api/space/PROJ`, {
  method: 'DELETE',
  headers: {
    'Authorization': `Basic ${auth}`
  }
});

Returns 202 Accepted (deletion is async) or 204 No Content.

Space Keys

Space keys must:

  • Be unique across the Confluence instance
  • Use only uppercase letters and numbers
  • Be 1-255 characters
  • Not start with a number

Conventions:

  • PROJ - Project-specific
  • TEAM - Team-specific
  • DOC - Documentation
  • KB - Knowledge base

Common Patterns

Create Project Documentation Space

// Create space with home page
await createSpace({
  key: 'TUSTLE',
  name: 'Tustle Project Documentation',
  description: 'Technical documentation and guides for Tustle MVP'
});

// Add standard pages
await createPage('TUSTLE', 'Getting Started', 'Overview and setup instructions...');
await createPage('TUSTLE', 'Architecture', 'System architecture documentation...');
await createPage('TUSTLE', 'API Reference', 'API endpoint documentation...');

List Team Spaces

const spaces = await listSpaces({ type: 'global', limit: 50 });
const teamSpaces = spaces.filter(s => s.name.includes('Team'));

Error Handling

Status Meaning Resolution
400 Invalid space key Check key format (uppercase, no special chars)
401 Unauthorized Check API token and email
403 Forbidden User lacks space admin permissions
404 Space not found Verify space key exists
409 Conflict Space key already exists

Scripts

Script Description
create-space Create a new Confluence space
delete-space Delete a space (with confirmation)
list-spaces List all accessible spaces

Usage Examples

# List all spaces
node run.js list-spaces

# Create a new space
node run.js create-space DOCS "Documentation Space"

# Delete a space (interactive confirmation)
node run.js delete-space DOCS

# Force delete without confirmation
node run.js delete-space DOCS --confirm

Related Skills

  • jira-projects - Jira project management
  • jira-issues - Issue creation for documentation tasks

Version History

  • e0220ca Current 2026-07-05 20:28

Same Skill Collection

data/skills-md/00prabalk00/claude-skills/knowledge-base-gap-finder/SKILL.md
data/skills-md/01000001-01001110/agent-jira-skills/jira-agile/SKILL.md
data/skills-md/01000001-01001110/agent-jira-skills/jira-auth/SKILL.md
data/skills-md/01000001-01001110/agent-jira-skills/jira-issues/SKILL.md
data/skills-md/01000001-01001110/agent-jira-skills/jira-project-management/SKILL.md
data/skills-md/01000001-01001110/agent-jira-skills/jira-projects/SKILL.md
data/skills-md/01000001-01001110/agent-jira-skills/jira-safe/SKILL.md
data/skills-md/01000001-01001110/agent-jira-skills/jira-search/SKILL.md
data/skills-md/01000001-01001110/agent-jira-skills/jira-transitions/SKILL.md
data/skills-md/0731coderlee-sudo/wechat-publisher/wechat-publisher/SKILL.md
data/skills-md/0froq/skills/conventionalcommits/SKILL.md
data/skills-md/0froq/skills/nuxt/SKILL.md
data/skills-md/0froq/skills/oq/SKILL.md
data/skills-md/0froq/skills/pinia/SKILL.md
data/skills-md/0froq/skills/pnpm/SKILL.md
data/skills-md/0froq/skills/slidev/SKILL.md
data/skills-md/0froq/skills/tsdown/SKILL.md
data/skills-md/0froq/skills/turborepo/SKILL.md
data/skills-md/0froq/skills/unocss/SKILL.md
data/skills-md/0froq/skills/vitepress/SKILL.md
data/skills-md/0froq/skills/vitest/SKILL.md
data/skills-md/0froq/skills/vue-best-practices/SKILL.md
data/skills-md/0froq/skills/vue-router-best-practices/SKILL.md
data/skills-md/0froq/skills/vue-testing-best-practices/SKILL.md
data/skills-md/0froq/skills/vue/SKILL.md
data/skills-md/0froq/skills/vueuse-functions/SKILL.md
data/skills-md/0froq/skills/web-design-guidelines/SKILL.md
data/skills-md/0juano/agent-skills/bondterminal-x402/SKILL.md
data/skills-md/0juano/agent-skills/edgeone-pages-deploy/SKILL.md
data/skills-md/0juano/agent-skills/ley-ar/SKILL.md
data/skills-md/0juano/agent-skills/ticktick/SKILL.md
data/skills-md/0juano/agent-skills/x-image-cards/SKILL.md
data/skills-md/0juano/x-image-cards/x-image-cards/SKILL.md
data/skills-md/0x0funky/agent-sprite-forge/generate2dsprite/SKILL.md
data/skills-md/0x0funky/agent-sprite-forge/video2dsprite/SKILL.md
data/skills-md/0x2e/superpowers/brainstorming/SKILL.md
data/skills-md/0x2e/superpowers/dispatching-parallel-agents/SKILL.md
data/skills-md/0x2e/superpowers/executing-plans/SKILL.md
data/skills-md/0x2e/superpowers/finishing-a-development-branch/SKILL.md
data/skills-md/0x2e/superpowers/receiving-code-review/SKILL.md
data/skills-md/0x2e/superpowers/requesting-code-review/SKILL.md
data/skills-md/0x2e/superpowers/subagent-driven-development/SKILL.md
data/skills-md/0x2e/superpowers/systematic-debugging/SKILL.md
data/skills-md/0x2e/superpowers/test-driven-development/SKILL.md
data/skills-md/0x2e/superpowers/using-git-worktrees/SKILL.md
data/skills-md/0x2e/superpowers/using-superpowers/SKILL.md
data/skills-md/0x2e/superpowers/verification-before-completion/SKILL.md
data/skills-md/0x2e/superpowers/writing-plans/SKILL.md
data/skills-md/0x2e/superpowers/writing-skills/SKILL.md

Metadata

Files
0
Version
e4a0f95
Hash
9dd5ab8e
Indexed
2026-07-05 20:28

Home - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-08-04 05:15
浙ICP备14020137号-1 $Map of visitor$