360 Secure SkillHub
360 安全技能中心

Tdd Helper

轻量级 TDD 流程助手,用脚本包装待执行任务:测试缺失或失败即中止,拒绝先运行产品代码,并可选将 lint 警告视为错误予以阻断;支持通过环境变量或 JSON 配置。测试用例与运行环境需用户自备。

分类:开发
cerbug45
cerbug45
热度 49.04
最近更新 2026-05-17 12:14:18

安装

发给 Agent
帮我安装这个技能:npx secure-skills-cli add cerbug45/agents-skill-tdd-helper
兼容性
通用兼容
联网要求
不联网
数据出网
数据不出本机
Metadata
name
tdd-helper
description
Lightweight helper to enforce TDD-style loops for non-deterministic agents.
metadata
{"openclaw":{"requires":{"bins":["python3","pytest"]},"category":"development"}}

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

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