name: confluence-docs description: Search and read Confluence documentation. Use when looking for internal docs, knowledge base articles, runbooks, or team documentation stored in Confluence. allowed-tools: Bash(python *)
Confluence Documentation
Authentication
Set these environment variables:
CONFLUENCE_URL— Your Confluence instance URL (e.g.,https://yourcompany.atlassian.net)CONFLUENCE_EMAIL— Your Atlassian account emailCONFLUENCE_API_TOKEN— API token from https://id.atlassian.com/manage-profile/security/api-tokens
Available Scripts
All scripts are in .claude/skills/confluence-docs/scripts/
search_pages.py - Search Pages
python .claude/skills/confluence-docs/scripts/search_pages.py --query SEARCH_QUERY [--space SPACE_KEY] [--limit N]
# Examples:
python .claude/skills/confluence-docs/scripts/search_pages.py --query "refund policy"
python .claude/skills/confluence-docs/scripts/search_pages.py --query "onboarding" --space HR
python .claude/skills/confluence-docs/scripts/search_pages.py --query "deployment process" --limit 20
Client Library Functions
The confluence_client.py module provides:
| Function | Purpose |
|---|---|
search_content(cql, limit) |
Search pages using CQL |
get_page_by_id(page_id) |
Get page content by ID |
get_page_by_title(space, title) |
Get page by title + space |
Common CQL Patterns
| Pattern | Example | Purpose |
|---|---|---|
| Text search | text ~ "deployment" |
Full text search |
| Space filter | space = "ENG" AND type = page |
Pages in a space |
| Recent docs | lastModified >= now("-30d") |
Recently updated |
| By label | type = page AND label = "runbook" |
Pages with label |
| Combined | space = "HR" AND text ~ "onboarding" |
Complex queries |
Common Workflows
1. Find Documentation on a Topic
# Step 1: Search broadly
python search_pages.py --query "authentication"
# Step 2: Narrow to a space
python search_pages.py --query "authentication" --space ENG
2. Find Internal Processes
python search_pages.py --query "how to request access"
3. Research Before Answering
# Search for existing documentation
python search_pages.py --query "refund process"
# Get full page content using the client library
# (from Python code, not CLI — use get_page_by_id)
Quick Reference
| Goal | Command |
|---|---|
| Search pages | search_pages.py --query "topic" |
| Filter by space | search_pages.py --query "topic" --space ENG |
Best Practices
- Start broad — Search without space filter first
- Use spaces — Narrow with
--spacewhen you know the team - Check recency — Recent pages are more likely current
- Read full page — Use
get_page_by_id()from the client library when search snippets aren't enough