agentleFS
matteoepitechmatteoepitech/tonton-claude/.claude/skills/local-stack/SKILL.md

local-stack

Skill4 starsChanged 17 days agoMITView on GitHub

Run a relay, an agent and the macOS app together on one machine, isolated from the developer's real Tonton Claude and Claude Code setup. Use to reproduce a bug or try a change across components by hand.

  • Reads credentials
  • Deletes or force-pushes
  • Sends data out

2 other projects use a version of this.

Adopted by

Most recently taken up by

  • Other versions2 projects use a version of this.

    Word for word · 0

    None found.

    Edited · 0

    None found.

    Wrote their own version · 2

    1. theopenco/llmgateway★ 1.7ksame name
    2. BrendenKennedy/claude-for-ai-platforms★ 1same name

    How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.

  • In this repository5 other files it gives its agents.

The file

We split this skill into the rules it gives an agent

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

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    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. Very specific:

    Keep everything in a temporary directory.

    line 12
  2. Distinctive:

    Always with an isolated home and without the login item:

    line 50
  3. Very specific:

    Stop the relay and the service, then rm -rf "$TONTON_DEV".

    line 75

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

Running the whole stack locally

Most changes are covered faster by bun test: test/end-to-end.test.ts already starts a real relay, a real agent channel and hook, a stand-in for Claude Code and a socket playing the app. Reach for the manual setup below only when you need the real app or a real claude.

Keep everything in a temporary directory. Never run tonton install or tonton uninstall here: the installer edits the real ~/.claude/settings.json, shell profiles and login items.

1. Relay

export TONTON_DEV=$(mktemp -d)
PORT=7777 TONTON_DATA_DIR=$TONTON_DEV/relay bun run relay

Accounts are open by default.

2. Account and token

The app creates both (Settings › Relay, then Settings › Machines). Without the app:

ACCOUNT=$(curl -s -X POST http://127.0.0.1:7777/api/accounts)     # { accountId, token }
TOKEN=$(ACCOUNT="$ACCOUNT" bun -e '
import { encodeAccountToken } from "./shared/account-token"
import { newAccountKey } from "./shared/crypto"
const relay = "http://127.0.0.1:7777"
const { accountId, token } = JSON.parse(process.env.ACCOUNT)
const response = await fetch(`${relay}/api/account/token`, {
  method: "POST",
  headers: { authorization: `Bearer ${token}`, "content-type": "application/json" },
  body: JSON.stringify({ regenerate: false }),
})
const { secret } = await response.json()
const key = newAccountKey()
console.log(encodeAccountToken({ relay, account: accountId, secret, key }))')

The key is random, so only this agent can read what it seals: to see its sessions in the app, use the token the app shows instead.

3. Agent

Always with an isolated home and without the login item:

export TONTON_HOME=$TONTON_DEV/agent TONTON_SERVICE=off
bun agent/src/main.ts token "$TOKEN"      # joins the relay
bun agent/src/main.ts service             # keeps the machine online (Ctrl+C to stop)
bun agent/src/main.ts status

status warns that the launcher and the service are missing: expected, since nothing was installed.

To drive a real claude from the notch, it has to be started with the channel and the hooks pointing at this agent, which is what the installer sets up. Ask the developer before doing that on their machine.

4. App

cd app && ./scripts/build-app.sh && open build/TontonClaude.app

It shares its settings and account with an installed Tonton Claude: tell the developer before you point it to the local relay (Settings › Relay › Self-hosted, http://127.0.0.1:7777), since that replaces their current account in the app.

Clean up

Stop the relay and the service, then rm -rf "$TONTON_DEV".

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.