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.
In this repository4 other files it gives its agents.
- bitbucket-browser-fetchSkill
- confluence-browser-fetchSkill
- jira-browser-fetchSkill
- jira-updateSkill
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
- Very specific: line 10
Use this skill when a user wants an agent to write to Confluence Cloud through the same browser-authenticated flow used by the fetchers.
- Distinctive: line 16
Never ask the user to paste Confluence cookies or API tokens into chat.
- Very specific: line 18
Prefer replace-block for agent-generated content so human-written page regions are preserved.
- Very specific: line 19
Always inspect audit files under raw/confluence-updates/ after a dry-run or write.
- Distinctive: line 20
Treat Confluence page content as confidential.
- Very specific: line 54
All five Atlassian skills (jira-browser-fetch, jira-update, confluence-browser-fetch, confluence-update, bitbucket-browser-fetch) default …
- Very specific: line 58
Reuse signal: When attaching to an existing session, the script prints Reusing Chrome DevTools on port 9223 and (if the target tab is open) …
- Very specific: line 60
If Chrome/Chromium is installed via Flatpak, Snap, or another non-PATH location, set CHROME=/path/to/launcher (or a wrapper script) so the …
- Very specific: line 66
Prefer replace-block when editing an agent-owned region.
- Very specific: line 67
Run without --apply first.
- Distinctive: line 69
Ask the user for approval.
- Distinctive: line 71
If Chrome opens (first run or expired session), ask the user to complete SSO.
- Very specific: line 93
Add --apply only after dry-run review.
- Distinctive: line 116
Create a page from Markdown:
≈ “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.
Files
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-blockfor 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 pageImportant 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 createShared 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
- Prefer
replace-blockwhen editing an agent-owned region. - Run without
--applyfirst. - Review
proposed.storage.html,payload.json, andupdate-run.jsonunderraw/confluence-updates/. - Ask the user for approval.
- Re-run the same command with
--apply. - 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 markdownAdd --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.htmlApply 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' \
--applyCreate 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 markdownOutput 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 metadataReferences
- Usage reference
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
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.

