agentleFS
bks-labbks-lab/open-bridge/skills/bridge-attach/SKILL.md

bridge-attach

Skill16 starsChanged 31 days agoMITView on GitHub

Attaches this Bridge to a Claude Code session that works in another repo: /bridge-attach runs Phase 0 against the Bridge root and puts a short attach text (manual, log, inbox, state of the repo) into the session, at start or later; nothing is written into the repo. Shortcut at start, also for Codex and Copilot CLI: bin/bridge-attach. Trigger: "/bridge-attach", "attach the bridge", "bridge in this repo", "start claude with the bridge", "bridge-attach".

The file

We split this skill into the rules it gives an agent

3 rules. About 0 are common, 2 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

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

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

    If BRIDGE_ATTACH is 1 in the environment, the session was started with the shortcut below and is attached already.

    line 23
  2. Distinctive:

    Write into the repo the session works in.

    line 48
  3. Distinctive:

    Run Phase 0 or onboarding in that repo.

    line 49

≈ “Common” is an estimate: at least 1 in 5 of the 408,460 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

bridge-attach

A Bridge session starts in the Bridge folder; the work happens in repos. This skill gives a session in any repo exactly one Bridge, the one this skill lives in, at start or in the middle of the work. Background, measurements and limits: docs/bridge-attach.md.

Paths. $SKILL_DIR is this skill's folder (the Base directory). Run Bridge commands as "$SKILL_DIR/../../bin/bridge-run" <command>, written as a path from the session's own folder: the path resolves through the .claude/skills link to the Bridge's bin/, and bridge-run executes the command in the Bridge root. No cd is needed; a cd into the Bridge moves this session's shell out of its repo, and spelled out by hand $SKILL_DIR/../.. can end in .claude/. The attach text names the root.

When the skill runs

  1. If BRIDGE_ATTACH is 1 in the environment, the session was started with the shortcut below and is attached already. Run step 2 only when the user asks for a fresh state.
  2. Run "$SKILL_DIR/../../bin/bridge-run" python3 scripts/bridge-attach.py slice --cwd "$PWD" and take its output as this session's attach text. It names the Bridge, the context tag of this repo, the manual, how Bridge commands and log rows are written, the memory folder, and the state of the repo's context: matching inbox items (all others only counted), board counts, recent log rows. Exit 3 means the Bridge is not attachable (not on a user/* branch, no bridge-config.yaml, or the folder is the Bridge itself): say why and stop.
  3. Say in one line what this way does not attach: the Bridge's project hooks (log check, time tracking) and its memory as auto memory. The shortcut at start brings both.

Three ways in

WayHowWhat comes along
1 · in the session, any time/bridge-attach. The skill must be listed: the session was started with --add-dir <root>, or the user types /add-dir <root> firstattach text as conversation content; /compact re-attaches this skill's own text, not the attach text, which is summarized with the rest of the conversation
2 · at startclaude --add-dir <root> "/bridge-attach", or the shortcut <root>/bin/bridge-attach claudethe shortcut puts the attach text into the system prompt (no size cap, survives compaction), replays the Bridge's own hooks and sets its memory; also codex (with the Bridge skills as bridge:<name>) and copilot
3 · automaticnot built: a SessionStart hook cuts its text at 10,000 characters and a hook in the user's global settings fires in every headless run on the machinea terminal app that starts agents can call bridge-attach.py plan instead

The shortcut refuses (exit 3) on the same conditions as step 2 and prints one line per limit that applies, for example "no Bridge memory inside a cmux-style terminal". <root>/bin/bridge-attach plan claude prints what it would run and starts nothing.

What it never does

  • Write into the repo the session works in.
  • Run Phase 0 or onboarding in that repo.
  • Attach a second Bridge, or read another instance's files.
  • Install a hook in the user's global settings.

Check it

"$SKILL_DIR/../../bin/bridge-run" python3 scripts/bridge-attach.py check   # NORMAL user/<name>, exit 0
"$SKILL_DIR/../../bin/bridge-attach" plan claude                            # argv, env, files, notes

Tests: scripts/tests/test_bridge_attach.py (hermetic, throwaway Bridge and repo).

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.