Showing 28 verified skills. 284 preview entries are hidden until we confirm a real source. Show preview skills · Why?
Get test suites that are verified to actually pass in sandbox
codex exec --pattern test-genCodex generates tests, runs them in its sandbox, iterates on failures, and returns only verified passing test suites.
This is the actual SKILL.md file that powers this skill. Copy it to install.
---
name: codex-test-gen
description: |
Generate unit and integration tests for existing code in Codex. Trigger
when the user asks for test coverage on a file, module, or function.
Phrases: "generate tests", "write tests for", "add coverage", "unit tests",
"test this function".
allowed-tools:
- Read
- Write
- Edit
- Grep
- Glob
- Bash(npm test *)
- Bash(pytest *)
---
# Codex Test Gen
Generate meaningful tests for a target file or function. Favor behavior
coverage over line coverage. Never produce tests that only assert that
mocks were called.
## Prerequisites
- Test runner configured (Jest, Vitest, pytest, go test, cargo test)
- Target file exists and is imported somewhere
## Steps
1. **Read the target file end to end.** Map exported surfaces, inputs,
outputs, and side effects. Note which branches exist.
2. **Find existing tests** in the repo for style conventions. Match
import paths, describe/it structure, assertion library, and fixture
patterns already in use.
3. **Plan cases before writing code.** Happy path, edge cases (empty,
null, boundary), error cases, and one integration case that exercises
real collaborators.
4. **Write tests** in the repo's idiomatic location (`__tests__/`,
`*.test.ts` sibling, `tests/` folder). Keep one behavior per test.
Use table-driven tests for similar shape with different inputs:
```ts
it.each([
[1, 2, 3],
[0, 0, 0],
[-1, 1, 0],
])("add(%i, %i) = %i", (a, b, expected) => {
expect(add(a, b)).toBe(expected);
});
```
5. **Run the suite.** If a test fails on a real bug, report it and stop;
do not silently relax the assertion to make it pass.
6. **Report coverage delta** for the touched file only. Whole-repo
coverage targets are noise.
## Anti-patterns
- Mock-heavy tests that only verify implementation details
- Snapshot tests on UI with no assertions on behavior
- Single giant test that exercises half the module
## Output
- Test file next to or alongside the target
- Green run on the new tests
- Summary of cases covered and any bugs surfaced
mkdir -p ~/.claude/skills/codex-test-gen~/.claude/skills/codex-test-gen/SKILL.mdResulting file structure:
~/.claude/
skills/
codex-test-gen/
SKILL.md <-- skill definitionSkills are loaded automatically by Claude Code when you start a new session. The skill name and description in the frontmatter determine when Claude triggers it.
Recommended from shared domain, career, and tool overlap with Codex Test Generator
Generate typed API clients and webhook handlers from specs
Both used by Software Engineer
Find performance bottlenecks and memory leaks with fix suggestions
Both used by Software Engineer
Measure code complexity and find the best refactoring targets
Both used by Software Engineer
Build RAG pipelines with embedding, retrieval, and cited generation
Both used by Software Engineer
Implement production auth with OAuth, JWT, RBAC, and MFA
Both used by Software Engineer
Test your app like a human QA tester - clicks, types, verifies
Both used by Software Engineer
Codex Test Generator