agentleFS
aholbreichaholbreich/agent-skills/skills/confluence-update/SKILL.md

confluence-update

Skill3 starsChanged 4 months agoMITView on GitHub

Safely update or create Confluence Cloud pages through an authenticated browser session when API tokens do not work, especially with Microsoft/SSO. Use for dry-run-first page updates, agent-owned block replacement, Markdown-to-storage updates, page creation, and audit backups.

The file

Show its rules and text

We split this skill into the rules it gives an agent

14 rules. About 0 are common, 5 are distinctive, and 9 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈5

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 9

    Very specific

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

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

    Use this skill when a user wants an agent to write to Confluence Cloud through the same browser-authenticated flow used by the fetchers.

    line 10
  2. Distinctive:

    Never ask the user to paste Confluence cookies or API tokens into chat.

    line 16
  3. Very specific:

    Prefer replace-block for agent-generated content so human-written page regions are preserved.

    line 18
  4. Very specific:

    Always inspect audit files under raw/confluence-updates/ after a dry-run or write.

    line 19
  5. Distinctive:

    Treat Confluence page content as confidential.

    line 20
  6. Very specific:

    All five Atlassian skills (jira-browser-fetch, jira-update, confluence-browser-fetch, confluence-update, bitbucket-browser-fetch) default …

    line 54
  7. Very specific:

    Reuse signal: When attaching to an existing session, the script prints Reusing Chrome DevTools on port 9223 and (if the target tab is open) …

    line 58
  8. Very specific:

    If Chrome/Chromium is installed via Flatpak, Snap, or another non-PATH location, set CHROME=/path/to/launcher (or a wrapper script) so the …

    line 60
  9. Very specific:

    Prefer replace-block when editing an agent-owned region.

    line 66
  10. Very specific:

    Run without --apply first.

    line 67
  11. Distinctive:

    Ask the user for approval.

    line 69
  12. Distinctive:

    If Chrome opens (first run or expired session), ask the user to complete SSO.

    line 71
  13. Very specific:

    Add --apply only after dry-run review.

    line 93
  14. Distinctive:

    Create a page from Markdown:

    line 116

≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “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 Update

Use this skill when a user wants an agent to write to Confluence Cloud through the same browser-authenticated flow used by the fetchers. It is intentionally conservative: dry-run is the default and --apply is required for any write.

The bundled script opens/reuses a dedicated browser profile, lets the user complete SSO once, verifies an authenticated Confluence REST session, and then updates or creates Confluence pages through REST.

Safety

  • Never ask the user to paste Confluence cookies or API tokens into chat.
  • Dry-run first. Require explicit user approval before adding --apply.
  • Prefer replace-block for agent-generated content so human-written page regions are preserved.
  • Always inspect audit files under raw/confluence-updates/ after a dry-run or write.
  • Treat Confluence page content as confidential.

Script

scripts/confluence-update.js <command> [options]

Commands:

update PAGE_ID_OR_URL        # replace full page body
replace-block PAGE_ID_OR_URL # replace content between <!-- agent-block:NAME:start/end --> markers
create                       # create a new page

Important options:

--site URL              Atlassian site, e.g. https://example.atlassian.net
--file FILE             input file with Confluence storage XHTML or Markdown
--representation REP    storage | markdown (default: storage)
--raw-dir DIR           audit/output directory
--expected-version N    fail if current page version differs
--message TEXT          Confluence version message
--apply                 write to Confluence; omitted means dry-run only
--marker NAME           required for replace-block
--space KEY             required for create
--title TITLE           required for create; optional for update
--parent-id ID          parent page for create

Shared Atlassian SSO Session

All five Atlassian skills (jira-browser-fetch, jira-update, confluence-browser-fetch, confluence-update, bitbucket-browser-fetch) default to the same Chrome profile (~/.local/share/atlassian-browser-chrome) and DevTools port (9223). Log in once via any skill and the others reuse that session automatically — no env vars needed.

This is a separate Chrome window from any browser the user already has open. The script always launches its own profile with remote-debugging enabled; cookies from the user's regular Chrome are not read. The user logs in inside the window the script opens; that session is then reused by every Atlassian skill until it expires.

Reuse signal. When attaching to an existing session, the script prints Reusing Chrome DevTools on port 9223 and (if the target tab is open) Found existing tab for <host>. When you see those lines, do not ask the user to re-SSO — the session is already valid.

If Chrome/Chromium is installed via Flatpak, Snap, or another non-PATH location, set CHROME=/path/to/launcher (or a wrapper script) so the script can find the binary.

Override with ATLASSIAN_CHROME_PROFILE and/or ATLASSIAN_CHROME_DEBUG_PORT to relocate the shared profile/port, or use skill-specific *_CHROME_PROFILE / *_CHROME_DEBUG_PORT env vars for isolation.

Typical Workflow

  1. Prefer replace-block when editing an agent-owned region.
  2. Run without --apply first.
  3. Review proposed.storage.html, payload.json, and update-run.json under raw/confluence-updates/.
  4. Ask the user for approval.
  5. Re-run the same command with --apply.
  6. If Chrome opens (first run or expired session), ask the user to complete SSO. On subsequent invocations the script reuses the session silently — see the Reuse signal above.

Agent-owned blocks

A replaceable block looks like this in Confluence storage:

<!-- agent-block:agent-summary:start -->
<p>Old generated content.</p>
<!-- agent-block:agent-summary:end -->

Then run:

scripts/confluence-update.js replace-block 123456 \
  --site https://example.atlassian.net \
  --marker agent-summary \
  --file ./summary.md \
  --representation markdown

Add --apply only after dry-run review.

Examples

Dry-run a full-page storage update:

scripts/confluence-update.js update 123456 \
  --site https://example.atlassian.net \
  --file ./page.storage.html

Apply with version protection:

scripts/confluence-update.js update 123456 \
  --site https://example.atlassian.net \
  --file ./page.storage.html \
  --expected-version 17 \
  --message 'Update architecture notes' \
  --apply

Create a page from Markdown:

scripts/confluence-update.js create \
  --site https://example.atlassian.net \
  --space ABC \
  --parent-id 123456 \
  --title 'Architecture Notes' \
  --file ./page.md \
  --representation markdown

Output Layout

Each dry-run or write creates an audit directory:

raw/confluence-updates/<page-or-create>-<timestamp>/
├── before.page.json       # existing page for update/replace-block
├── before.storage.html    # existing storage body for update/replace-block
├── proposed.storage.html  # generated replacement body
├── payload.json           # REST payload that would be sent
├── after.page.json        # only after successful --apply
└── update-run.json        # command metadata

References

  • Usage reference

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.