Command Palette

Search for a command to run...

Назад к скиллам
скилл № 51333

remy-testgen

Generate persistent unit tests in post-hoc or TDD mode, distinguishing characterization from conformance and behavior failures from environment failures.

БесплатноЗапускает вложенные скрипты
MyPeacefulValentineот 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/. Use Read("~/.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...]
  1. If the first argument matches low, medium, or high (case-insensitive): use it as effort level, remaining args are parsed further.
  2. Otherwise: use TEST_GEN_EFFORT env var (default medium), all args are parsed further.
  3. If --tdd is present: enable TDD mode. If followed by a filename matching *.json, treat it as a remy-plan packet file.
  4. Remaining arguments are target file paths or function names.
  5. If no targets specified: auto-detect via git diff --name-only HEAD (or git diff --cached --name-only if 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

  1. If arguments provided: Use them as the target scope (file paths or function names).
  2. If no arguments: Run git diff --name-only HEAD (or git diff --cached --name-only if staged). If not a git repo, ask the user to specify targets via AskUserQuestion.
  3. Extract target symbols: For each target file, identify all public functions, classes, and methods by reading the source.
  4. Record: Build target_set: [{file, symbol, type, signature}].

1.2 TDD Mode

If --tdd with packet file:

  1. Read the packet from .claude/temp_task/{packet_file}.
  2. Extract interface contracts from sender_payload.plan[], sender_payload.analysis, and evidence_packet.proposed_changes[]. Preserve task requirements, sources and unresolved premises; the packet is not proof of correctness or permission.
  3. Build target_set from the explicit interfaces and change d
Полный SKILL.md на GitHub

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

  1. 01Read
  2. 02Edit
  3. 03Write
  4. 04Grep
  5. 05Glob
  6. 06Bash
  7. 07PowerShell
  8. 08AskUserQuestion
  9. 09Agent

Вложенные файлы

  • 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 запускает скрипты?

Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.

Похожие скиллы

Сравнить remy-testgen с