Skip to main content
skill CX Codex

setup · nizos — Claude Code skill: what it does, how to install

This skill detects the project’s test framework, installs the matching TDD Guard reporter, and configures or updates it. Use it for setup or migration.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add nizos/tdd-guard --skill setup -a claude-code
Open on GitHub

What setup does

The skill identifies the test framework used by the current project, then installs or updates the matching TDD Guard reporter. Supported targets include Vitest, Jest, Storybook, pytest, PHPUnit, Go, Rust, RSpec, and Minitest. Reporters store test results in .claude/tdd-guard/data/test.json under the project root.

It applies framework-specific changes: a reporters entry, the Storybook test hook, a pytest setting, a PHPUnit extension or listener, a Go or Rust test target, or Ruby test configuration. The skill does not alter the test framework, build tools, or unrelated dependencies. When it detects multiple frameworks, it asks which one to configure.

Reporter configuration must use an absolute project path. If an existing setup is mixed with custom logic and cannot be migrated safely, the skill reports the issue instead of guessing or changing that logic.

What it helps with

  • identify the test framework used by a project
  • install the matching TDD Guard reporter
  • update an existing reporter configuration
  • migrate reporter settings to the current specification
  • preserve the project root during configuration changes

Example prompts for the agent

  • Set up TDD Guard for this project and detect its test framework.
  • Check the current TDD Guard setup and update the reporter to the current specification.
  • Migrate the existing TDD Guard configuration without changing unrelated test settings.

How to install setup

1Skills CLI (Vercel)

npx skills add nizos/tdd-guard --skill setup -a claude-code

2Manually: put the files in place

~/.claude/skills/setup/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/setup/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about setup

How do I install setup in Claude Code?

Run npx skills add nizos/tdd-guard --skill setup -a claude-code, then check ~/.claude/skills/setup/SKILL.md.

What does setup do?

It detects the project’s test framework, installs or updates the matching TDD Guard reporter, and configures or migrates its settings. Its changes are limited to the TDD Guard reporter.

What happens when the project uses multiple test frameworks?

The skill asks you to choose which framework to configure. It does not select one on its own.

Source text

SKILL.md · MIT
---
description: Set up or update TDD Guard for the current project. Detects the test framework, installs or updates the matching reporter, and configures or migrates its configuration to match the current specification.
disable-model-invocation: true
allowed-tools: [Read, Glob, Grep]
---

# TDD Guard Setup

Set up TDD Guard for the current project. Your goal is to:

1. Identify the test framework(s) used in this project
2. Install the matching TDD Guard reporter, or update it if already present
3. Configure the reporter, or migrate an existing configuration to match the current specification

## Reporter packages

| Framework | Reporter package                                         | Registry   |
| --------- | -------------------------------------------------------- | ---------- |
| Vitest    | tdd-guard-vitest                                         | npm        |
| Jest      | tdd-guard-jest                                           | npm        |
| Storybook | tdd-guard-storybook                                      | npm        |
| pytest    | tdd-guard-pytest                                         | PyPI       |
| PHPUnit   | tdd-guard/phpunit                                        | Packagist  |
| Go        | github.com/nizos/tdd-guard/reporters/go/cmd/tdd-guard-go | go install |
| Rust      | tdd-guard-rust                                           | crates.io  |
| RSpec     | tdd-guard-rspec                                          | RubyGems   |
| Minitest  | tdd-guard-minitest                                       | RubyGems   |

## Reporter configuration

All reporters write test results to `.claude/tdd-guard/data/test.json` relative to the project root.

**Vitest** — Add the reporter entry to the `reporters` array with `projectRoot` in the options object.

```typescript
reporters: [
  'default',
  ['tdd-guard-vitest', { projectRoot: '/absolute/path/to/project' }],
]
```

**Jest** — Add reporter entry to the `reporters` array with `projectRoot` option.

```typescript
reporters: [
  'default',
  ['tdd-guard-jest', { projectRoot: '/absolute/path/to/project' }],
]
```

**Storybook** — Construct `StorybookReporter` in `.storybook/test-runner.ts` and wire it into the `postVisit` hook.

```typescript
// .storybook/test-runner.ts
import { StorybookReporter } from 'tdd-guard-storybook'

const reporter = new StorybookReporter({
  projectRoot: '/absolute/path/to/project',
})

module.exports = {
  async postVisit(page, context) {
    await reporter.onStoryResult(context)
  },
}

process.on('exit', () => {
  reporter.onComplete()
})
```

**pytest** — Set `tdd_guard_project_root` in pytest config (`pyproject.toml`, `pytest.ini`, or `setup.cfg`).

```toml
[tool.pytest.ini_options]
tdd_guard_project_root = "/absolute/path/to/project"
```

**PHPUnit** — Add extension (PHPUnit 10+) or listener (PHPUnit 9.x) to `phpunit.xml` with project root path.

```xml
<!-- PHPUnit 10+ -->
<extensions>
    <bootstrap class="TddGuard\PHPUnit\TddGuardExtension">
        <parameter name="projectRoot" value="/absolute/path/to/project"/>
    </bootstrap>
</extensions>

<!-- PHPUnit 9.x -->
<listeners>
    <listener class="TddGuard\PHPUnit\TddGuardListener">
        <arguments>
            <string>/absolute/path/to/project</string>
        </arguments>
    </listener>
</listeners>
```

**Go** — Add a test target using the piped command below. Update an existing Makefile, Taskfile, or similar build system if one exists.

```bash
go test -json ./... 2>&1 | tdd-guard-go -project-root /absolute/path/to/project
```

**Rust** — Add a test target using the piped command below. Update an existing Makefile, Taskfile, or similar build system if one exists.

```bash
cargo nextest run 2>&1 | tdd-guard-rust --project-root /absolute/path/to/project --passthrough
```

**RSpec** — Add the formatter to `.rspec` and set `TDD_GUARD_PROJECT_ROOT` environment variable to the absolute project root path.

```
--format TddGuardRspec::Formatter
```

```bash
export TDD_GUARD_PROJECT_ROOT="/absolute/path/to/project"
```

**Minitest** — Require `tdd_guard_minitest/autorun` from `test/test_helper.rb` (or pass `-rtdd_guard_minitest/autorun` via `Rake::TestTask` ruby_opts) and set `TDD_GUARD_PROJECT_ROOT` to the absolute project root path.

```ruby
# test/test_helper.rb
require "tdd_guard_minitest/autorun"
```

```bash
export TDD_GUARD_PROJECT_ROOT="/absolute/path/to/project"
```

## Guidelines

Your scope is limited to installing, updating, configuring, and migrating a TDD Guard reporter. Do not make changes beyond that.

- **Always use absolute paths** when configuring the project root in reporters.
- **Do not install, update, or modify test frameworks**, build tools, or any other project dependencies. Only install or update the TDD Guard reporter itself.
- **Do not modify existing test configuration** beyond the TDD Guard reporter entry. Migrate any drifted reporter configuration to match the current specification, preserving the user's project root value and leaving unrelated entries untouched. If the existing configuration cannot be migrated without guessing — for example, because it is wrapped in user-defined code or intermingled with custom logic — inform the user and let them decide.
- **If a TDD Guard reporter is already installed and its configuration matches this skill's specification**, inform the user that everything is up to date and stop.
- **If multiple frameworks are detected**, ask the user which to configure.
- **If something goes wrong or is unclear**, inform the user rather than attempting to fix it. Do not install additional packages or make extra changes to resolve issues.

## After setup

Once complete, inform the user of what was done and that:

- TDD Guard validates changes against TDD principles
- They can type `tdd-guard off` / `tdd-guard on` to toggle it mid-session
- They can customize validation rules by editing `.claude/tdd-guard/data/instructions.md`
- More help and configuration options are available at https://github.com/nizos/tdd-guard

© nizos · MIT · nizos/tdd-guard

Similar skills

All skills for Testing and QA →

setup by other authors comes first.

setup Alireza Rezvani Sets up an autoresearch experiment by collecting its target file, evaluation command, metric, and optimization direction. Use it before starting an optimization loop. 1,480installs setup aws This skill kicks off the connection setup for AWS DevOps Agent and AWS Security Agent. Reach for it when MCP tools go missing or you are wiring the toolkit up for the first time. CX Codex +1 1,500installs setup marketcalls Sets up a Python backtesting environment with VectorBT and OpenAlgo. It configures the virtual environment, installs dependencies, and prepares .env. CX Codex +1 2,000installs setup assistant-ui This skill guides assistant-ui project creation, setup in an existing app, and runtime selection. Use it when starting a chat UI or wiring one to a backend. CX Codex +1 6,100installs setup aladicf Scans project files and asks UX questions to capture audience, brand personality, and UI defaults into .better-web-ui.md. CX Codex +1 605installs improve-codebase-architecture Matt Pocock This skill scans a codebase for architectural friction, then builds a visual HTML report with refactoring candidates. Use it before a deeper architecture review. 1,163,035installs design-taste-frontend Leonxlnx This skill directs the design of public pages and work screens, then checks the result in a browser through screenshots. Use it when an interface feels generic or unfinished. CX Codex +1 678,700installs tdd Matt Pocock Guides the red-green TDD loop: ensures tests are written first, keep them at public interfaces, and avoid coupling to implementation details. 1,141,062installs skill-creator official anthropics Creates and refines skills, then tests them with prompts, evaluations, and performance checks. 414,180installs agent-browser vercel-labs A CLI skill for browser control: it opens pages, fills forms, clicks buttons, and tests web apps. Use it when an agent needs to act inside a website. CX Codex +1 1,200,000installs prototype Matt Pocock Creates throwaway prototypes for checking state logic or exploring UI before committing the decision to the main codebase. 986,201installs

From the same set2

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor