TopRank Skills

Home / Claw Skills / 其他 / tdd-helper
Official OpenClaw rules 15%

tdd-helper

Lightweight helper to enforce TDD-style loops for non-deterministic agents.

Stars

0

Installs

0

Status

ACTIVE

Visibility

PUBLIC

安装方式

直接复制以下提示词,发送给你的 AI 助手即可完成安装。

请先检查是否已安装 SkillHub 商店,若未安装,请根据 https://skillhub-1388575217.cos.ap-guangzhou.myqcloud.com/install/skillhub.md 安装 SkillHub 商店,然后安装 tdd-helper 技能。 若已安装,则直接安装 tdd-helper 技能。

Overview

Skill Key
cerbug45/agents-skill-tdd-helper
Author
cerbug45
Source Repo
openclaw/skills
Version
-
Source Path
skills/cerbug45/agents-skill-tdd-helper
Latest Commit SHA
d2ac904017560422051e1358dd45b46e4f403927

Extracted Content

SKILL.md excerpt

# tdd-helper

Lightweight helper to enforce TDD-style loops for non-deterministic agents.

## Features
- `tdd.py` wraps a task: fails if tests are absent or failing, refuses to run "prod" code first.
- Watches for lint/warnings (optional) and blocks on warnings-as-errors.
- Simple config via env or JSON.

## Usage
```bash
# Define tests in tests/ or specify via --tests
python tdd.py --tests tests/ --run "python your_script.py"
```

README excerpt

# Skill: tdd-helper (forcing function for agents)

Lightweight helper to enforce TDD-style loops for non-deterministic agents.

## Features
- `tdd.py` wraps a task: fails if tests are absent or failing, refuses to run "prod" code first.
- Watches for lint/warnings (optional) and blocks on warnings-as-errors.
- Simple config via env or JSON.

## Usage
```bash
# Define tests in tests/ or specify via --tests
python tdd.py --tests tests/ --run "python your_script.py"
```

If tests fail or missing -> stops. If tests pass -> runs the command.

## Config
- `--tests` path (default: tests/)
- `--run` command to execute after tests are green
- `WARN_AS_ERROR=1` to block on pylint/ruff warnings (optional hook)

## Why
For agents whose output varies, TDD is the forcing function to keep quality deterministic: red → green → refactor. This helper makes “no tests, no run” the default.

Related Claw Skills