confluence
SKILL.md
Confluence CLI
Command-line tool for managing Confluence pages via af confluence.
Setup
Add the following environment variables to your project's .env file:
JIRA_BASE_URL— Your Atlassian instance URL (e.g.,https://company.atlassian.net)JIRA_EMAIL— Your Atlassian account emailJIRA_API_TOKEN— API token from https://id.atlassian.com/manage-profile/security/api-tokens
Uses the same Atlassian credentials as the Jira skill.
Project Defaults
If the project instructions specify a default Confluence space key (e.g., Confluence space: TEAM), use it as the default for --space, list, and CQL queries. Explicit user input always overrides the default.
Quick Reference
Run af confluence --help for all options.
Read Operations
af confluence get <page-id>— Get page content and metadataaf confluence list <space-key> [--limit N]— List pages in a spaceaf confluence search "<cql>"— Search with CQLaf confluence tree <page-id>— Show page and its childrenaf confluence comments <page-id>— List comments on a pageaf confluence labels <page-id>— List labels on a pageaf confluence attachments <page-id>— List attachments on a pageaf confluence spaces— List all spacesaf confluence space <space-key>— Get space details
Write Operations
af confluence create --space <key> --title "<text>" [--body "<text>"] [--body-file <path>] [--parent <page-id>] [--status draft|current]af confluence update <page-id> [--title "<text>"] [--body "<text>"] [--body-file <path>] [--status draft|current] [--message "<text>"]af confluence delete <page-id>af confluence comment <page-id> --add "<text>"af confluence label <page-id> --add "<name>"af confluence label <page-id> --remove "<name>"af confluence attach <page-id> <file>— Upload an attachment
Output Formats
- Default: Markdown
- JSON: Add
--jsonflag
Common Workflows
Publish a document from a file
af confluence create --space TEAM --title "Architecture Decision Record" \
--body-file ./docs/adr-001.md
Create a child page under an existing page
# Find the parent page ID first
af confluence search "title = 'Engineering Wiki' AND space = TEAM"
# Create child page
af confluence create --space TEAM --title "Onboarding Guide" \
--body-file ./onboarding.md --parent 12345
Update a page from a file with a version message
af confluence update 12345 --body-file ./updated-doc.md \
--message "Revised after Q1 review"
Create a draft page
af confluence create --space TEAM --title "RFC: New Auth System" \
--body-file ./rfc.md --status draft
Browse a page tree
# See a page and all its children
af confluence tree 12345
Work with comments
# List comments
af confluence comments 12345
# Add a comment
af confluence comment 12345 --add "Reviewed — looks good to merge"
Manage labels
# List labels
af confluence labels 12345
# Add a label
af confluence label 12345 --add "reviewed"
# Remove a label
af confluence label 12345 --remove "draft"
# Bulk label: add to multiple pages
for id in 12345 12346 12347; do
af confluence label "$id" --add "q1-roadmap"
done
Attach files
# Attach a diagram
af confluence attach 12345 ./architecture.png
# Attach multiple files
for f in ./diagrams/*.png; do
af confluence attach 12345 "$f"
done
Search examples
# Pages in a space
af confluence search "space = TEAM" --limit 20
# Pages by title
af confluence search "title = 'Meeting Notes'"
# Pages with a specific label
af confluence search "label = 'architecture'"
# Recently modified pages
af confluence search "space = TEAM AND lastModified > now('-7d')"
# Pages containing specific text
af confluence search "text ~ 'deployment process'"
# Pages by creator
af confluence search "creator = currentUser() AND space = TEAM"
Tips
- Discover first: Run
af confluence spacesto find space keys,af confluence list <space>to browse pages - Use
--body-filefor real content: Inline--bodyis fine for short pages; use--body-filefor anything substantial - Quote CQL queries: Always wrap CQL in double quotes to handle spaces and operators
- CQL syntax: Uses
=for exact match,~for contains,AND/ORfor combining. See Atlassian CQL docs for full syntax - Use
--jsonfor scripting: Pipe output tojqfor automation
Error Handling
- Errors print to stderr
- With
--json:{"error": "message"} - Exit codes:
0success,1error
Weekly Installs
2
Repository
avantmedialtd/skillsFirst Seen
Mar 1, 2026
Security Audits
Installed on
opencode2
gemini-cli2
codebuddy2
github-copilot2
codex2
kimi-cli2