agentleFS
thinkyou0714thinkyou0714/codex-toolkit/AGENTS.md

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.

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
  1. Very specific:

    Keep home/AGENTS.md small and its top section byte-stable (prompt-cache friendliness).

    line 38
  2. Very specific:

    Wrappers MUST honor the kill switch: Before invoking codex, call kill-switch check (exit 0 = clear, exit 1 = ACTIVE).

    line 44
  3. Distinctive:

    Commit style: Conventional Commits, imperative mood.

    line 52

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
AGENTS.md

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.sh is 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.sh

Hard rules (root-cause lessons baked into this repo)

  1. No hardcoded machine paths. No //wsl$/..., no C:/Users/<name>/..., no ~/.lab/.... Resolve via env vars + scripts/lib/paths.sh with fallbacks.
  2. No secrets in the repo. .example/.template only; reference secrets by env-var name. Integrations must skip gracefully when their env var is unset.
  3. Hooks use absolute $CLAUDE_PROJECT_DIR paths, 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.)
  4. Installer stays idempotent: back up before overwrite, support --dry-run, never clobber user data (config.toml, session_context.md).
  5. Keep home/AGENTS.md small and its top section byte-stable (prompt-cache friendliness); detail goes in AGENTS-full.md.
  6. Wrappers that log codex invocations MUST redact through home/lib/secret_redact.py before writing to failures.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 use home/lib/SecretRedact.psm1.
  7. Wrappers MUST honor the kill switch. Before invoking codex, call kill-switch check (exit 0 = clear, exit 1 = ACTIVE). When ACTIVE, refuse to run and exit 7. scripts/codex-run.sh is the reference implementation — prefer wrapping it over re-implementing the gate.

Conventions

  • Bash: set -euo pipefail, source lib/paths.sh, shellcheck-clean.
  • Python: stdlib only, no third-party deps; must python3 -m py_compile clean.
  • Commit style: Conventional Commits, imperative mood.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.