codex-mcp
AGENTS.md4 starsChanged 4 days agoMITView on GitHub
Source of the codex-mcp npm package and the codex-flow Claude Code plugin. The plugin's behavior is defined in markdown instruction files, not runtime code. - npm test — vitest (tests/*.test.ts, AAA style). Must stay green before any commit. - npm run build — tsc to dist/. - node scripts/check-command-sync.mjs — command-mirror gate (see below). - node scripts/check-release-consistency.mjs — version-agreement gate (only on version bumps). - In the Codex sandbox, if vitest fails with EPERM writing node_modules/.vite-temp, use npx vitest run…
- Reads credentials
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 35,337 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 repository76 other files it gives its agents.
- accounting-bookkeepingSkill
- agent-context-persistenceSkill
- asoSkill
- brainstorm-argumentationSkill
- brainstorm-debateSkill
- brainstorm-lensesSkill
- causal-inferenceSkill
- context-disciplineSkill
- creative-briefSkill
- customer-support-opsSkill
- data-quality-checksSkill
- design-fundamentalsSkill
- ecommerce-operationsSkill
- event-taxonomySkill
- exec-coding-standardsSkill
- exec-cppSkill
- exec-csharpSkill
- exec-deliverableSkill
- exec-github-actionsSkill
- exec-goSkill
- exec-jvmSkill
- exec-phpSkill
- exec-pythonSkill
- exec-rubySkill
- exec-rustSkill
- exec-self-testingSkill
- exec-swiftSkill
- exec-typescriptSkill
- executor-fallbackSkill
- exec-visualizationSkill
- fast-pathSkill
- final-reviewSkill
- financial-auditSkill
- hr-recruitingSkill
- influencer-strategySkill
- interview-ask-backSkill
- interview-elicitationSkill
- jev-assistSkill
- json-data-wranglingSkill
- legal-contract-basicsSkill
- localization-copySkill
- manufacturing-ops-planningSkill
- marketing-attributionSkill
- media-planningSkill
- okr-planningSkill
- pack-game-analyticsSkill
- parallel-executionSkill
- performance-marketingSkill
- personal-financeSkill
- plan-architectureSkill
- plan-backlogSkill
- plan-research-firstSkill
- preflightSkill
- profile-contentSkill
- profile-designSkill
- profile-pilotSkill
- profile-planSkill
- real-estate-analysisSkill
- review-conformanceSkill
- review-dualSkill
- The first 60 shown.
The file
We split this AGENTS.md into the rules it gives an agent
6 rules. About 0 are common, 1 is distinctive, and 5 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.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 21
Run npm run data:guard before every commit once it exists (multiscope Phase 3, T1).
- Very specific: line 28
Command mirror: every commands/<name>.md (codex-flow.md, brainstorm.md) has a
- Very specific: line 36
Skill reachability: every codex-flow:<token> referenced in commands/codex-flow.md must resolve to an existing skills/<token>/SKILL.md …
- Very specific: line 44
Run-state writes: create STATE.md with init.
- Very specific: line 79
Harness changes: every commit that changes commands/, skills/ or scripts/ records one node scripts/harness-change.mjs add --title … …
- Distinctive: line 91
Prefer small additive edits over invasive rewrites.
≈ “Common” is an estimate: at least 1 in 5 of the 45,344 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-mcp / codex-flow
Source of the codex-mcp npm package and the codex-flow Claude Code plugin. The plugin's
behavior is defined in markdown instruction files, not runtime code.
Build & test
npm test— vitest (tests/*.test.ts, AAA style). Must stay green before any commit.npm run build—tsctodist/.node scripts/check-command-sync.mjs— command-mirror gate (see below).node scripts/check-release-consistency.mjs— version-agreement gate (only on version bumps).- In the Codex sandbox, if vitest fails with EPERM writing
node_modules/.vite-temp, usenpx vitest run <file> --configLoader runner; host-run results remain the source of truth.
No real data (public repository)
- This repository is PUBLIC. Never commit text, numbers, ids, SKUs, country splits, CSVs or
reports taken from real analysis work (game data, BigQuery/AppsFlyer exports, pilot reports).
Fixtures, examples and docs use invented data only. Real evaluation holdouts live outside the
git tree (
~/.codex-mcp/quality-holdout/); the repo may hold only their hashes. - Run
npm run data:guardbefore every commit once it exists (multiscope Phase 3, T1). - The STATE key
packsis written only throughflow-state init --packsfrom the router'sinitFlags; never hand-edit it. language-checkuses the first-use gloss rule: the first use of each English term in Vietnamese prose is<Vietnamese term> (<English term>); later bare uses of that term are accepted.tests/holdoutLocal.test.tsruns the real-holdout frozen check only when~/.codex-mcp/quality-holdout/cases.jsonexists; an approved holdout change needs--freeze --approveand the regenerated manifest, or the suite goes red locally.
Hard conventions (CI-gated — violating these red-fails tests)
- Command mirror: every
commands/<name>.md(codex-flow.md,brainstorm.md) has a byte-identical mirror at.claude/commands/<name>.md. Every edit to one must becp-copied to the other. Gates:scripts/check-command-sync.mjs(SYNC_PAIRS) +tests/flowDocs.test.ts. - Skill files:
skills/<name>/SKILL.md. Frontmatter is exactly two unquoted fields:name:and a one-linedescription:. Body follows the existing skills —# <Title> (embed into Codex prompts), then## Standards blockwith a fenced ``` block whose contents are what gets embedded into a Codex prompt (label line + terse- Key: valuebullets). Matchskills/exec-deliverable/SKILL.md. - Skill reachability: every
codex-flow:<token>referenced incommands/codex-flow.mdmust resolve to an existingskills/<token>/SKILL.md(tests/flowDocs.test.ts). Add the token and the SKILL.md together. Skill tokens named in the command must sit inside a**Load skills first...**:line to be recognized. - Release consistency: on a version bump, the version must agree across
package.json,package-lock.json(2 spots),server.json(2 spots),.claude-plugin/plugin.json, the.mcp.jsonnpx pin, and a## [<version>]heading inCHANGELOG.md. - Run-state writes: create STATE.md with
init; changephaseand the three approvals only throughapprove,advance,requirement-delta,plan-drift,improvement-gate, andresume; change other keys throughset, task Status lines throughtask, and validate withcheck— the helper is required, never optional. It validates keys, phases, task stages, and status transitions. Never hand-edit those files in the flow, and never fall back to editing them when the helper is missing: a missing helper means the plugin install is broken, so the flow STOPS and the user is told to reinstall it; a helper that exits non-zero surfaces its error and STOPS. - Runtime scripts: a new
scripts/*.mjshelper the plugin invokes at runtime follows thescripts/task-waves.mjsidiom — Node stdlib only, pure named exports, CLI behind apathToFileURLdirect-run guard — and MUST be added topackage.jsonfiles[]to reach the plugin cache. Tests import its exports with// @ts-expect-error — plain .mjs script. Gate the CLI withisDirectRun(import.meta.url)fromscripts/direct-run.mjs(realpath-safe); never inline thepathToFileURL(process.argv[1])comparison. Any script referenced by an npm script (dev tooling included) also belongs infiles[]: CI'snode scripts/pack-smoke.mjsfails otherwise — run it locally before tagging. - Jev (TypeSafe.ai) decision helper:
scripts/jev-client.mjswrapsPOST https://api.typesafe.ai/v1/systemonefor optional fast-classification assists (fast-path routing, review-dual triage, skill-selection ranking). ReadsTYPESAFE_API_KEY(never written to disk or logged) andCODEX_FLOW_JEV_MODE(off|shadow|enforce, defaultshadowwhen a key is set, elseoff).off/missing key is always a silent no-op — never a hard error. Shadow-mode comparisons land in.codex-flow/notes/jev-shadow.log(already covered by the**/.codex-flow/gitignore rule). The procedures live in the opt-in skillskills/jev-assist. - Profile pilot (multiscope Phase 1): switches
CODEX_FLOW_PROFILE_MODE(off|shadow|enforce, defaultshadow),CODEX_FLOW_EVIDENCE(off|shadow|enforce, defaultoff),CODEX_FLOW_RUN_LANGUAGE(off|on, defaultoff); defaults must keep today's behaviour. The behaviour-changing rules live in the conditional skillskills/profile-pilot(not inPHASE_SKILL_MAP). Byte guards: command ≤ 15 000 B and the code-run flow total ≤ 158 686 B, with a fast-path lane ≤ 5 000 tokens (chars/4) and per-phase loaded ceilings pinned intests/flowDocs.test.ts— pay for new command text by trimming unpinned duplicates; never touch Phase 2 skills.
Harness changes (process rule, not CI-enforced)
- Harness changes: every commit that changes
commands/,skills/orscripts/records onenode scripts/harness-change.mjs add --title … --evidence … --cause <label> --fix … --expect … --at-risk … --filter key=value --after-runs <n> [--commit <sha>]entry with a falsifiable expectation, at-risk area, run-ledger filter, and run count after whichduecompares cohorts; close it later withharness-change.mjs verdict. The local store is~/.codex-mcp/harness-changes.jsonl, overridable withCODEX_MCP_HARNESS_CHANGES, and is never committed.
Style
- Instruction prose: English, imperative, concise. Match the section style of neighboring skills
(
##headings, bullet rules, fenced templates). - Prefer small additive edits over invasive rewrites; keep diffs reviewable.
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.

