agentleFS
aholbreichaholbreich/agent-skills/skills/confluence-browser-fetch/SKILL.md

confluence-browser-fetch

Skill3 starsChanged 4 months agoMITView on GitHub

Fetch Confluence Cloud or Server/Data Center pages through a dedicated authenticated browser when API tokens do not work, especially with Microsoft/SSO. Supports native Chromium and managed Windows Chrome/Edge from WSL without exporting cookies. Archive page JSON, storage/view HTML, attachments, CQL results, or descendants into a raw folder.

The file

We split this skill into the rules it gives an agent

10 rules. About 0 are common, 8 are distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈8

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use this read-only skill to ingest authenticated Confluence pages into an LLM wiki or evidence folder when ordinary API-token …

    line 10
  2. Distinctive:

    no create, update, delete, move, form-submit, or other write operation is available.

    line 29
  3. Very specific:

    Use explicit --context-path when a reverse proxy or unusual URL does not expose enough information.

    line 103
  4. Distinctive:

    no firewall/LAN exposure of the DevTools port.

    line 120
  5. Distinctive:

    Use Edge if required by corporate policy:

    line 122
  6. Distinctive:

    Run the fetcher with the supplied page URL.

    line 130
  7. Distinctive:

    If the dedicated browser opens or the session expired, complete SSO/MFA there.

    line 131
  8. Distinctive:

    Do not ask the user to paste cookies, SAML data, passwords, or tokens.

    line 132
  9. Very specific:

    Verify page.json, metadata, and capture status before synthesis.

    line 133
  10. Distinctive:

    Do not commit private exports to a public repository.

    line 135

≈ “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 Browser Fetch

Use this read-only skill to ingest authenticated Confluence pages into an LLM wiki or evidence folder when ordinary API-token authentication is unavailable or inappropriate.

It supports:

  • Confluence Cloud, normally under /wiki;
  • Confluence Server/Data Center at / or a custom context path;
  • native Chrome/Chromium/Brave/Edge/Vivaldi on Linux/macOS;
  • managed Windows Chrome or Edge launched from WSL;
  • page ID/URL acquisition, title lookup, CQL, immediate children or full descendants, version-aware refresh, and bounded attachments.

Authentication and safety

The fetcher opens or reuses a dedicated browser profile and lets the user complete normal SSO/MFA. It then performs same-origin GET requests inside the authenticated Confluence tab with credentials: include.

For this skill:

  • browser cookies are not read, returned, printed, or replayed by Node;
  • CDP cookie/storage APIs are not used;
  • cross-origin requests and redirects are rejected;
  • no create, update, delete, move, form-submit, or other write operation is available;
  • attachment transfer is bounded even if unlimited is requested;
  • fetched pages and attachments must be treated as confidential.

CDP remains a powerful local control interface. Use only the dedicated profile, keep DevTools on loopback, and close the dedicated browser when it is no longer needed.

Basic commands

An absolute page URL supplies both the site and page ID:

scripts/confluence-browser-fetch.js \
  'https://example.atlassian.net/wiki/spaces/ABC/pages/123456/Page+Title' \
  --raw-dir ./raw

Classic Server/Data Center URLs are supported:

scripts/confluence-browser-fetch.js \
  'https://confluence.example.com/pages/viewpage.action?pageId=123456' \
  --raw-dir ./raw

A page ID requires --site:

scripts/confluence-browser-fetch.js 123456 \
  --site https://confluence.example.com \
  --context-path / \
  --raw-dir ./raw

Custom reverse-proxy context:

scripts/confluence-browser-fetch.js 123456 \
  --site https://intranet.example.com \
  --context-path /confluence \
  --raw-dir ./raw

Important options

--site URL               origin/application URL; optional for absolute page URLs
--context-path PATH      auto (default), /wiki, /, or custom path
--raw-dir DIR            output raw directory
--space KEY              constrain exact-title lookup
--title TITLE            resolve a page by exact title
--cql CQL                search and fetch matching pages
--children               fetch immediate children only (one level)
--descendants            fetch all descendant pages
--max-search-results N   bound CQL results
--max-attachment-size S  default 5mb
--force                  fetch despite matching local version
--no-skip-unchanged      disable version comparison
--no-attachments         skip all attachment downloads
--no-browser-html        omit browser HTML response
--browser-backend NAME   auto, native, or windows-wsl
--browser NAME           chrome or edge for Windows/WSL
--profile-dir PATH       dedicated profile path; Windows syntax for windows-wsl
--port PORT              loopback DevTools port, default 9223
--wait SEC               SSO wait, default 900

Deployment detection

With --context-path auto, the fetcher infers:

  • /wiki from Cloud-style URLs or *.atlassian.net sites;
  • / from classic /pages/viewpage.action, /pages/releaseview.action, /display/..., or root /spaces/... URLs;
  • a custom prefix from URLs such as /confluence/pages/viewpage.action.

Use explicit --context-path when a reverse proxy or unusual URL does not expose enough information.

Windows/WSL

On WSL, --browser-backend auto selects windows-wsl when powershell.exe is available. The launcher uses Windows Chrome by default and stores its dedicated profile at:

%LOCALAPPDATA%\AgentSkillsBrowserProfiles\Atlassian

The launcher marks profiles it creates and refuses to use a non-empty, unmarked profile directory. It also refuses a DevTools port owned by a different browser/profile.

Requirements:

  • Windows Chrome or Edge;
  • PowerShell interoperability from WSL;
  • mirrored localhost networking, or another setup where WSL can reach Windows 127.0.0.1:<port>;
  • no firewall/LAN exposure of the DevTools port.

Use Edge if required by corporate policy:

scripts/confluence-browser-fetch.js '<URL>' --browser-backend windows-wsl --browser edge --raw-dir ./raw

Typical workflow

  1. Run the fetcher with the supplied page URL.
  2. If the dedicated browser opens or the session expired, complete SSO/MFA there.
  3. Do not ask the user to paste cookies, SAML data, passwords, or tokens.
  4. Verify page.json, metadata, and capture status before synthesis.
  5. For an LLM wiki, process raw/confluence/... according to that repository's evidence rules.
  6. Do not commit private exports to a public repository.

For a first fetch from a sensitive site, prefer:

scripts/confluence-browser-fetch.js '<URL>' --no-attachments --raw-dir ./raw

Then enable bounded attachment capture only when needed.

Output

raw/confluence/<SPACE>/<PAGE-ID>-<slug>/
├── page.json
├── page.storage.html
├── page.view.html
├── page.browser.html
├── metadata.json
├── attachments.json
└── attachments/

The run manifest is:

raw/confluence-browser-fetch-run.json

Metadata records the origin, context path, REST source URL, browser backend, and browser-context-get authentication transport. It never records browser credentials.

References

  • Usage and troubleshooting
  • Architecture and development
  • Distribution guide

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.