基于 SOC 职业分类
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/glawson6/jaiclaw --skill test-driven-development命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
正在显示 SKILL.md
This skill should be used when the user asks to "draw a diagram", "show a status box", "render ASCII art", "make a callout", "wrap text in a box", "plot these numbers", or any request involving boxed messages, two-box-and-arrow diagrams, scatter plots, or tables rendered as ASCII. Uses JBang to invoke the JaiClaw ASCII renderer; do not hand-draw borders character-by-character.
Render domain objects (events, tasks, tickets, orders, …) as framed monospaced ASCII via the render_response tool. Follow the fidelity rules exactly — do not paraphrase, transliterate, forge, or strip borders from tool output.
End-to-end validation of JaiClaw bootstrap, scaffolding, build, runtime, and Docker CLI images. Tests quickstart.sh, project creation from Maven releases, provider connectivity, CLI launcher, and Docker image builds.
| name | test-driven-development |
| description | Enforce RED-GREEN-REFACTOR TDD cycle |
| alwaysInclude | false |
| requiredBins | [] |
| platforms | ["darwin","linux"] |
| version | 1.0.0 |
| tenantIds | [] |
Follow the strict RED → GREEN → REFACTOR cycle when writing code. Every behavioral change starts with a failing test.
┌──────────┐ ┌──────────┐ ┌──────────┐
│ RED │────▶│ GREEN │────▶│ REFACTOR │
│ │ │ │ │ │
│ Write a │ │ Write │ │ Clean up │
│ failing │ │ minimal │ │ without │
│ test │ │ code to │ │ changing │
│ │ │ pass │ │ behavior │
└──────────┘ └──────────┘ └──────────┘
▲ │
└────────────────────────────────┘
# Run the test and confirm it FAILS
ShellExec: pytest tests/test_feature.py::test_new_behavior -x
The failure message should clearly indicate the missing behavior, not an infrastructure problem.
# Run ALL tests to verify nothing broke
ShellExec: pytest tests/ -x
# Confirm refactor is safe
ShellExec: pytest tests/ -x
test_login_rejects_expired_token over test_login_3.Move to the next RED phase when:
Progress from simple to complex:
When a hardcoded return passes a test, add a second test with different inputs to force generalization:
# Test 1: passes with hardcoded return "fizz"
def test_fizzbuzz_3():
assert fizzbuzz(3) == "fizz"
# Test 2: forces real implementation
def test_fizzbuzz_6():
assert fizzbuzz(6) == "fizz"
| Anti-Pattern | Problem |
|---|---|
| Writing tests after code | Tests confirm what you wrote, not what you need |
| Multiple failing tests at once | Lose focus, unclear which behavior to implement next |
| Skipping REFACTOR | Technical debt accumulates immediately |
| Testing implementation details | Tests break on refactor, defeating the purpose |
| Large steps | Each cycle should take minutes, not hours |