remy-testgen
Generate persistent unit tests in post-hoc or TDD mode, distinguishing characterization from conformance and behavior failures from environment failures.
от MyPeacefulValentine★ 28 звёзд на GitHub
Установить remy-testgen в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Об этом скилле
Test Generation Protocol
Generate persistent unit tests and write them into the project's test directory. Supports two modes:
- Post-hoc (default): Distinguish characterization of current behavior from conformance to explicit requirements or maintained contracts. Characterization does not establish that the implementation is correct.
- TDD (
--tdd): Generate checks for specified interface behavior before implementation exists; failures must demonstrate the missing behavior, not just a broken environment.
Use the shared task-planning core in rules/reasoning-and-decisions.md without changing this skill's modes, coverage budget, report or packet structure. Carry goals, preservation requirements, responsibility boundaries and unknowns through the existing text fields. Test writes and subsequent implementation require their own applicable authorization.
External Files
Path Convention: All paths below are relative to
~/.claude/. UseRead("~/.claude/skills/remy-testgen/...")to access them.
| File | Purpose |
|---|---|
skills/remy-testgen/frameworks.json |
Test framework detection rules (Phase 2). User-extensible. |
skills/remy-testgen/schemas/test_scenario.json |
Output schema for test generation agents (Phase 3). |
skills/remy-testgen/prompts/generate_behavioral.md |
Agent A: Behavioral contract analysis prompt (medium+). |
skills/remy-testgen/prompts/generate_boundary.md |
Agent B: Boundary exploration prompt (medium+). |
skills/remy-testgen/prompts/generate_property.md |
Agent C: Property-based testing prompt (high only). |
skills/remy-testgen/templates/test_python.py.j2 |
Jinja2 template for Python test files. |
skills/remy-testgen/templates/test_typescript.ts.j2 |
Jinja2 template for TypeScript test files. |
skills/remy-testgen/templates/test_go.go.j2 |
Jinja2 template for Go test files. |
skills/remy-testgen/templates/test_c.c.j2 |
Jinja2 template for C test files (multi-framework: kunit/cmocka/Unity/criterion/plain). |
skills/remy-testgen/templates/report.md.j2 |
Jinja2 template for the coverage report. |
skills/remy-testgen/render.py |
Template rendering helper. Uses Jinja2 when available, falls back to built-in formatting. |
skills/remy-testgen/output_schema.json |
Final output schema (coverage report structure). |
Optional Dependency: Jinja2
render.py attempts import jinja2. If unavailable, all templates are rendered via built-in string formatting. Jinja2 is optional; install it with pip install jinja2.
0. Configuration
| Environment Variable | Default | Description |
|---|---|---|
TEST_GEN_EFFORT |
medium |
Fallback effort level when not specified as argument. |
TEST_COVERAGE_THRESHOLD |
80 |
Branch coverage percentage target. Shared with /remy-inspect. |
TEST_COVERAGE_MAX_SUPPLEMENT_ROUNDS |
3 |
Maximum coverage supplement iterations before stopping. |
Argument Parsing
/remy-testgen [effort] [--tdd [packet_file]] [target_files_or_functions...]
- If the first argument matches
low,medium, orhigh(case-insensitive): use it as effort level, remaining args are parsed further. - Otherwise: use
TEST_GEN_EFFORTenv var (defaultmedium), all args are parsed further. - If
--tddis present: enable TDD mode. If followed by a filename matching*.json, treat it as a remy-plan packet file. - Remaining arguments are target file paths or function names.
- If no targets specified: auto-detect via
git diff --name-only HEAD(orgit diff --cached --name-onlyif staged).
Effort Level Matrix
| Effort | Generation Strategy | Agents | Coverage Supplement |
|---|---|---|---|
| low | Heuristic: signatures + docstrings → happy/edge/error cases | 0 | Disabled |
| medium | 2 parallel agents: Behavioral Contract (A) + Boundary Exploration (B) | 2 | Enabled (ask user) |
| high | 3 parallel agents: A + B + Property-Based Testing (C) | 3 | Enabled (ask user) |
1. Phase 1: Scope Identification
Goal: Determine what code needs test coverage.
1.1 Post-hoc Mode
- If arguments provided: Use them as the target scope (file paths or function names).
- If no arguments: Run
git diff --name-only HEAD(orgit diff --cached --name-onlyif staged). If not a git repo, ask the user to specify targets viaAskUserQuestion. - Extract target symbols: For each target file, identify all public functions, classes, and methods by reading the source.
- Record: Build
target_set:[{file, symbol, type, signature}].
1.2 TDD Mode
If --tdd with packet file:
Readthe packet from.claude/temp_task/{packet_file}.- Extract interface contracts from
sender_payload.plan[],sender_payload.analysis, andevidence_packet.proposed_changes[]. Preserve task requirements, sources and unresolved premises; the packet is not proof of correctness or permission. - Build
target_setfrom the explicit interfaces and change d
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
- 01
Read - 02
Edit - 03
Write - 04
Grep - 05
Glob - 06
Bash - 07
PowerShell - 08
AskUserQuestion - 09
Agent
Вложенные файлы
- README.md
- README_zh.md
- frameworks.json
- output_schema.json
- prompts/generate_behavioral.md
- prompts/generate_boundary.md
- prompts/generate_property.md
- render.py
- schemas/test_scenario.json
- templates/report.md.j2
- templates/test_c.c.j2
- templates/test_go.go.j2
- templates/test_python.py.j2
- templates/test_typescript.ts.j2
FAQ
Что делает скилл remy-testgen?
Generate persistent unit tests in post-hoc or TDD mode, distinguishing characterization from conformance and behavior failures from environment failures.
Как установить скилл remy-testgen?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл remy-testgen запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
theme-factory
AnthropicToolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
access
AnthropicManage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
configure
AnthropicSet up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
access
AnthropicManage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…