anywhere-agents: Instructions file for Claude Code

AGENTS.md

anywhere-agents AGENTS.md is an instructions file for Claude Code, Codex, OpenCode from yzhao062/anywhere-agents. It costs 6,305 tokens per session, scanned D, original, Apache-2.0.

Project instructions for anywhere-agents, a shared configuration system for coding agents.

In plain words
What is it for?
Use them to bootstrap consumer repositories and manage shared agent configuration, skills, and settings.
Why use it?
They explain when to refresh shared settings and how repository-specific overrides work, reducing setup mistakes between sessions.

Instructions file for Claude CodeCodexOpenCode

Written for Claude Code and Codex and OpenCode: PreToolUse hook event, but also the file is AGENTS.md. Also seen: reads .claude/ paths; mentions CLAUDE.md; mentions subagents.

This is yzhao062/anywhere-agents's own configuration. It tells Claude Code, Codex and OpenCode how to work on anywhere-agents itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything anywhere-agents configures →

Reuse

Borrowing it

Nothing to install: this file belongs to yzhao062/anywhere-agents. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/yzhao062/anywhere-agents/main/AGENTS.md
Clone the repo
git clone --depth 1 https://github.com/yzhao062/anywhere-agents

Made for: Claude Code, Codex, OpenCode.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for anywhere-agents AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/yzhao062/anywhere-agents/agents-md/github.svg)](https://agentmods.dev/instructions/yzhao062/anywhere-agents/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/yzhao062/anywhere-agents/agents-md"><img src="https://agentmods.dev/badge/instructions/yzhao062/anywhere-agents/agents-md/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for anywhere-agents AGENTS.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/yzhao062/anywhere-agents/agents-md"><img src="https://agentmods.dev/badge/instructions/yzhao062/anywhere-agents/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 6,305 This file is loaded in full into every session.
When invoked 6,305 The same file — it is already loaded in full.
Security scan D 3 findings. A grade says what 26 rules found in the file — not that it is safe. ✓ AI security review Sonnet 5 · 7 Sept 2026 📄 Read the review
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.06305 $0.06305
Opus 5.5 $0.02522 $0.02522
Sonnet 5.5 $0.01261 $0.01261
Haiku 4.5 $0.00630 $0.00630

Measured 4d ago against content hash be04a629d7d7, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade D, and why

anywhere-agents AGENTS.md scanned grade D with 3 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Reads agent configuration directoriesmediumAgent snooping

.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.

- Bootstrap also refreshes user-level files: `~/.claude/hooks/guard.py` (PreToolUse), `~/.claude/hooks/session_bootstrap.py` (SessionStart), the statusline scripts, and the shared `env` entries of `~/.claude/settings.jso

Recursive force deletehighDestructive command

rm -rf with a variable or a broad path is one typo away from removing the wrong tree.

| File or device destruction | `Bash`, `PowerShell` | Bash `rm -rf`/`-fr`/`-r -f`, `dd`, `mkfs*`, `shred`; PowerShell `Remove-Item` and its aliases with `-Recurse`/`-r`/`/s` | **ask** |

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

curl -sfL https://raw.githubusercontent.com/yzhao062/anywhere-agents/main/bootstrap/bootstrap.sh -o .agent-config/bootstrap.sh
AGENTS.md · 201 lines

How it starts

The opening of the file, as written. The whole thing — 201 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Shared agent rules (anywhere-agents)

This file holds rules. A rule says what to do, plus one clause on why when the rule is counter-intuitive. Longer rationale, measurements, version history, and how-to material go to the docs linked at the end or to CHANGELOG.md, never here. Tests enforce the size of this file.

Determine your context before proceeding.

Dispatched reviewer: A dispatched reviewer whose task, lens, and response format are supplied is exempt from this file's bootstrap, router, and coordinator-skill discovery instructions; it applies substantive project policy, including applicable local overrides, reads missing instruction files once, and may read any of these files when they are themselves in scope or answer a concrete verification question.

Source repo test: If bootstrap/bootstrap.sh, bootstrap/bootstrap.ps1, scripts/generate_agent_configs.py, and skills/ all exist at the repo root, you are in a source repo (anywhere-agents, agent-config, or a fork with the same layout). Skip the bootstrap block below and proceed directly to ## Session Start Check. Do not execute the bootstrap script in a source repo; it would try to bootstrap itself.

Consumer repo path: Otherwise, you are in a project that consumes the shared config. You MUST execute the matching bootstrap block below at the start of every session, before responding to any user request or running session checks. Use the PowerShell block on Windows and the Bash block on macOS/Linux. Bootstrap is idempotent: run it every session even if .agent-config/ already exists, so shared config, skills, and settings are refreshed from upstream before any work begins. After running, report the refresh result in one line (for example, "bootstrap: refreshed AGENTS.md, skills, settings").

Bootstrap

Read the full file on GitHub · 201 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 4d ago Changed be04a629d7d7
  2. 5d ago Changed · -10 tokens per session 6973ab5de9b6
  3. 6d ago Changed · +19 tokens per session a63b624a6942
  4. 8d ago Changed · -6 tokens per session 0fb11da5ecda
  5. 9d ago Changed · +6 tokens per session ebc0c4e1217f
  6. 10d ago Changed · -28 tokens per session a87bc8da21b2
  7. 11d ago Changed · +6 tokens per session a86b15077e7d
  8. 19d ago Changed · +1 lines · +2 tokens per session 14f9b83d151c
  9. 20d ago Changed · +1 lines · -3 tokens per session 3dbe626d832d
  10. 22d ago First seen · 199 lines · 6,319 tokens per session scan D 496605359acd

Subscribe to this mod's changes

anywhere-agents AGENTS.md is an instructions file published in the GitHub repository yzhao062/anywhere-agents (259 stars, last pushed 2d ago), licensed Apache-2.0. It adds 6,305 tokens to every session, about $0.0252 per session on Opus 5.5. A static security scan graded it D with 3 findings (reads agent configuration directories, recursive force delete, makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other instructions, from other repositories