codex-spec skill
A Codex skill and local verifier: acceptance criteria live in Markdown, checks run, and each result leaves fresh evidence.
- 52 ★ on the repository
- Last commit
- Apache-2.0
Extended access
Why this level
- The verifier runs commands from the spec with the user permissions.
- The skill and `init` write files into `.agents/` and the project `.gitignore`.
Install
- Works in
In your terminal, with SkillFoxx CLI
npx skillfoxx add skills/codex-specDetects the agents on your machine, shows the access level and pins the version.
Other ways to install
Access and checks
How we reviewExtended accessThe tool runs code or makes network calls and only reads external data.
- The verifier runs commands from the spec with the user permissions.
- The skill and `init` write files into `.agents/` and the project `.gitignore`.
This is third-party code. Review the repository files before installing.
What it does
`codex-spec` keeps intent, constraints and acceptance criteria in a readable `.codex-spec/features/<name>/spec.md`. A criterion carries a check (`Verify:` with a command), a manual review procedure (`Review:`), or both. The `spec-driven-development` skill walks Codex through the steps: define the outcome, find the relevant tests, change the code, verify. The local verifier runs the checks, records exit code, output and timing, and shows what remains before acceptance. If files change after verification, the evidence goes stale.
Who it is for. Developers who hand tasks to Codex and want to see what backs the word done.
Good fit when
- You fix a bug: capture the failing test first with `codex-spec verify <feature> --baseline`, then change the code.
- A per-client rate limit must trip on request 101 and the criterion is tied to a concrete test.
- After a refactor you need evidence that the public API stayed the same.
- Some criteria are checked by eye and the reviewer decision is recorded with `codex-spec review`.
- Before a merge you need confirmation that check results belong to the current commit.
Not a fit when
- You need a quick one-line edit with no criteria or checks.
- The platform is Windows without WSL: verification runs on macOS and Linux.
- Verification must defend against a malicious spec author: checksums only reveal accidental edits.
Example request
Use $spec-driven-development to fix the rate limiter: the first 100 requests pass and request 101 gets 429. Capture the failing case first.Limitations
Git and Node.js 22 or newer are required. Installation runs from a repository clone through `npm link`. Checks run with your own permissions, so read an unfamiliar spec before executing it. Tests and scripts must exist in the project and really assert the behavior: a passing command proves nothing by itself. Ignored dependencies and build output, Git metadata and external services are outside the fingerprint.
How to disable. Delete `.agents/skills/spec-driven-development/` and the `.codex-spec/` directory in the project, then run `npm unlink -g codex-spec` in the clone. Remove the evidence ignore rules from `.gitignore`.
FAQ
What does `codex-spec init` do?
It installs the skill into `.agents/skills/spec-driven-development/` and adds ignore rules for generated evidence. Your `AGENTS.md` is preserved and an edited skill is never silently replaced.
Is an API key required?
No. `codex-spec` needs no key, no model configuration and no separate agent service.
Which commands exist?
`init`, `spec`, `check`, `verify`, `status`, `report` and `review`. A step-by-step run goes `codex-spec spec`, `check`, `verify --baseline`, `verify`, `status`.
When does evidence go stale?
After changes to tracked files, non-ignored untracked files, executable bits, symlink targets or the spec itself. Committing unchanged contents keeps it fresh.
How can I try it without my own project?
Run `npm run demo` in the clone: it walks through bug, refactor and performance examples.
Discussion
No questions or reviews yet.
Related
SkillsThe evidence-code-review skill for Codex and Claude Code: evidence-based change review with MUST, SHOULD, BETTER and NITS levels
Eleven skills to verify AI-written code: change blast radius, defect scan, review report, test cases and browser flow replay
A CLI and MCP for testing agent skills: repeatable YAML evals, report comparison, regression detection and skilled-improve
OpenQodex reviews your change before a push: scanners with no model first, then a separate Claude Code or Codex process triages findings on your login
Four Claude Code skills: 1C testing through Codex and 1c-testpilot, code review, export and load through ibcmd
An adversarial code-audit skill: Hunter finds bugs, Skeptic challenges them, Referee rules, and no source edit happens without your permission
Comparison with similar tools
Cards that share the main search query, and how they differ.
| Tool | Official | Repository stars | Main difference |
|---|---|---|---|
| codex-spec (this card) | no | 52 | |
| Spec-Driven Development | no | 158 | a general spec skill; codex-spec adds check execution and stale-evidence tracking |
| OpenSpec | no | 74,784 | drives changes through proposals and deltas; codex-spec ties criteria to verification commands |
README in short
The project pairs a Codex skill with a local verifier. A Markdown spec links criteria to checks, and the result shows the acceptance state.
README badge
Original SKILL.md
--- name: spec-driven-development description: Define readable acceptance specs and verify coding changes with codex-spec. Use when the user requests spec-driven development, acceptance evidence, regression baselines, or work on an existing .codex-spec feature. --- # Spec-driven development Help the developer decide what counts as done, then implement and verify the change using the current Codex session. ## Start with the project 1. Read the applicable AGENTS.md instructions and explore the relevant code and existing tests. 2. Find an existing feature under `.codex-spec/features/`, or choose a short lowercase hyphenated name. 3. Use the executable shipped beside this skill: `scripts/codex-spec.mjs`. Resolve it relative to this SKILL.md, and run it with the target Git project as the working directory. In a repository-local installation the command is `node .agents/skills/spec-driven-development/scripts/codex-spec.mjs`. 4. Read [contract syntax](references/contracts.md) when drafting or changing criteria. ## Define the outcome Create `spec <feature> "<intent>"` when necessary, then edit the generated spec.md. State the problem, relevant constraints, and concrete acceptance outcomes. Keep a small change small; do not generate a separate requirements/plan/tasks document chain. Give each criterion a `###` heading under `## Acceptance criteria`. Add `Verify:` with an actual project command, `Review:` with a human review procedure, or both. Inspect the assertions behind each command. A broad test suite or a process that prints "done" is not sufficient evidence for a specific behavior. Add focused tests for boundaries, failure modes, compatibility, or performance budgets as appropriate. Keep manual decisions explicit. Run `check <feature>` to validate and preview the commands. Review executable commands before running a contract from an unfamiliar source. If a material requirement is ambiguous, ask a focused question while continuing independent discovery. Do not invent a requirement or approval. ## Establish evidence, then implement For a bug or measurable optimization, run `verify <feature> --baseline` after adding the relevant test but before changing the implementation. Inspect why it fails. Missing tools, crashes, and timeouts are not evidence that a regression test detects the intended bug. Use Codex's available planning, editing, and execution tools to implement the change. Follow the project's existing architecture and constraints. Run `verify <feature>`. Inspect failures, repair the implementation, and verify again. Do not weaken assertions or acceptance criteria just to obtain a pass. When a legitimate requirement changes, explain it and update the spec openly. Use `--json` when machine-readable results help. Progress is on stderr. Exit 1 can mean pending review or stale evidence as well as test failure; inspect the separate dimensions before deciding what to do next. ## Review and hand off Use `status <feature>` after the final edits and `report <feature>` for a shareable summary. Report: - which outcomes have automated evidence; - what changed and which tests ran; - any pending human review or remaining failures; - the evidence path and important limits of the checks. A baseline comparison only establishes that the same declared command failed before and passes now. Inspect changes to the test assertions too. Never fabricate a human review or use an agent name as a substitute for the requested reviewer. Record `review` only when the user has explicitly supplied or authorized that person's completed decision and its reference. It is a local declaration, not authenticated identity.