by yzhao062
One config to rule all your AI agents: portable (every project, every session), effective (curated writing, routing, skills), and safer (destructive-command guard).
# Add to your Claude Code skills
git clone https://github.com/yzhao062/anywhere-agentsGuides for using ai agents skills like anywhere-agents.
Last scanned: 5/30/2026
{
"issues": [],
"status": "PASSED",
"scannedAt": "2026-05-30T15:49:14.049Z",
"npmAuditRan": true,
"pipAuditRan": true
}No comments yet. Be the first to share your thoughts!
30 days in the Featured rail
English · 中文
One config for every agent — Claude Code, Codex, and whatever comes next.
Start with effective defaults. Add packs, small bundles of rules, skills, or permissions, as you need them. One AGENTS.md drives every agent in every repo on every machine.
Install • Why • How it works • Pack CLI • Docs • Fork

[!NOTE] Condensed from daily use. The sanitized public release of the agent config I have run daily since early 2026 across research, paper writing, and dev work (PyOD 3, LaTeX, admin) on macOS, Windows, and Linux. Not a weekend project. Maintained by Yue Zhao — USC CS faculty and author of PyOD (9.8k★ · 38M+ downloads · ~12k citations).
Four problems this fixes:
You use more than one agent. Claude Code at work, Codex on personal projects, Cursor on the side. Without anywhere-agents, three configs to keep in sync. With it, one AGENTS.md drives all three.
You work across many repos. Every new project repeats the same setup ritual: writing-style rules, permission policies, custom skills. Without anywhere-agents, you copy-paste between repos and watch them drift. With it, bootstrap pulls shared defaults and layers repo-local overrides on top.
You want a review loop before you push. anywhere-agents ships /implement-review, a skill that hands your staged diff to a second reviewer (Codex, GitHub Copilot, headless Claude Code, or whichever you configure), converges on feedback, and revises. Without it, you wire reviewer APIs per project. With it, the skill is present the first time you bootstrap.
You want your agents to follow writing conventions automatically. The default agent-style rule pack bans ~45 AI-tell words and formatting patterns; a PreToolUse guard denies any .md / .tex / .rst write that contains one. Without anywhere-agents, the banned words land in your files. With it, the guard blocks the write.
As of v0.6.0: Bare anywhere-agents is the canonical apply command — one verb that bootstraps, deploys, applies prompt-policy drift on mutable refs, and regenerates CLAUDE.md. Direct-URL pack fetch + auth chain + drift application all run in the same command. The agent-pack reference repo is the blueprint for any pack you want to author: your own profile, paper workflow, team conventions, custom skills. The pattern is fork-and-replace. Fork ap, replace its three packs with your content, tag a release, then point pack add at your fork:
anywhere-agents pack add https://github.com/yzhao062/agent-pack --ref v0.1.0
The auth chain handles private repos automatically: SSH agent → gh CLI → GITHUB_TOKEN → anonymous, in that order, with whatever you already have configured. --ref is optional (defaults to main); pin a tag for production.
A pack is a small bundle (a rule set, a skill, or a permission policy) that the composer deploys to wherever it needs to land: AGENTS.md, .claude/skills/, .claude/commands/, ~/.claude/hooks/, or ~/.claude/settings.json.
bootstrap installs shipped defaults (agent-style, aa-core-skills) and assembles project-active selections from rule_packs: in agent-config.yaml, rule_packs: in agent-config.local.yaml, and the AGENT_CONFIG_PACKS env var as a transient name list. Each entry is either a registered name (resolved against bootstrap/packs.yaml) or a direct-URL form with a source: {url, ref} field. v0.5.0's 4-method auth chain fetches both public and private repos with whatever Git authentication you already have configured.
As of v0.6.0, the bundled-default policy table is agent-style (passive) → auto (silent refresh + stderr summary) and aa-core-skills (active) → prompt (apply-by-default + stderr summary). Third-party packs default to prompt. Bare anywhere-agents applies prompt-policy drift on mutable refs inline; the run prints one stderr summary line per affected pack (applied 1 update for <pack> @ <ref>: <old> -> <new>). Per-run skip is available via ANYWHERE_AGENTS_UPDATE=skip (v0.5.0 contract) or the --no-apply-drift CLI flag (the flag wins when both are set). Durable fail-closed: pin update_policy: locked in agent-config.yaml. The anywhere-agents pack add | remove | list CLI writes a user-level manifest at $XDG_CONFIG_HOME/anywhere-agents/config.yaml. As of v0.5.2, pack add is one-shot: it writes the entry, runs the composer, and deploys in a single command.
anywhere-agents is the sync step. Re-run it on any machine or repo, and the same command reproduces the shipped defaults plus the project-level selections, applies any drift, and refreshes generated files.

Current and latest versions of Claude Code and Codex (arrows appear only when they differ); auto-update state; active skills (local + pack + shared); hooks (guard.py PreToolUse, session_bootstrap.py SessionStart); any drift flagged by the session check. If anything needs attention, the last line names it with a concrete action (for example, ⚠ actions/checkout@v4 in .github/workflows/validate.yml:17 — bump to v5).
your-project/
├── AGENTS.md # shared rules synced from upstream
├── AGENTS.local.md # your per-project overrides (optional)
├── CLAUDE.md # generated from AGENTS.md for Claude Code
├── agents/codex.md # generated from AGENTS.md for Codex
├── agent-config.yaml # (optional) per-project pack selections
├── .claude/
│ ├── commands/ # slash-command pointers for shipped skills
│ └── settings.json # your project keys merged with shared
├── .agent-config/ # upstream cache (gitignored)
└── skills/ # (optional) repo-local skill overrides
Bootstrap also drops guard.py and session_bootstrap.py into ~/.claude/hooks/, statusline.py into ~/.claude/statusline.py (Claude Max + Codex 5h / weekly quota readout in the Claude Code status row), and merges shared keys into ~/.claude/settings.json. Everything above comes from one bootstrap run; re-running it keeps these files in sync with upstream.
After bootstrap, every Claude Code session shows your live Claude Max + Codex quota at the bottom of the terminal — no API key, no polling, no extra setup:
🤖 Opus 4.7 · 5h 78% (3h 4m) · 7d 51% (15h 4m) | Codex 5h 89% (3h 25m) · 7d 90% (4d 23h)
The Claude side reads from the statusLine stdin (Claude Code v2.1.80+ injects rate_limits for Pro/Max subscribers). The Codex side tails the most recent ~/.codex/sessions/YYYY/MM/DD/rollout-*.jsonl. Windows that already reset are flagged (stale); missing data renders as —.
AGENTS.md, Rules for Every AgentShared rules plus agent-specific blocks in one file; the generator emits one file per agent.
%%{init: {'theme': 'base', 'themeVariables': { 'primaryColor': '#fdf5f6', 'primaryBorderColor': '#8b2635', 'primaryTextColor': '#1a1a1a', 'lineColor': '#8b2635'}}}%%
flowchart LR
A["<b>AGENTS.md</b><br/>shared rules<br/>+ <!-- agent:claude --><br/>+ <!-- agent:codex -->"] -->|shared + claude blocks| B["<b>CLAUDE.md</b><br/>for Claude Code"]
A -->|shared + codex blocks| C["<b>agents/codex.md</b><br/>for Codex"]
A -.->|future: +1 tag| D(["other agent"])
Add a new agent tomorrow and only the tag name changes. scripts/generate_agent_configs.py runs every bootstrap; the shared content stays in lock-step across agents because it lives in one source file.
Default AI output leans on a small set of filler words and em-dash rhythm. The agent-style rule pack is a ban list plus formatting rules; the PreToolUse guard enforces the ban at write-time on .md / .tex / .rst / .txt files.
We delve into a pivotal realm — a multifaceted endeavor that underscores a paramount facet of outlier detection, paving the way for groundbreaking advances that will reimagine the trailblazing work of our predecessors.
32 words. Twelve banned-word or close-va