.claude/skills/api-confluence/SKILL.md
Confluence REST API for pages, spaces, and content. Uses API token for headless/CI. Activate for Confluence operations.
npx skillsauth add d0nghyun/neuron api-confluenceInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Credentials File: .credentials/atlassian.json
{
"base_url": "https://yourcompany.atlassian.net",
"user_email": "[email protected]",
"api_token": "..."
}
Create token at: https://id.atlassian.com/manage-profile/security/api-tokens
Load credentials before API calls:
ATLASSIAN_BASE_URL=$(jq -r '.base_url' /Users/dhlee/Git/personal/neuron/.credentials/atlassian.json)
ATLASSIAN_USER_EMAIL=$(jq -r '.user_email' /Users/dhlee/Git/personal/neuron/.credentials/atlassian.json)
ATLASSIAN_API_TOKEN=$(jq -r '.api_token' /Users/dhlee/Git/personal/neuron/.credentials/atlassian.json)
$ATLASSIAN_BASE_URL/wiki/rest/api
-u "$ATLASSIAN_USER_EMAIL:$ATLASSIAN_API_TOKEN"
-H "Content-Type: application/json"
-H "Accept: application/json"
curl -s -u "$ATLASSIAN_USER_EMAIL:$ATLASSIAN_API_TOKEN" \
"$ATLASSIAN_BASE_URL/wiki/rest/api/user/current"
curl -s -u "$ATLASSIAN_USER_EMAIL:$ATLASSIAN_API_TOKEN" \
"$ATLASSIAN_BASE_URL/wiki/rest/api/space"
curl -s -u "$ATLASSIAN_USER_EMAIL:$ATLASSIAN_API_TOKEN" \
"$ATLASSIAN_BASE_URL/wiki/rest/api/space/{spaceKey}"
curl -s -u "$ATLASSIAN_USER_EMAIL:$ATLASSIAN_API_TOKEN" \
"$ATLASSIAN_BASE_URL/wiki/rest/api/content/search?cql=text~'search term'"
curl -s -u "$ATLASSIAN_USER_EMAIL:$ATLASSIAN_API_TOKEN" \
"$ATLASSIAN_BASE_URL/wiki/rest/api/content/{pageId}?expand=body.storage,version"
curl -s -u "$ATLASSIAN_USER_EMAIL:$ATLASSIAN_API_TOKEN" \
"$ATLASSIAN_BASE_URL/wiki/rest/api/content?title=Page%20Title&spaceKey={spaceKey}&expand=body.storage"
curl -s -X POST \
-u "$ATLASSIAN_USER_EMAIL:$ATLASSIAN_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"type": "page",
"title": "New Page Title",
"space": {"key": "{spaceKey}"},
"body": {
"storage": {
"value": "<p>Page content in HTML</p>",
"representation": "storage"
}
}
}' \
"$ATLASSIAN_BASE_URL/wiki/rest/api/content"
curl -s -X PUT \
-u "$ATLASSIAN_USER_EMAIL:$ATLASSIAN_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"version": {"number": 2},
"title": "Updated Title",
"type": "page",
"body": {
"storage": {
"value": "<p>Updated content</p>",
"representation": "storage"
}
}
}' \
"$ATLASSIAN_BASE_URL/wiki/rest/api/content/{pageId}"
curl -s -u "$ATLASSIAN_USER_EMAIL:$ATLASSIAN_API_TOKEN" \
"$ATLASSIAN_BASE_URL/wiki/rest/api/content/{pageId}/child/page"
curl -s -X POST \
-u "$ATLASSIAN_USER_EMAIL:$ATLASSIAN_API_TOKEN" \
-H "Content-Type: application/json" \
-d '[{"prefix": "global", "name": "label-name"}]' \
"$ATLASSIAN_BASE_URL/wiki/rest/api/content/{pageId}/label"
curl -s -u "$ATLASSIAN_USER_EMAIL:$ATLASSIAN_API_TOKEN" \
"$ATLASSIAN_BASE_URL/wiki/rest/api/content/{pageId}/label"
Common CQL queries:
space=SPACEKEY - Content in specific spacetype=page - Only pagestitle~"keyword" - Title contains keywordtext~"keyword" - Content contains keywordlabel=labelname - Content with labelcreator=currentUser() - Created by current userCombine with AND/OR:
space=DEV AND type=page AND label=api
| Status | Meaning | Action | |--------|---------|--------| | 401 | Invalid credentials | Check email and API token | | 403 | No permission | Verify space/page permissions | | 404 | Not found | Check page ID or space key | | 409 | Version conflict | Get latest version and retry | | 429 | Rate limited | Wait and retry |
NEVER hardcode naming conventions. Always infer from existing pages.
Before creating any page:
# 1. Get existing page titles under parent
curl -s -u "$ATLASSIAN_USER_EMAIL:$ATLASSIAN_API_TOKEN" \
"$ATLASSIAN_BASE_URL/wiki/rest/api/content/{parentPageId}/child/page" \
| jq '.results[] | .title'
# 2. AI infers pattern from titles like:
# "MTNG-0004-Title", "MTNG-0005-Title"
# → Pattern: MTNG-{4-digit}-{title}
# → Next: MTNG-0006-{new-title}
This approach lets the convention evolve in Confluence without touching the skill file.
databases
Notion schedule management. Query today/weekly schedules, add/modify/complete schedules.
testing
Recap session memory into vault and validate vault structure
testing
Counterfactual review of decision paths after Moderate+ tasks
tools
Create a release with version tag. Converts UNRELEASED.md to version file and creates git tag.