Skip to content
Agentmart
Submit a tool

remy-testgen

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

Skill by MyPeacefulValentine

IndexedMIT★ 28
Write a review

Chalk Labs

Need help deploying remy-testgen?

Chalk Labs sets up agents like this inside real teams: connected to your tools, tested on your data, with a human in the loop where it matters.

Book a call

Install

Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.

npx agentmarket install skill/mypeacefulvalentine-remy-testgen

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

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

Use cases: testing

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions

What this skill can do and what it asks for, from its SKILL.md and code. Checked Oct 25, 2026.

Tools
No tools found
Secrets
None asked for
Install scripts
None found
Runs as
Python package

Network hosts it talks to 1

  • codeload.github.com · found in install command

Files it touches

  • ~/.claude/skills/remy-testgen

Tools it pre-approves 9

From allowed-tools in SKILL.md: the agent may use these without asking you each time.

  • Read,
  • Edit,
  • Write,
  • Grep,
  • Glob,
  • Bash,
  • PowerShell,
  • AskUserQuestion,
  • Agent

What's inside

Skill name
remy-testgen
Description
Generate persistent unit tests in post-hoc or TDD mode, distinguishing characterization from conformance and behavior failures from environment failures.
License
MIT
Allowed tools
Read,, Edit,, Write,, Grep,, Glob,, Bash,, PowerShell,, AskUserQuestion,, Agent
Instructions
484 lines in SKILL.md · view on GitHub

Before installing

  • Ships executable scripts
  • Pre-approves some shell commands

Files (15)

  • README.md
  • README_zh.md
  • SKILL.md
  • frameworks.json
  • output_schema.json
  • generate_behavioral.md · prompts/
  • generate_boundary.md · prompts/
  • generate_property.md · prompts/
  • render.py
  • test_scenario.json · schemas/
  • report.md.j2 · templates/
  • test_c.c.j2 · templates/
  • test_go.go.j2 · templates/
  • test_python.py.j2 · templates/
  • test_typescript.ts.j2 · templates/

SKILL.md (first lines)

# 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 declarations. Evidence paths do not authorize additional implementation or test targets; clarify missing requirements without changing the packet format.

**If `--tdd` without packet file:**
1. Read the target files.
2. Identify stub functions: bodies containing only `pass`, `...`, `raise NotImplementedError`, or `# TODO` comments.
3. Extract function signatures and docstrings from stubs.
4. Build `target_set` from stub signatures.

### 1.3 Impact Analysis (Optional)

1. **Check**: Run `Bash("test -f .claude/logic_index.db && echo EXISTS || echo MISSING")`.
2. **EXISTS**: Run `Bash("python \"~/.claude/skills/remy-index/impact.py\" <target_file_1> ...")`.
    *   **MCP alternative**: If `remy-index` MCP server is active, `query_impact` / `query_callers` tools provide equivalent data without subprocess overhead.
   - Record caller/callee context for richer test generation.
   - If exit code = 2: skip (no call graph data).
3. **MISSING**: Skip impact analysis.

**Output**: Print the target set as a summary table.

---

## 2. Phase 2: Framework Detection & Test Discovery

**Goal**: Identify the project's testing conventions.

### 2.1 Framework Detection

Load detection rules from `frameworks.json`. Each entry defines:
- `indicators`: file existence or file-content checks, evaluated in `priority` order.
- `run_command` / `coverage_command`: command templates.
- `test_file_pattern` / `test_dir_patterns`: glob patterns for locating test files.

Execute indicator checks for each framework entry in priority order. Stop at the first match.

If no framework detected: use `AskUserQuestion` to ask the user which framework to target.

### 2.2 Test Directory Discovery

1. Search for existing test directories using `test_dir_patterns` from the matched framework.
2. If found: record as `test_output_dir`.
3. If NOT found: use `AskUserQuestion` to ask the user where to place test files. Options:

From MyPeacefulValentine/Remy-CC, MIT.

Signals

Stars
28
Forks
0
Open issues
0
Last commit (this folder)
Oct 18, 2026 (1 month ago)
Last release
Oct 18, 2026 (1 month ago)

From GitHub (fetched Oct 24, 2026).

Details

License
MIT
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

Done for you

Rather not set it up yourself?

Chalk Labs scopes, builds and runs agents for your team: the task audit, the eval harness, the integrations and the weekly ops report. Fixed scope, priced before we start.

See how we build AI agents →Read the case studies

Chalk Labs is a two-founder AI and growth studio. We build AI agents, CRMs and MVPs for Web3 and AI companies, and have shipped 50+ product and token launches.

launches shipped
50+
launches shipped
media placements
500+
media placements
founders on every account
2
founders on every account

Press we've placed: Forbes · CoinDesk · Decrypt · Cointelegraph · The Block

Rahil Jain, Co-founder, Chalk Labs. Ex-Goldman Sachs engineer. You talk to the person who builds it.

Get remy-testgen running in your business

Tell us what you want to automate. A founder replies within one working day with a plan, not a pitch deck.

Goes to the Chalk Labs founders, not the newsletter. Privacy

Need help deploying remy-testgen?

CallGet help
Cite this page

remy-testgen skill. Agent Mart. https://agentmart.dev/skills/mypeacefulvalentine-remy-testgen (last updated 2026-10-24)