Claude-skill-registry confluence-server
This skill enables interaction with Confluence Server/Data Center REST API for documentation retrieval and knowledge management. Use when the user wants to read pages, search content, list spaces, or retrieve documentation from Confluence Server.
install
source · Clone the upstream repo
git clone https://github.com/majiayu000/claude-skill-registry
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/majiayu000/claude-skill-registry "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/data/confluence-server" ~/.claude/skills/majiayu000-claude-skill-registry-confluence-server && rm -rf "$T"
manifest:
skills/data/confluence-server/SKILL.mdsource content
Confluence Server
This skill provides tools for interacting with Confluence Server/Data Center's REST API, focusing on documentation retrieval and knowledge aggregation workflows.
Prerequisites
The following environment variables must be set:
- Base URL of the Confluence Server instance (e.g.,CONFLUENCE_URL
)https://confluence.example.com
- Username for authenticationCONFLUENCE_USER
- Personal access token for authenticationCONFLUENCE_TOKEN
Available Commands
The
scripts/confluence_api.py script provides a CLI for Confluence Server operations. Execute it with Python 3:
python3 scripts/confluence_api.py <command> [options]
Content Commands
| Command | Description |
|---|---|
| Get a page by ID with content |
| Get a page by title and space key |
| List pages in a space |
| Search content using CQL |
| Get child pages of a page |
| List attachments on a page |
Space Commands
| Command | Description |
|---|---|
| List all accessible spaces |
| Get space details |
Command Usage Examples
Get Page Content
# Get page by ID (storage format - XHTML) python3 scripts/confluence_api.py get-page --page-id 12345 # Get page with rendered HTML view python3 scripts/confluence_api.py get-page --page-id 12345 --body-format view # Get page by title and space python3 scripts/confluence_api.py get-page-by-title --space-key DEV --title "Architecture Overview"
List Pages in Space
# List pages in a space (first 25) python3 scripts/confluence_api.py list-pages --space-key DEV # List pages with custom limit python3 scripts/confluence_api.py list-pages --space-key DEV --limit 50 # List all pages in space (handles pagination) python3 scripts/confluence_api.py list-pages --space-key DEV --all
Search Content
# Search by text python3 scripts/confluence_api.py search --cql "text ~ 'authentication'" # Search in specific space python3 scripts/confluence_api.py search --cql "space = DEV AND text ~ 'API'" # Search by title python3 scripts/confluence_api.py search --cql "title ~ 'Setup Guide'" # Search recent pages (modified in last 7 days) python3 scripts/confluence_api.py search --cql "type = page AND lastmodified > now('-7d')" # Search with label python3 scripts/confluence_api.py search --cql "label = 'architecture'" # Get all search results python3 scripts/confluence_api.py search --cql "space = DEV" --all
Get Child Pages
# Get child pages python3 scripts/confluence_api.py get-children --page-id 12345 # Get all children (paginated) python3 scripts/confluence_api.py get-children --page-id 12345 --all
Get Attachments
python3 scripts/confluence_api.py get-attachments --page-id 12345
List Spaces
# List all spaces python3 scripts/confluence_api.py list-spaces # List only global spaces python3 scripts/confluence_api.py list-spaces --type global # List personal spaces python3 scripts/confluence_api.py list-spaces --type personal
Get Space Details
python3 scripts/confluence_api.py get-space --space-key DEV
Workflow Guidelines
Retrieving Documentation
- Use
to find available documentation spaceslist-spaces - Use
orlist-pages
to locate specific pagessearch - Use
to retrieve full contentget-page - Use
to navigate page hierarchiesget-children
Knowledge Aggregation
- Use
with CQL to find related content across spacessearch - Retrieve multiple pages to aggregate information
- Use labels in CQL queries for categorized content
Finding Specific Information
- Start with a broad CQL search:
text ~ 'keyword' - Narrow down by space:
space = KEY AND text ~ 'keyword' - Retrieve full page content for detailed reading
CQL Quick Reference
Common CQL patterns:
| Pattern | Description |
|---|---|
| Content in specific space |
| Only pages (not blogs, comments) |
| Title contains text |
| Full-text search |
| Content with specific label |
| Created by user |
| Modified in last 7 days |
| Pages under specific parent |
Combine with
AND, OR:
space = DEV AND type = page AND text ~ 'API'
Body Formats
| Format | Description |
|---|---|
| XHTML storage format (default, for programmatic use) |
| Rendered HTML (human-readable) |
| Export-ready HTML |
| Styled HTML with CSS |
Error Handling
Common errors:
- Missing environment variables: Ensure
,CONFLUENCE_URL
, andCONFLUENCE_USER
are setCONFLUENCE_TOKEN - Authentication failed: Verify credentials and token permissions
- Page not found: Check page ID or space/title combination
- Permission denied: User lacks access to the content
Additional Reference
For detailed API documentation, see
references/api_endpoints.md.
For CQL query reference, see references/cql_reference.md.