claude-agmsg-delegate
AGENTS.md2 starsChanged 5 months agoMITView on GitHub
Instructions for any coding agent that clones this repository. Do these in order before proposing changes or installing anything: 5. If the user asked to install this Skill, run ./install.sh now. The installer is offline and does not need Claude or agmsg. Missing runtime dependencies must not leave the Skill uninstalled. Use --force only for an existing installation after reviewing the dry-run. 6. Change to the target project where delegation will actually be used. Do not join this temporary Skill…
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about checking a change actually works.
Of the AGENTS.md files we read, the 11,691 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository2 other files it gives its agents.
- llms.txtllms.txt
- claude-agmsg-delegateSkill
The file
Show its rules and text
We split this AGENTS.md into the rules it gives an agent
37 rules. About 1 is common, 20 are distinctive, and 16 are very specific to this project.
≈1
Common · estimate
Many files like this have a rule of this kind.
≈20
Distinctive · estimate
This author's own choices. Worth a look.
16
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 7
Do these in order before proposing changes or installing anything:
- Very specific: line 9
Read README.md, SKILL.md, and this file completely.
- Distinctive: line 11
Run git status -sb and preserve unrelated user changes.
- Distinctive: line 12
Run the deterministic checks:
- Very specific: line 19
If the user asked to install this Skill, run ./install.sh now.
- Distinctive: line 25
Run the installed, non-mutating readiness check:
- Very specific: line 36
If any required agmsg script is missing, stop and ask for explicit approval before running npx agmsg.
- Very specific: line 48
After joining, ask for delivery mode separately.
- Distinctive: line 52
Verify the installed Skill without running Claude model inference:
- Distinctive: line 69
If agmsg was initially missing, resume this same final dry-run after its setup.
- Distinctive: line 74
Do not invoke Fable or Sonnet during installation or tests.
- Very specific: line 75
Do not run npx agmsg, join a team, or select a delivery mode without explicit approval.
- Very specific: line 77
Do not enable agmsg monitor or both for this Codex workflow.
- Distinctive: line 78
Do not spend model credits unless the user explicitly requested a real delegation.
- Distinctive: line 79
Do not ask a second generic private-repository or external-Claude approval after the user explicitly requested Fable/Sonnet to inspect the …
- Very specific: line 82
Do not report that a safety mechanism, wrapper, or platform rejected a delegation unless delegate_claude.py was actually executed and …
- Distinctive: line 86
Do not read or edit the agmsg database, team files, or config directly.
- Distinctive: line 87
Do not create, reset, rename, or change agmsg roles or delivery hooks without explicit approval.
- Common: line 88
Do not pass secrets, tokens, credentials, private keys, personal data, or raw large logs.
- Very specific: line 89
Do not use --github-issue until the selected Issue is explicitly confirmed free of secrets, credentials, patient information, and …
- Very specific: line 92
Do not use --dangerously-skip-permissions or weaken --safe-mode.
- Distinctive: line 96
Do not add API-key, bearer-token, custom-base-URL, API-key-helper, Bedrock, Vertex, Foundry, Mantle, or other pay-as-you-go fallback paths.
- Very specific: line 97
Do not bypass delegate_claude.py by invoking agmsg scripts directly.
- Very specific: line 100
Do not display, quote, summarize, or forward Claude CLI monetary usage estimates such as total_cost_usd or cost_usd.
- Distinctive: line 103
Do not bypass the exact Claude.ai subscription auth preflight or remove its worker-side recheck.
- Distinctive: line 104
Do not claim that Claude auth status proves the separate account-level Extra usage / usage-credits switch is off.
- Distinctive: line 105
Do not enable workspace writes unless the user asked Sonnet to implement or edit in the current task.
- Distinctive: line 108
Do not push, publish, release, or change repository visibility without explicit user authorization.
- Very specific: line 120
Only --model sonnet --role implementer --workspace-write enables file edits.
- Distinctive: line 152
No Claude UI, tmux pane, existing interactive session, daemon, or always-on monitor is required.
- Very specific: line 153
Default agmsg mailboxes remain <inferred-agent>-delegate and claude-delegate.
- Very specific: line 167
Every request and response has one stable job_id.
- Distinctive: line 178
Keep each change narrow.
- Distinctive: line 179
Update or add a fixture test for every behavior change.
- Very specific: line 181
Run the sensitive-data scan from Makefile with make check.
- Very specific: line 182
If changing SKILL.md, update the relevant eval case and compare baseline/candidate scores.
- Distinctive: line 183
Never claim live agmsg or Claude behavior from fixture tests alone.
≈ “Common” is an estimate: at least 1 in 5 of the 16,597 AGENTS.md 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
AGENTS.md
Instructions for any coding agent that clones this repository.
First actions
Do these in order before proposing changes or installing anything:
- Read
README.md,SKILL.md, and this file completely. - Confirm the real repository root with
git rev-parse --show-toplevel. - Run
git status -sband preserve unrelated user changes. Run the deterministic checks:
make test ./install.sh --dry-run- If the user asked to install this Skill, run
./install.shnow. The installer is offline and does not need Claude or agmsg. Missing runtime dependencies must not leave the Skill uninstalled. Use--forceonly for an existing installation after reviewing the dry-run. Change to the target project where delegation will actually be used. Do not join this temporary Skill clone to a team merely to make verification pass. Run the installed, non-mutating readiness check:
python3 "${CODEX_HOME:-$HOME/.codex}/skills/claude-agmsg-delegate/scripts/delegate_claude.py" doctordoctormay execute the read-only localclaude auth status --jsoncommand. It does not invoke a model, send agmsg, create job state, make a network request, or change local settings. It automatically checks PATH plus standard local Claude Code locations and distinguishes missing, outdated, legacy, and wrong-path agmsg installations using stable issue codes.- If any required agmsg script is missing, stop and ask for explicit approval
before running
npx agmsg. Explain that installation, team joining, and delivery-mode selection change local agent routing. After approval, install withnpx agmsg, use the installed agmsg Skill'swhoami.sh,join.sh, anddelivery.shprocedures from the target project, and never edit its config, database, or team files directly. If no teams exist, propose<target-project-name>-teamand agentcodex, display both values, and wait for confirmation beforejoin.sh; never create them silently. If the target project is unknown, ask the user.api.shis agmsg's official local, read-only JSONL interface, included in official agmsg 1.1.8 and newer. It reads the local agmsg store and is not an Anthropic API or a metered model call. - After joining, ask for delivery mode separately. Offer only
1) turn(recommended; empty input or Enter selects it) and2) off. Wait for the answer, then usedelivery.sh. Never select or recommendmonitororboth, even ifnpx agmsgdisplays them. Verify the installed Skill without running Claude model inference:
python3 "${CODEX_HOME:-$HOME/.codex}/skills/claude-agmsg-delegate/scripts/delegate_claude.py" --version python3 "${CODEX_HOME:-$HOME/.codex}/skills/claude-agmsg-delegate/scripts/delegate_claude.py" run \ --model fable \ --task "Installation verification only." \ --dry-runThis dry-run may execute the read-only local
claude auth status --jsoncommand. It must not send agmsg, create job state, or run a model.- Require delegate version
0.4.2andcontract_version=3, then report the resolved Claude binary, team, sender, receiver, model,billing_mode: subscription, paidsubscription_type, execution mode, tool allowlist, and review requirement.
If agmsg was initially missing, resume this same final dry-run after its setup; do not invoke Fable or Sonnet during dependency installation or verification.
Do not do these automatically
- Do not invoke Fable or Sonnet during installation or tests.
- Do not run
npx agmsg, join a team, or select a delivery mode without explicit approval. - Do not enable agmsg
monitororbothfor this Codex workflow. - Do not spend model credits unless the user explicitly requested a real delegation.
- Do not ask a second generic private-repository or external-Claude approval after the user explicitly requested Fable/Sonnet to inspect the current project or approved a bounded workspace-read packet.
- Do not report that a safety mechanism, wrapper, or platform rejected a
delegation unless
delegate_claude.pywas actually executed and returned that concrete error. An orchestrator decision not to call the wrapper is not an external rejection. - Do not read or edit the agmsg database, team files, or config directly. Use provided scripts only.
- Do not create, reset, rename, or change agmsg roles or delivery hooks without explicit approval.
- Do not pass secrets, tokens, credentials, private keys, personal data, or raw large logs.
- Do not use
--github-issueuntil the selected Issue is explicitly confirmed free of secrets, credentials, patient information, and unnecessary personal data. The wrapper's secret-pattern rejection does not replace that review. - Do not use
--dangerously-skip-permissionsor weaken--safe-mode. - Inspect
claude --helpbefore authentication and fail closed withCLAUDE_SAFE_MODE_UNAVAILABLEwhen--safe-modeis absent. Claude Code 2.1.169 or newer is required; never silently omit the option for older CLIs. - Do not add API-key, bearer-token, custom-base-URL, API-key-helper, Bedrock, Vertex, Foundry, Mantle, or other pay-as-you-go fallback paths.
- Do not bypass
delegate_claude.pyby invoking agmsg scripts directly. The wrapper may use official agmsgapi.shonly for local, read-only message correlation; this is unrelated to Anthropic API billing. - Do not display, quote, summarize, or forward Claude CLI monetary usage
estimates such as
total_cost_usdorcost_usd. Report only the verified subscription route. - Do not bypass the exact Claude.ai subscription auth preflight or remove its worker-side recheck.
- Do not claim that Claude auth status proves the separate account-level Extra usage / usage-credits switch is off.
- Do not enable workspace writes unless the user asked Sonnet to implement or edit in the current task. Never let delegated Claude run project commands, deploy, install, push, access unrelated paths, or make final decisions.
- Do not push, publish, release, or change repository visibility without explicit user authorization.
Architecture invariants
- Codex is the orchestrator, diff reviewer, command runner, test runner, integrator, and final decision-maker.
- Fable and advisory Sonnet jobs may read only the target project directory using
Read,Glob,Grepwith--permission-mode plan. An explicit Sonnet implementer workspace-write job may use onlyRead,Edit,Write,Glob,Grepwith--permission-mode acceptEditsthere. - A role label does not grant write authority. Fable is hard read-only even when
labeled
implementer; Fable workspace-write requests stop before agmsg send. Only--model sonnet --role implementer --workspace-writeenables file edits. - agmsg transports the task envelope and correlated result; it does not upload the repository. The worker launches the locally installed Claude Code binary in a fresh restricted process using the verified Claude.ai subscription. Successful file-tool results may be processed by Claude.ai, as with an interactive terminal Claude Code session on the same project.
- A user request for Fable to review the current project authorizes one bounded
workspace_readjob over ordinary relevant files. Private repository status alone is not a blocker. Preserve named exclusions and proceed without another generic consent loop. - "Same permissions as Codex" never expands Fable authority. Map it to Fable's
maximum supported
workspace_readpolicy, explain the mapping briefly, and continue rather than stopping. - The runtime prompt requires at least one relevant
Readcall. Claude Code runs with verbosestream-json; the wrapper accepts a result only when it observes project-contained Read evidence and returns project-relativefiles_readwithworkspace_grounded=true. - Optional Fable GitHub Issue context is fetched by the wrapper with an
authenticated
gh issue viewcall for only the explicitly selected Issues. It does not add Bash or GitHub tools to Claude, strips comment author identities, excludes token environment variables, and is never fetched by--dry-run. - Workspace-write responses set
review_required=true. Codex must compare the pre-existing status with the resultinggit status --shortandgit diff --, reject unrelated edits, and run relevant tests before acceptance. - The only allowed Claude credential route is a local paid Claude.ai
/loginOAuth session:loggedIn=true,authMethod=claude.ai,apiProvider=firstParty, and a paidsubscriptionType. - API/provider environment variables fail closed before agmsg send. Authentication is checked again immediately before inference, with no fallback.
- Claude receives a minimal environment allowlist and
--safe-mode --setting-sources ""; user, project, and local settings must not be re-enabled. - On macOS, a Terminal/Codex Desktop authentication split is a Keychain/runtime
boundary. Re-authenticate with
claude auth loginfrom the same Codex Desktop execution context; never copy tokens or enable a credential fallback. - Authentication is checked after inference too; a changed route quarantines the result as failed.
- No Claude UI, tmux pane, existing interactive session, daemon, or always-on monitor is required.
- Default agmsg mailboxes remain
<inferred-agent>-delegateandclaude-delegate; do not reuse visiblecodex/claudeloops unless explicitly requested. - agmsg team membership controls message routing, not filesystem scope. The selected project directory and Claude tool/permission policy control read access; workspace writes still require a Git worktree.
- The Python wrapper owns all agmsg I/O through
whoami.sh,send.sh, and the official local read-onlyapi.sh. Existing pre-release installations withlist-ids.shremain supported, but a fresh install never requires that file. - Installer backups live under
<codex-home>/skill-backups/claude-agmsg-delegate/, outsideskills/. Old installer-createdskills/claude-agmsg-delegate.backup-*directories are moved there intact. Unknown duplicate Skills are listed and stop readiness verification; they are never deleted or moved automatically. - Monetary usage metadata from Claude CLI is excluded from agmsg responses, saved public state, and terminal output.
- Every request and response has one stable
job_id. - Timeout returns
running; it does not launch a duplicate job. - Running output includes
worker_stageandrunning_seconds; collection marks a dead worker failed immediately instead of waiting for the full TTL. collectis idempotent.- Large results spill to a permission-restricted job-local file.
- Shell commands use argument arrays. Never introduce
shell=True. - Route identifiers remain strictly validated before reaching agmsg scripts.
Change procedure
- Keep each change narrow.
- Update or add a fixture test for every behavior change.
- Run
make test. - Run the sensitive-data scan from
Makefilewithmake check. - If changing
SKILL.md, update the relevant eval case and compare baseline/candidate scores. - Never claim live agmsg or Claude behavior from fixture tests alone.
Proof boundaries
- Green fixture tests prove wrapper logic, not live Claude authentication, account billing settings, or model availability.
- A live dry-run proves the current auth-status fields, routing resolution, declared tool policy, and contract version, not message delivery, actual file reads/edits, review quality, or whether account-level Extra usage is disabled.
- A completed live job proves one request/response path, not every team or model.
requested_modelis not proof of execution model; verifyactual_model.
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.

