Borrowing it
Nothing to install: this file belongs to u9401066/rootcause-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/u9401066/rootcause-mcp/master/.claude/skills/test-generator/SKILL.mdgit clone --depth 1 https://github.com/u9401066/rootcause-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/skills/u9401066/rootcause-mcp/test-generator)<a href="https://agentmods.dev/skills/u9401066/rootcause-mcp/test-generator"><img src="https://agentmods.dev/badge/skills/u9401066/rootcause-mcp/test-generator/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/skills/u9401066/rootcause-mcp/test-generator"><img src="https://agentmods.dev/badge/skills/u9401066/rootcause-mcp/test-generator.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.00000 | $0.05379 |
| Opus 5.5 | $0.00000 | $0.02152 |
| Sonnet 5.5 | $0.00000 | $0.01076 |
| Haiku 4.5 | $0.00000 | $0.00538 |
Grade A, and why
test-generator 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 1mo 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.
This is a copy
100% identical to test-generator — 0 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.
How it starts
The opening of the file, as written. The whole thing — 730 lines — stays where its author put it; the contents beside it link to each section on GitHub.
測試生成技能
描述
為指定的程式碼自動生成完整測試套件,包含靜態分析、單元測試、整合測試及覆蓋率報告。
觸發條件
- 「生成測試」、「寫測試」、「test this」
- 「建立單元測試」、「建立整合測試」
- 「靜態分析」、「type check」
- 「覆蓋率」、「coverage」
測試金字塔
/\
/ \ E2E Tests (少量)
/----\
/ \ Integration Tests (中等)
/--------\
/ \ Unit Tests (大量)
/------------\
/ Static Analysis (基礎)
Python 測試策略
1️⃣ 靜態分析 (Static Analysis)
工具配置
| 工具 | 用途 | 配置檔 |
|---|---|---|
| mypy | 類型檢查 | pyproject.toml / mypy.ini |
| ruff | Linting + Formatting (取代 pylint/flake8/black) | pyproject.toml |
| bandit | 安全性掃描 | .bandit |
| vulture | 死碼檢測 (dead code) | pyproject.toml |
vulture 配置範例
# pyproject.toml
[tool.vulture]
min_confidence = 80
paths = ["src"]
exclude = ["tests/", "**/migrations/"]
ignore_names = ["visit_*", "do_*"] # 常見動態呼叫的 patterns
vulture 執行指令
# 基本掃描
vulture src/ --min-confidence 80
# 生成白名單
vulture src/ --make-whitelist > .vulture_allowlist.py
# 使用白名單掃描
vulture src/ .vulture_allowlist.py --min-confidence 80
vulture 白名單範例
# .vulture_allowlist.py
# 此檔案用於標記 vulture 誤判的「假陽性」
# Framework callbacks (動態呼叫)
_.on_startup # unused method
_.on_shutdown # unused method
_.setup # unused method
# CLI entry points
_.main # unused function
# Test fixtures (pytest)
_.fixture_* # unused function
# Abstract methods
_.abstract_method # unused method
mypy 配置範例
# pyproject.toml
[tool.mypy]
python_version = "3.11"
strict = true
warn_return_any = true
warn_unused_ignores = true
disallow_untyped_defs = true
disallow_incomplete_defs = true
check_untyped_defs = true
no_implicit_optional = true
[[tool.mypy.overrides]]
module = ["tests.*"]
disallow_untyped_defs = false
ruff 配置範例
# pyproject.toml
[tool.ruff]
target-version = "py311"
line-length = 88
select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # pyflakes
"I", # isort
"B", # flake8-bugbear
"C4", # flake8-comprehensions
"UP", # pyupgrade
"ARG", # flake8-unused-arguments
"SIM", # flake8-simplify
]
ignore = ["E501"] # line too long (handled by formatter)
[tool.ruff.isort]
known-first-party = ["src"]
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.
- 1mo ago First seen · 730 lines · 0 tokens per session scan A 5d7d55c3f567
test-generator is a skill published in the GitHub repository u9401066/rootcause-mcp (0 stars, last pushed 1mo ago), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 5,379 tokens. A static security scan graded it A with 0 findings. It is 100% identical to test-generator, differing in 0 lines, and is treated as a copy.
Other skills, from other repositories
test-generator
A test-suite generation workflow for software projects. It includes static checks, unit tests, integration tests, end-to-end tests, coverage reports, type checking, linting, security scanning, and dead-code detection.
testing-symfony
Stratégie de Tests Symfony 8.1 / PHP 8.5. Use when writing tests, reviewing test coverage, or setting up testing.
testing-python
Stratégie de Tests Python 3.14+. Use when writing tests, reviewing test coverage, or setting up testing.
testing-reactnative
Testing React Native 0.87+. Use when writing tests, reviewing test coverage, or setting up testing.
testing-strategy
Write comprehensive test suites with proper structure, mocking strategies, fixtures, and coverage goals. Use when implementing unit tests, integration tests, or e2e tests. Triggers on: tests, testing, unit test, integration test, e2e, jest, vitest, pytest, mocking, TDD.
tsq-testing
A guide to planning and writing software tests, including unit tests, integration tests, end-to-end tests, test coverage, and the Given-When-Then format. TDD means writing a failing test, making it pass with the smallest change, then cleaning up the code.