agentleFS
ThilinaTLMThilinaTLM/agent-skills/confluence/SKILL.md

confluence

Skill4 starsChanged 6 months agoMITView on GitHub

This skill should be used when the user asks to manage Confluence Cloud content from the command line — list/search Confluence spaces, list/create/update/delete Confluence pages, **download existing pages locally** (JSONL + optional markdown) for offline reference or edit-and-reupload, upload attachments, configure Confluence authentication, store API tokens securely, switch between Confluence profiles, or publish a richdoc-generated Confluence bundle. Triggers include "publish to Confluence", "update Confluence page", "download Confluence page", "pull Confluence content", "export Confluence page to markdown", "list Confluence spaces", "Confluence auth", "Confluence login", "store Confluence token", "publish-bundle", or "send this to Confluence". For authoring polished HTML documents that will eventually be published to Confluence, use the `richdoc` skill first (`richdoc export confluence`) and then use this skill to publish the resulting bundle.

18 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use jira, figma and 2 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • MicrosoftSkill

    jira

    Jira issue workflows for search, issue updates, transitions, comments, field discovery, and interactive credential setup via the Jira REST API. Use when you need to configure Jira access, search with JQL, inspect an issue, create or update work items, move an issue between statuses, post comments, or discover required fields for issue creation.

    Also in 9 projects that use this

  • OpenAISkill

    figma

    Use the Figma MCP server to fetch design context, screenshots, variables, and assets from Figma, and to translate Figma nodes into production code. Trigger when a task involves Figma URLs, node IDs, design-to-code implementation, or Figma MCP setup and troubleshooting.

    Also in 3 projects that use this

  • GitHubSkill

    prd

    Generate high-quality Product Requirements Documents (PRDs) for software systems and AI-powered features. Includes executive summaries, user stories, technical specifications, and risk analysis.

    Also in 3 projects that use this

  • MicrosoftSkill

    handoff

    Compact the current conversation into a handoff document for another agent to pick up.

    Also in 3 projects that use this

The file

We split this skill into the rules it gives an agent

7 rules. 0 are common, 1 is distinctive, and 6 are very specific to this project.

  • 0

    Common

    Most of the 15 edited versions we read keep these.

  • 1

    Distinctive

    This author's own choices. Worth a look.

  • 6

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    All three of page-by-id, page get, page update, and download accept either a numeric page id or a full Confluence page URL (e.g.

    line 58
  2. Very specific:

    Read the next_steps array from the JSON envelope.

    line 74
  3. Distinctive:

    Wait for the user to confirm they've saved the file.

    line 77
  4. Very specific:

    Call confluence auth status --profile NAME to verify.

    line 78
  5. Very specific:

    Important: markdown is read-only: When --markdown is passed, each page also gets a best-effort .md sidecar so a human can skim it.

    line 123
  6. Very specific:

    Always a two-step flow. The agent should pipe nextStep.argv from the richdoc envelope directly into the next command — don't reconstruct …

    line 136
  7. Very specific:

    Every command writes a single-line JSON envelope to stdout.

    line 170

“Common” is measured: kept by at least 6 in 10 of the 15 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

confluence

CLI for managing Confluence Cloud content and publishing storage bundles produced by other tools (notably richdoc). JSON output, no interactive prompts.

When to use confluence

  • Browsing or searching Confluence spaces / pages.
  • Downloading existing pages locally — a single page, a subtree, or a whole space — into JSONL (lossless, default) and optionally best-effort markdown for human reading. This is the read side of the edit-and-reupload loop.
  • Creating, updating, or deleting Confluence pages from storage-format XML files.
  • Uploading attachments to a page.
  • Managing the auth profile(s) the agent uses to talk to Confluence.
  • Publishing a richdoc.confluence.bundle.v1 directory to a Confluence space (one-shot, idempotent, two-pass).

For authoring rich documents, use the richdoc skill. The two skills share a documented on-disk bundle format and are deliberately decoupled: confluence never imports richdoc code, and richdoc never opens a Confluence connection.

CLI Discovery

The CLI is located at ./confluence-cli/ relative to this SKILL.md. Requires uv; the first call provisions the Python environment.

PlatformScript
Unix/Linux/macOSconfluence
Windowsconfluence.cmd (confluence.ps1 also available)
CommandDescription
confluence auth init --profile NAME [--site URL] [--email EMAIL] [--space-key KEY] [--token-env NAME]Write a profile entry to the user config file with a <your-token-here> placeholder. Returns next_steps for the human user.
confluence auth profilesList profiles from project and user config. Token values never appear.
confluence auth use PROFILESet the user-config default profile.
confluence auth logout --profile NAME [--keep-config]Forget a profile (removes the entry or just the token field).
confluence auth status [--profile NAME] [--strict] [--no-verify]Resolve credentials, report tokenSource / tokenLocation / secure, and ping Confluence.
confluence spaces [-q TEXT] [--limit N]List spaces visible to the token.
confluence pages [--space-key KEY] [-q TEXT] [--parent-id ID] [--limit N]List pages in a space.
confluence page-by-id PAGE_ID_OR_URLResolve a page id (or full Confluence URL) to {id, title, parentId, spaceId, version, url}.
confluence page get PAGE_ID_OR_URL [--body]Fetch one page's metadata. With --body, also returns the storage-format XML body (lossless; suitable for editing then re-uploading).
confluence page create --space-key KEY [--parent-id ID] --title TEXT --body-file FILECreate a page from a storage-format XML file.
confluence page update PAGE_ID_OR_URL [--title TEXT] --body-file FILE [--comment TEXT]Update an existing page.
confluence download PAGE_ID_OR_URL [--recurse] [--depth N] [--markdown] [--attachments] -o DIRDownload one page / subtree to a local directory as JSONL (always) + optional markdown + optional attachment bytes. With --space-key KEY alone, downloads every page in the space (capped by --limit, default 200).
confluence publish-bundle BUNDLE [...]Publish a richdoc.confluence.bundle.v1 directory.

All three of page-by-id, page get, page update, and download accept either a numeric page id or a full Confluence page URL (e.g. https://acme.atlassian.net/wiki/spaces/DEV/pages/123456/Title). TinyLinks (/wiki/x/…) need to be expanded in a browser first.

Authentication — the AI agent workflow

The CLI never accepts an API token as a flag, on stdin, or through any other channel the AI agent can supply. The token MUST be entered by the human user. The agent's job is to template the config file and forward instructions.

Standard recipe (do this exact sequence):

  1. Call confluence auth init --profile NAME [--site URL] [--email EMAIL] [--space-key KEY].
  2. Read the next_steps array from the JSON envelope. Forward those instructions to the user verbatim. Do not try to fill in the token yourself.
  3. Wait for the user to confirm they've saved the file.
  4. Call confluence auth status --profile NAME to verify.

For CI / headless contexts, prefer the env-var path — no auth init needed:

export CONFLUENCE_SITE=https://acme.atlassian.net
export CONFLUENCE_EMAIL=me@acme.com
export CONFLUENCE_TOKEN=...     # CI secret
export CONFLUENCE_SPACE_KEY=DEV
confluence spaces

See references/auth.md for the threat model, full resolution precedence, and the advanced OS-keyring path.

Downloading existing pages (read side)

The agent workflow for editing a page that already lives in Confluence:

  1. Get a page reference from the human — a numeric id, a page URL, or a title within a space.
  2. Download the page (and optionally its subtree) locally:
    # Single page from a URL the user pasted:
    confluence download "https://acme.atlassian.net/wiki/spaces/DEV/pages/123456/How+to+deploy" \
        -o ./pulled --markdown --attachments
    
    # A page and all its descendants:
    confluence download 123456 -o ./pulled --recurse --depth 3
  3. Inspect ./pulled/manifest.json for the page tree, then read ./pulled/pages.jsonl. Each row is a complete page record with the storage-format XML body under body.value. This is the lossless, edit-friendly representation.
  4. To edit a page: extract body.value, modify the storage XML (LLMs handle XHTML + ac:*/ri:* macros fine), write it to a file, then push it back with:
    confluence page update 123456 --body-file edited.storage.xml
  5. The download envelope already suggests this nextStep argv so the agent has a known-good path forward.

Important: markdown is read-only. When --markdown is passed, each page also gets a best-effort .md sidecar so a human can skim it. The conversion is intentionally lossy — info/warning callouts, code blocks, page links, attachments, expand sections, and task lists are handled; everything else degrades to HTML comments or plain text. Never re-upload from markdown. Always edit the storage XML in pages.jsonl and push via page update.

See references/download.md for the full JSONL/manifest schema, markdown caveats, and worked examples.

Publishing a richdoc bundle

Always a two-step flow. The agent should pipe nextStep.argv from the richdoc envelope directly into the next command — don't reconstruct the bundle path by hand.

# 1. In the richdoc skill: build the bundle (no credentials needed).
richdoc export confluence docs/ -o build/confluence-docs
# Envelope contains: "nextStep": {"argv": ["confluence", "publish-bundle", "<path>"], ...}

# 2. Here: publish it.
confluence publish-bundle build/confluence-docs --profile work --parent-id 12345

The publisher is idempotent: re-running updates existing pages in place (matched by (space, parent, title)) and re-uploads only changed attachments. Cross-page links and attachment references are resolved post-creation. See references/richdoc-bundles.md.

Common agent mistakes

  • Do not pass a .html file or a richdoc source directory to confluence publish-bundle. It will fail with code: NOT_A_BUNDLE and a hint pointing at richdoc export confluence. Always build a bundle first.
  • Do not attempt to run auth login — the command no longer exists. Use auth init to template a config file, then ask the user to fill in the token.
  • Do not echo, log, or include CONFLUENCE_TOKEN or any literal token value in commands you suggest to the user. Reference env vars by name only.

Output

Every command writes a single-line JSON envelope to stdout. On success: {"ok": true, ...}. On failure: {"ok": false, "code": "...", "error": "...", "hint": "..."}. Exit code matches.

Limits and trust

  • Confluence Cloud only. The v2 REST API the client targets does not exist on Data Center.
  • Pages and attachments only. Whiteboards, databases, blog posts, comments, and labels are not managed by this CLI yet.
  • Read side is JSONL + storage XML. confluence download pulls pages locally losslessly. Markdown is opt-in, best-effort, and read-only — re-uploads always go through storage XML.
  • No mirror sync. Re-downloading does not delete local files; uploading does not delete Confluence pages. Stale dumps must be pruned manually.
  • Destructive operations require confirmation. page delete (when implemented) takes --confirm; without it the call errors with CONFIRMATION_REQUIRED.

See also

  • references/auth.md — profile / env / keyring precedence; corporate-proxy TLS / CA-bundle env vars.
  • references/download.md — JSONL / manifest schema for confluence download, markdown caveats, edit-and-reupload recipe.
  • references/richdoc-bundles.md — bundle schema and publish algorithm.
  • richdoc/SKILL.md — authoring polished HTML documents and producing Confluence bundles.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.