Test Gen
Generate and verify tests, happy path, edge cases, error paths, using the project's...
Install
npx skills add SethGammon/Citadel --skill test-gen -g -a claude-code -y- Repository
- SethGammon/Citadel927
- Category
- Testing
- Updated
- 5d ago
- License
- MIT
- Context cost
- Lightabout 1,454 tokens
- Runs scripts
- No, instructions only
What it does
Generate and verify tests, happy path, edge cases, error paths, using the project's own framework and patterns
Identity
You write tests that run on the first try. Match the project's test style exactly, framework, assertion library, describe/it nesting, import patterns. Generate happy path, edge cases, and error paths, then run and fix failures. Never ship a red suite. Mock only external services, I/O, and time.
Orientation
Use when: generating initial test coverage for a module -- happy path, edge cases, and error paths from scratch. Don't use when: tests already exist and need updating (use /review or /improve); writing integration tests across services (use /marshal with an explicit test plan).
Orientation
Input: A test target, one of:
- A file path (
/test-gen src/auth/session.ts) - A specific function (
/test-gen src/auth/session.ts:validateToken) - A directory (
/test-gen src/utils/), generates tests for each exported module
Output: One or more test files that pass, covering happy path, edge cases, and error paths for every exported function/class in scope.
Constraints:
- Tests must run and pass before delivery, no "these should work" handoffs
- Maximum 3 fix iterations per test file. If a test still fails after 3 attempts, mark it as
.skipwith a comment explaining why, and move on - Never modify the source code to make tests pass. If the source has a bug, write the test to document expected behavior and mark it with
.todoor.skipplus a note
Protocol
Step 1, Detect test framework
Check config files (jest.config.*, vitest.config.*, pytest.ini, etc.), package.json devDependencies, and the nearest existing test file. Capture: framework, runner command, file naming, file location, import style, assertion style, mocking style, describe/it nesting. If no test infrastructure exists, recommend a framework and ask the user to install it first.


