codex-toolkit
AGENTS.md0 starsChanged 4 months agoMITView on GitHub
This repo IS a Codex CLI dev-OS toolkit, and it is also worked on by Codex/Claude. These instructions govern changes to the toolkit itself.
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about code style.
Of the AGENTS.md files we read, the 31,542 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.
- home/AGENTS.mdAGENTS.md
- run-checksSkill
The file
We split this AGENTS.md 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 38
Keep home/AGENTS.md small and its top section byte-stable (prompt-cache friendliness).
- Very specific: line 44
Wrappers MUST honor the kill switch: Before invoking codex, call kill-switch check (exit 0 = clear, exit 1 = ACTIVE).
- Distinctive: line 52
Commit style: Conventional Commits, imperative mood.
≈ “Common” is an estimate: at least 1 in 5 of the 40,246 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 — codex-toolkit
This repo IS a Codex CLI dev-OS toolkit, and it is also worked on by Codex/Claude. These instructions govern changes to the toolkit itself.
What this project is
A portable, installable toolkit that gives any repository a consistent "dev OS"
for the Codex CLI: global ~/.codex dotfiles, portable review/fix scripts, a
per-repo template (AGENTS.md + CI + skills), and an optional Claude Code
integration. See README.md and docs/ARCHITECTURE.md.
Layout
home/— files installed to~/.codex(global agent config, cost breaker).scripts/— portable wrappers;scripts/lib/paths.shis the single source of truth for path/env resolution. All scripts must source it; never hardcode machine-specific paths.repo-template/— dropped into target repos.claude-integration/— optional Claude Code drop-in.docs/— architecture, setup, strategy, prompt patterns.tests/smoke.sh— the smoke test; CI runs it.
Build / test (run before declaring done)
bash tests/smoke.sh # shell syntax, py compile, install dry-run
command -v shellcheck && shellcheck scripts/*.sh home/*.sh install.sh uninstall.shHard rules (root-cause lessons baked into this repo)
- No hardcoded machine paths. No
//wsl$/..., noC:/Users/<name>/..., no~/.lab/.... Resolve via env vars +scripts/lib/paths.shwith fallbacks. - No secrets in the repo.
.example/.templateonly; reference secrets by env-var name. Integrations must skip gracefully when their env var is unset. - Hooks use absolute
$CLAUDE_PROJECT_DIRpaths, never bare relative paths — a relative hook command breaks when the working directory changes and can disable the whole hook system at once. (This bit a previous session.) - Installer stays idempotent: back up before overwrite, support
--dry-run, never clobber user data (config.toml,session_context.md). - Keep
home/AGENTS.mdsmall and its top section byte-stable (prompt-cache friendliness); detail goes inAGENTS-full.md. - Wrappers that log codex invocations MUST redact through
home/lib/secret_redact.pybefore writing tofailures.jsonl(or any other log). The lib is the single source of truth for the 8 patterns; do not roll your own regex set. PowerShell wrappers usehome/lib/SecretRedact.psm1. - Wrappers MUST honor the kill switch. Before invoking
codex, callkill-switch check(exit 0 = clear, exit 1 = ACTIVE). When ACTIVE, refuse to run and exit 7.scripts/codex-run.shis the reference implementation — prefer wrapping it over re-implementing the gate.
Conventions
- Bash:
set -euo pipefail, sourcelib/paths.sh, shellcheck-clean. - Python: stdlib only, no third-party deps; must
python3 -m py_compileclean. - Commit style: Conventional Commits, imperative mood.
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.

