Borrowing it
Nothing to install: this file belongs to shenjingnan/home-mcp. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/shenjingnan/home-mcp/main/.claude/commands/fix-test-case.mdgit clone --depth 1 https://github.com/shenjingnan/home-mcpWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/commands/shenjingnan/home-mcp/fix-test-case)<a href="https://agentmods.dev/commands/shenjingnan/home-mcp/fix-test-case"><img src="https://agentmods.dev/badge/commands/shenjingnan/home-mcp/fix-test-case/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/commands/shenjingnan/home-mcp/fix-test-case"><img src="https://agentmods.dev/badge/commands/shenjingnan/home-mcp/fix-test-case.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00007 | $0.00357 |
| Opus 5 | $0.00003 | $0.00179 |
| Sonnet 5 | $0.00001 | $0.00071 |
| Haiku 4.5 | $0.00001 | $0.00036 |
Grade A, and why
fix-test-case scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 9d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
What it actually says
$1
我在执行单元测试时,发现测试文件 <failed-test-file> 中有失败的测试用例。请帮我完成以下任务:
-
执行测试并分析失败原因:
- 运行指定的测试文件,获取详细的错误信息和堆栈跟踪
- 分析每个失败测试用例的具体失败原因(断言失败、Mock配置问题、测试数据问题等)
- 检查相关源代码是否有变更导致测试逻辑不再适用
-
制定修复方案:
- 根据失败原因确定是需要修复测试代码还是源代码
- 如果是测试代码问题,更新测试逻辑、断言或Mock配置
- 如果是源代码问题,修复源代码逻辑错误
- 确保修复不会影响其他测试用例
-
实施修复并验证:
- 按照修复方案逐一实施修复
- 每次修复后立即运行测试验证效果
- 确保所有原失败的测试用例现在都能通过
- 运行完整测试套件确保没有引入新的失败
-
代码质量检查:
- 执行
pnpm check:fix进行代码规范检查 - 执行
pnpm type:check进行类型检查 - 修复任何代码规范或类型问题
- 执行
请提供详细的失败原因分析和修复过程说明。
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 9d ago First seen · 33 lines · 7 tokens per session scan A 2ecb68361be4
fix-test-case is a command published in the GitHub repository shenjingnan/home-mcp (21 stars, last pushed 7mo ago), licensed MIT. It adds 7 tokens to every session and 357 once invoked, about $0.0000 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other commands, from other repositories
test-tdd
Run when user calls /test-tdd. Scans modified files, locates their corresponding unit/integration test suites, and runs them.
kill-mutants
Analyze surviving mutants from a mutation testing run and write targeted unit tests to kill them. Re-runs mutations to confirm kills.
lg:node
Create, modify, and manage nodes in LangGraph graphs including LLM nodes, tool nodes, human-in-the-loop, subgraphs, and conditional nodes.
test
Execute a comprehensive test run for the following target.
frappe-test
Run unit and integration tests for Frappe apps with coverage reports.
implement-fix
Minimal pipeline for test-fixing tasks.