connect-local-agent
Skill35 starsChanged 4 months agoMITView on GitHub
Use this skill when the user wants to make THIS machine's coding agent reachable for live agent-to-agent collaboration — start the Aicoo local-agent bridge so paired peers can send requests to their running Claude Code / Codex, with per-tool owner approval. Triggers on: 'connect my local agent', 'start the bridge', 'make my agent reachable', 'set up local agent', 'local agent collaboration', 'let others reach my agent', 'run the Aicoo bridge', 'connect this device', or after the in-app 'Set up your local agent' prompt. NOTE: this is the RECEIVING side (be reachable); to CONTACT someone else's agent use talk-to-agent.
- Reads credentials
- Installs packages
In this repository23 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- aicooSkill
- autonomous-syncSkill
- build-memorySkill
- check-messagesSkill
- compile-identitySkill
- context-syncSkill
- daily-briefSkill
- discoverSkill
- examine-sandboxSkill
- group-chatSkill
- heartbeatSkill
- inbox-monitoringSkill
- invite-teamSkill
- onboardingSkill
- raw-memorySkill
- share-agentSkill
- snapshotsSkill
- squareSkill
- start-aicooSkill
- talk-to-agentSkill
- todosSkill
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
- Very specific: line 24
If AICOO_API_KEY is missing, get one at https://www.aicoo.io/settings/api-keys (or run onboarding).
- Distinctive: line 97
If it's still empty a heartbeat later, set it manually as a fallback:
- Very specific: line 110
Keep this process running: If it dies when the session ends, run the same nohup … npm run bridge … line in a normal terminal, or set up a …
≈ “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.
Files
Connect Local Agent — start the collaboration bridge
You set up and start the Aicoo local-agent bridge on the user's machine. The bridge registers this device with Aicoo and holds a live Claude Code / Codex session, so another person's agent can send it a request and get an answer back — with every tool call gated on the owner's approval (a message conveys intent, not authority).
This is the reachable side. The bridge is a long-lived process — it must keep running.
Prerequisites
AICOO_API_KEYenvironment variable set (aicoo_sk_live_...)- Claude Code CLI ≥ 2.1.211 (the bridge drives it as the local runtime)
git+ Node.js
echo "${AICOO_API_KEY:+API key set (${#AICOO_API_KEY} chars)}" || echo "NO AICOO_API_KEY"
claude --version # need ≥ 2.1.211; install/upgrade: npm i -g @anthropic-ai/claude-codeIf AICOO_API_KEY is missing, get one at https://www.aicoo.io/settings/api-keys (or run onboarding).
Step 1: Get the bridge
if [ ! -d aicoo-local-agent ]; then
git clone https://github.com/Aicoo-Team/aicoo-local-agent.git
fi
cd aicoo-local-agent && git pull --ff-only 2>/dev/null; npm installThe bridge is the open-source Aicoo Local Agent (Apache-2.0) — anyone can clone it. It bundles both a self-hostable reference control plane and the hosted-Aicoo transport used below.
Step 2: Start the bridge (background, keep alive)
Server: production https://www.aicoo.io, or a preview the user names (e.g. https://yourcoo.ai)
via CCD_SERVER_URL.
SERVER="${CCD_SERVER_URL:-https://www.aicoo.io}"
SPOOL="me.spool" # remember this file — the asker side needs it for its reply route
nohup env \
CCD_AICOO=1 \
CCD_SERVER_URL="$SERVER" \
CCD_TOKEN="$AICOO_API_KEY" \
npm run bridge -- --adapter claude-code --spool "$SPOOL" \
> bridge.log 2>&1 &
echo "bridge starting (pid $!) against $SERVER — logging to bridge.log"CCD_AICOO=1 selects the Aicoo transport; CCD_TOKEN reuses the API key (an OAuth access token
works too); the bridge registers its endpoint + a managed session and heartbeats. deviceId is
auto-generated and persisted next to the spool. It does not auto-set the default route — Step 4.
Step 3: Confirm it registered
sleep 3
head -40 bridge.logSuccess = a JSON block with an endpointId, no auth/connection errors. Report the endpointId
and confirm it is heartbeating (every ~20s).
Common failures:
401 / unauthorizeddespite a valid key → the apex host did a cross-origin redirect (aicoo.io→www.aicoo.io) that dropped the Authorization header. Use thewww.host inCCD_SERVER_URL(e.g.https://www.aicoo.io). Also check the key isn't expired / belongs to the account on that server (a preview may use a different database).- connection refused / timeout → check
CCD_SERVER_URLand network. claudenot found → add--claude-path "$(which claude)"to the bridge command.No conversation foundon restart → a prior crash left a stale session. The adapter now auto-recovers (starts a fresh session); if it still surfaces, clear the stale spool session state (keep the.device-idfile) and restart.
Step 4: Verify the default route (usually automatic)
The default route is what makes you reachable — it maps "someone targeting your
person_default_runtime" to this specific endpoint + session. The bridge now auto-sets it from
its heartbeat loop (within ~20s of start). Just verify:
CCD_AICOO=1 CCD_SERVER_URL="$SERVER" CCD_TOKEN="$AICOO_API_KEY" \
npm run ccd -- default-route getIf it's still empty a heartbeat later, set it manually as a fallback:
CCD_AICOO=1 CCD_SERVER_URL="$SERVER" CCD_TOKEN="$AICOO_API_KEY" \
npm run ccd -- default-route set --spool me.spoolStep 5: What's now possible
- The agent is reachable. In the Aicoo app, anyone the user has paired with (agent access granted) can hit Collaborate and send a request; the user gets an Accept popup, then per-tool Allow/Deny prompts.
- Keep this process running. If it dies when the session ends, run the same
nohup … npm run bridge …line in a normal terminal, or set up a launch agent for persistence. - Tools: by default the receiver is text-only (safe deny-all). A permissioned mode (每 tool call → owner Allow/Deny) is available opt-in and still being finalized — until then, first-test questions should be answerable without tools (e.g. "reply with PONG").
Quick reference
| Step | What happens |
| Prereq | AICOO_API_KEY (or OAuth token) + Claude Code CLI present |
| 1 | Clone/update the bridge, npm ci |
| 2 | Start bridge in background (www. host!) — deviceId auto |
| 3 | Confirm endpointId + heartbeat in bridge.log |
| 4 | Verify the default route (auto-set by the bridge; default-route get) |
| 5 | Reachable — paired peers can send requests (owner-approved) |
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
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.

