med-paper-assistant: Skill for Claude Code

.claude/skills/test-generator/SKILL.md

test-generator is a skill for Claude Code from u9401066/med-paper-assistant. It costs 60 tokens per session (510 once invoked), scanned A, original, Apache-2.0.

A Python testing and code-quality workflow covering unit, integration, and end-to-end tests. It also uses tools to check formatting, types, security issues, unused code, and test coverage.

In plain words
What is it for?
Use it to organise tests under unit, integration, and browser-based end-to-end directories, and to run the listed checks with uv and pytest. It includes examples for normal cases, edge cases, error handling, parameterised tests, and coverage checks.
Why use it?
It helps catch incorrect behaviour, boundary cases, errors, type problems, security risks, and code that is no longer used. The checks can be run separately for each testing level.

Skill for Claude Code

Written for Claude Code: installed under .claude/.

This is u9401066/med-paper-assistant's own configuration. It tells Claude Code how to work on med-paper-assistant itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything med-paper-assistant configures →

Reuse

Borrowing it

Nothing to install: this file belongs to u9401066/med-paper-assistant. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/u9401066/med-paper-assistant/master/.claude/skills/test-generator/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/u9401066/med-paper-assistant

Made for: Claude Code.

Wrote 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.

agentmods badge for test-generator

README.md
[![agentmods](https://agentmods.dev/badge/skills/u9401066/med-paper-assistant/test-generator/github.svg)](https://agentmods.dev/skills/u9401066/med-paper-assistant/test-generator)
Your own site
<a href="https://agentmods.dev/skills/u9401066/med-paper-assistant/test-generator"><img src="https://agentmods.dev/badge/skills/u9401066/med-paper-assistant/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.

agentmods 80×15 button for test-generator

Your own site · 80×15
<a href="https://agentmods.dev/skills/u9401066/med-paper-assistant/test-generator"><img src="https://agentmods.dev/badge/skills/u9401066/med-paper-assistant/test-generator.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 60 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 510 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00060 $0.00510
Opus 5 $0.00030 $0.00255
Sonnet 5 $0.00012 $0.00102
Haiku 4.5 $0.00006 $0.00051

Measured 9d ago against content hash 4e4824141851, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

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 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.

.claude/skills/test-generator/SKILL.md · 57 lines

What it actually says

測試生成技能

靜態分析

工具 用途 命令
ruff Linter + Formatter uv run ruff check src/ --fix && uv run ruff format src/
mypy 類型檢查 uv run mypy src/ --ignore-missing-imports
bandit 安全掃描 uv run bandit -r src/ -ll
vulture 死代碼檢測 uv run vulture src/ --min-confidence 80

完整:uv run ruff check src/; uv run mypy src/ --ignore-missing-imports; uv run bandit -r src/ -ll


測試金字塔

層級 工具 目錄
Unit pytest tests/unit/
Integration pytest + httpx tests/integration/
E2E playwright tests/e2e/
Coverage pytest-cov 目標 ≥80%

單元測試必涵蓋

  1. Happy Path — 正常流程
  2. Edge Cases — 邊界條件
  3. Error Handling — pytest.raises
  4. Parametrize — @pytest.mark.parametrize

執行命令

pytest tests/unit -v                          # 單元
pytest tests/integration -v -m integration    # 整合
pytest --cov=src --cov-report=term-missing --cov-fail-under=80  # 覆蓋率

Checklist

  • Happy path + edge cases + error handling
  • Fixtures 設定(conftest.py)
  • 覆蓋率 ≥ 80%
  • CI workflow 整合
Changes

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.

  1. 9d ago First seen · 57 lines · 60 tokens per session scan A 4e4824141851

Subscribe to this mod's changes

test-generator is a skill published in the GitHub repository u9401066/med-paper-assistant (12 stars, last pushed 8d ago), licensed Apache-2.0. It adds 60 tokens to every session and 510 once invoked, about $0.0003 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.