Create and manage Confluence Data Center pages in a personal space via the REST API. Use when the user asks to "create a Confluence page", "publish to Confluence", "update a page", "search Confluence", "add labels", "upload an attachment", or any Confluence content management task.
Create, read, update, delete, and search Confluence Data Center pages in the configured personal space. All operations authenticate via Bearer PAT and are scoped to a single space for safety.
All paths are relative to the workspace root.
| Asset | Path | Purpose |
|---|---|---|
| API reference | skills/confluence/references/api-reference.md | REST API endpoints, methods, payloads — read before calling any script |
| Storage format | skills/confluence/references/storage-format.md | Confluence XHTML storage format patterns and examples |
| Macro reference | skills/confluence/references/macro-reference.md | Panel, TOC, expand, status, code macro syntax |
| Templates | skills/confluence/references/templates.md | Page templates (meeting notes, decision log, project overview, retrospective) |
| Examples | skills/confluence/examples/reference.md | Index of example payloads |
| confluence_client | skills/confluence/scripts/confluence_client.py | Shared authenticated HTTP client with space-key guardrail |
| md_to_storage | skills/confluence/scripts/md_to_storage.py | Markdown → Confluence XHTML storage format converter |
| create_page | skills/confluence/scripts/create_page.py | Create a new page (with optional parent, template) |
| get_page | skills/confluence/scripts/get_page.py | Retrieve a page by ID or title |
| update_page | skills/confluence/scripts/update_page.py | Update an existing page (body and/or title) |
| delete_page | skills/confluence/scripts/delete_page.py | Trash a page by ID |
| search_pages | skills/confluence/scripts/search_pages.py | CQL-based search scoped to configured space |
| list_children | skills/confluence/scripts/list_children.py | List child pages of a parent |
| manage_labels | skills/confluence/scripts/manage_labels.py | Add, remove, list labels on a page |
| add_attachment | skills/confluence/scripts/add_attachment.py | Upload a file attachment to a page |
| Variable | Required | Default | Purpose |
|---|---|---|---|
CONFLUENCE_BASE_URL | Yes | — | Confluence Data Center base URL (e.g. https://confluence.wolterskluwer.io) |
CONFLUENCE_TOKEN | Yes | — | Personal Access Token for Bearer authentication |
CONFLUENCE_SPACE_KEY | No | ~Dilpreet.Sahney | Target space key — all writes are restricted to this space |
Credentials are loaded automatically from skills/confluence/scripts/.env.
The shared client uses python-dotenv to read this file at import time — no
manual export is needed. The .env file is gitignored and must contain:
CONFLUENCE_BASE_URL=https://confluence.wolterskluwer.io
CONFLUENCE_TOKEN=<your-personal-access-token>
CONFLUENCE_SPACE_KEY=~Dilpreet.Sahney
If the .env file is missing or python-dotenv is not installed, the scripts
fall back to real environment variables.
Every Confluence operation follows these steps:
Read skills/confluence/references/api-reference.md to understand the
available endpoints. If the task involves content authoring, also read
storage-format.md and macro-reference.md.
Map the user's intent to one of:
| Intent | Script |
|---|---|
| Create a new page | create_page.py |
| Read / fetch a page | get_page.py |
| Update page content or title | update_page.py |
| Delete / trash a page | delete_page.py |
| Search for pages | search_pages.py |
| List child pages | list_children.py |
| Manage labels | manage_labels.py |
| Upload an attachment | add_attachment.py |
If the operation involves content:
md_to_storage.py to convert it to Confluence storage format.
:::info, :::warning, :::note, :::tip, :::expand Title{toc}, {toc:maxLevel=N}, {status:colour=X|title=Y}create_page.py or update_page.py.Alternatively, use --template with create_page.py for pre-built templates.
Call the appropriate script with the required arguments. All scripts use the
shared confluence_client.py for authentication and space-key enforcement.
python skills/confluence/scripts/create_page.py --title "My Page" --body "<p>Hello</p>"
python skills/confluence/scripts/get_page.py --title "My Page"
python skills/confluence/scripts/update_page.py --id 123456 --body "<p>Updated</p>"
python skills/confluence/scripts/search_pages.py --query "architecture"
Report the outcome to the user: