agentleFS
tyler-berggrentyler-berggren/tb-claude-kit/.claude/skills/bridge/SKILL.md

bridge

Skill2 starsChanged 5 days agoMITView on GitHub

Start the artifact bridge server for HTML artifacts to read/write project files.

  • Sends data out

5 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

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

  • 0

    Common

    Most of the 5 edited versions we read keep these.

  • 3

    Distinctive

    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. Distinctive:

    All paths are relative to project root and cannot escape it.

    line 16
  2. Distinctive:

    Run this command in the background — it's a long-running process.

    line 33
  3. Distinctive:

    Add a status indicator in the artifact header to show bridge connectivity:

    line 78
  4. Very specific:

    If .claude/kit.json has a rules."bridge" entry, read it and apply it as an additional instruction for this skill.

    line 90

“Common” is measured: kept by at least 6 in 10 of the 5 edited versions of this file we could read. “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

Artifact Bridge

Starts a lightweight localhost HTTP server that lets HTML artifacts (opened in a browser) read and write project files via fetch.

Endpoints:

  • GET /status — health check, returns project root
  • GET /read?path=relative/path — read a file
  • POST /write { path, content } — write a file

All paths are relative to project root and cannot escape it.

Procedure

  1. Kill any existing bridge on port 4444:
lsof -iTCP:4444 -sTCP:LISTEN -t 2>/dev/null | xargs kill 2>/dev/null
sleep 1
  1. Start the bridge server in background:
node scripts/artifact-bridge.cjs "$(pwd)"

Run this command in the background — it's a long-running process.

  1. Wait for the server to be ready:
for i in 1 2 3 4 5; do
  curl -s http://127.0.0.1:4444/status > /dev/null 2>&1 && break
  sleep 1
done
  1. Report:
Artifact bridge: http://127.0.0.1:4444
Root: <project root>

Rules

  • No confirmation needed — execute immediately
  • Port 4444, bound to 127.0.0.1 only
  • Files scoped to project root — no path traversal outside project

Artifact Integration

HTML artifacts can connect to the bridge with this pattern:

var BRIDGE = 'http://127.0.0.1:4444';

// Check connection
fetch(BRIDGE + '/status').then(r => r.json())

// Read a file
fetch(BRIDGE + '/read?path=src/example.ts').then(r => r.json())

// Write a file
fetch(BRIDGE + '/write', {
  method: 'POST',
  headers: { 'Content-Type': 'application/json' },
  body: JSON.stringify({ path: 'src/example.ts', content: '...' })
})

Add a status indicator in the artifact header to show bridge connectivity:

setInterval(function() {
  fetch(BRIDGE + '/status').then(r => { connected = r.ok; })
    .catch(() => { connected = false; });
}, 5000);

Project overrides

If .claude/kit.json has a rules."bridge" entry, read it and apply it as an additional instruction for this skill. Absent file or key means no overrides — that is the normal case.

jq -r '.rules."bridge" // empty' .claude/kit.json 2>/dev/null

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.