用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/kmshihab7878/claude-code-setup --skill test-driven-development命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
Anti-over-engineering guardrail that activates when an AI coding agent expands scope, adds abstractions, or changes files the user did not request.
Write JavaScript code in n8n Code nodes. Use when writing JavaScript in n8n, using $input/$json/$node syntax, making HTTP requests with $helpers, working with dates using DateTime, troubleshooting Code node errors, or choosing between Code node modes.
Complete n8n skill — workflow building, node configuration, JavaScript/Python code nodes, expression syntax, validation, MCP tools, credentials, administration, Docker deployment, backup/restore, internal API, and troubleshooting. Auto-triggers on any n8n task including workflow creation, node configuration, code nodes, expressions, validation errors, credential management, instance administration, n8n setup, n8n upgrade, n8n backup, and n8n API usage.
基于 SOC 职业分类
正在显示 SKILL.md
| name | Test-Driven Development |
| description | Guidance for using a red-green-refactor cycle before changing production behavior. |
No production code without a failing test. RED-GREEN-REFACTOR, every time.
Before writing ANY production code, you MUST:
If you catch yourself writing production code first, STOP immediately, delete it, and write the test.
1. Identify the smallest unit of behavior to implement
2. Write a test that asserts the expected behavior
3. Run the test
4. VERIFY: The test MUST fail (if it passes, your test is wrong or the feature already exists)
5. Show the failure output to confirm RED state
What to test: The public interface, not implementation details. Test behavior, not structure.
1. Write the MINIMUM code to make the failing test pass
2. Do not add extra logic, error handling, or optimizations yet
3. Run the test
4. VERIFY: The test MUST pass
5. Show the pass output to confirm GREEN state
Minimum means minimum: If a hardcoded return value makes the test pass, that's valid for GREEN. The next RED cycle will force generalization.
1. Improve the code WITHOUT changing behavior
2. Remove duplication, improve naming, extract helpers
3. Run ALL tests (not just the new one)
4. VERIFY: All tests still pass
5. Show the test output to confirm no regressions
| Excuse | Response |
|---|---|
| "It's too small for a test" | If it's too small for a test, it's too small to get wrong. Write the test. |
| "I'll add tests after" | Tests written after are verification, not design. Write the test first. |
| "The code is obvious" | Obvious code still needs a test to prevent regression. Write the test. |
| "Testing this is hard" | Hard-to-test code is a design smell. Refactor for testability. |
| "There's no test framework set up" | Set it up. That's part of the task. |
| "The user didn't ask for tests" | TDD is a Non-Negotiable (#6). Tests are not optional. |
context7 MCP to look up framework-specific testing patterns (pytest, jest, vitest, etc.)testing-methodology skill for test strategy decisions (unit vs integration)confidence-check skill before starting TDD if approach is uncertainverification-before-completion evidence requirementEach RED-GREEN-REFACTOR cycle should be 2-5 minutes. If a cycle takes longer:
TDD applies to production code. It does NOT apply to:
The user can override with explicit instruction: "skip TDD for this" or --skip-gate.