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

bitbucket-browser-fetch

Skill3 starsChanged 4 months agoMITView on GitHub

Fetch Bitbucket Cloud project repository inventory through an authenticated browser session when API tokens/app passwords are unavailable, especially with Atlassian SSO. Use to list repositories in a Bitbucket workspace project and produce JSON, Markdown, SSH clone URL lists, HTTPS clone URL lists, and a safe clone helper script.

The file

We split this skill into the rules it gives an agent

6 rules. About 0 are common, 3 are distinctive, and 3 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈3

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 3

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use this skill when a user wants all repositories in a Bitbucket Cloud project inventoried through an authenticated browser session.

    line 10
  2. Distinctive:

    Never ask the user to paste Bitbucket cookies, app passwords, or API tokens into chat.

    line 16
  3. Distinctive:

    Treat repository names/URLs as potentially confidential.

    line 19
  4. Very specific:

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

    line 41
  5. 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 47
  6. 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 49

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

Bitbucket Browser Fetch

Use this skill when a user wants all repositories in a Bitbucket Cloud project inventoried through an authenticated browser session. This is useful when Bitbucket app passwords/API tokens are unavailable or inconvenient because the organization uses Atlassian SSO.

The script opens/reuses Chrome with a dedicated profile, lets the user complete Bitbucket login once, extracts Bitbucket cookies via Chrome DevTools, verifies project access, and fetches the repository list using Bitbucket's browser/internal API.

Safety

  • Never ask the user to paste Bitbucket cookies, app passwords, or API tokens into chat.
  • The skill is read-only and does not clone repositories itself.
  • It writes clone URL lists and a helper script; review before executing any clone script.
  • Treat repository names/URLs as potentially confidential.

Script

scripts/bitbucket-browser-fetch.js <PROJECT_URL> [options]

Important options:

--workspace NAME   override workspace parsed from URL
--project KEY      override project key parsed from URL
--raw-dir DIR      output raw directory
--pagelen N        internal API page size, default 100
--wait SEC         SSO/session wait timeout
--port PORT        Chrome DevTools port
--profile-dir DIR  Chrome profile dir

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.

Bitbucket sits on bitbucket.org rather than *.atlassian.net, so its cookies are scoped separately, but sharing one Chrome profile/port still avoids spawning extra browser windows.

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-login — 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.

Example

scripts/bitbucket-browser-fetch.js \
  'https://bitbucket.org/myneva/workspace/projects/SWI' \
  --raw-dir ./raw

Output

raw/bitbucket/<workspace>/projects/<project-key>/
├── repositories.json
├── repositories.md
├── clone-ssh.txt
├── clone-https.txt
├── clone-ssh.sh
├── bitbucket-browser-fetch-run.json
└── pages/
    └── repositories-page-1.json

Agents should normally use repositories.json for metadata and clone-ssh.txt for selective checkout with normal Git SSH credentials.

References

  • Usage reference
  • 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.