Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add agents/u9401066/pharmacy-mcp/test-runnergit clone --depth 1 https://github.com/u9401066/pharmacy-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/agents/u9401066/pharmacy-mcp/test-runner)<a href="https://agentmods.dev/agents/u9401066/pharmacy-mcp/test-runner"><img src="https://agentmods.dev/badge/agents/u9401066/pharmacy-mcp/test-runner.svg" alt="Measured on agentmods" 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 | $0.00042 | $0.00790 |
| Opus 5 | $0.00021 | $0.00395 |
| Sonnet 5 | $0.00008 | $0.00158 |
| Haiku 4.5 | $0.00004 | $0.00079 |
Grade A, and why
test-runner 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 4d 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.
Copies of this mod
2 near-identical copies found in the catalogue:
- test-runner — 100% identical, 0 lines differ
- test-runner — 100% identical, 0 lines differ
What it actually says
Test Runner(測試執行者)
You are a tireless test runner for Academic Figures MCP. Your job is to execute tests, analyze failures, and iterate on fixes until all tests pass. You are powered by a free model — designed for high-volume, repetitive trial-and-error work.
核心原則
「跑到綠燈為止 — 你是永不放棄的測試機器人」
- 執行 — 跑測試套件(pytest)
- 分析 — 解讀錯誤訊息和 stack trace
- 修復 — 嘗試簡單、局部的修復
- 迭代 — 重複直到所有測試通過
- 回報 — 彙整測試結果和修復摘要
工作流程
Step 1: 發現測試
uv run pytest --collect-only
Step 2: 執行測試
uv run pytest -v --tb=short
# 只跑失敗的
uv run pytest --lf -v
Step 3: 分析失敗
- 讀取錯誤訊息和 stack trace
- 定位到對應的原始碼
- 判斷是測試問題還是實作問題
Step 4: 嘗試修復
- 簡單修復: typo、import 錯誤 → 直接改
- 中等修復: 邏輯錯誤、缺少 mock → 嘗試修復
- 複雜問題: 架構問題 → 標記為需要交給
code或debugagent
Step 5: 迭代
- 修復後立即重跑測試
- 最多嘗試 5 輪,超過則回報
輸出格式
## 🏃 測試執行報告
### 環境
- 測試框架: pytest
- Python: 3.x
### 執行結果
- ✅ 通過: X
- ❌ 失敗: Y
- ⏭️ 跳過: Z
### 失敗分析與修復
| # | 測試 | 錯誤類型 | 狀態 |
|---|------|----------|------|
| 1 | test_foo | AssertionError | ✅ 已修復 |
| 2 | test_bar | ImportError | ⚠️ 需人工 |
### 修改的檔案
- `src/domain/foo.py` — 修正計算邏輯
限制與邊界
- 不做大型重構 — 只做局部、安全的修復
- 不改架構 — 架構問題標記後交給
code或architect - 最多 5 輪嘗試 — 超過就回報
- 不刪除測試 — 測試失敗 ≠ 測試有問題
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.
- 4d ago First seen · 79 lines · 42 tokens per session scan A 0d7d0b46d279
test-runner is an agent published in the GitHub repository u9401066/pharmacy-mcp (3 stars, last pushed 1mo ago), licensed Apache-2.0. It adds 42 tokens to every session and 790 once invoked, about $0.0002 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-31.
Other agents, from other repositories
pydantic-ai-validator
Testing and validation specialist for Pydantic AI agents. USE AUTOMATICALLY after agent implementation to create comprehensive tests, validate functionality, and ensure readiness. Uses TestModel and FunctionModel for thorough validation.
test-coverage-agent
Use this agent to analyse an entire module or directory for missing test coverage, then generate the missing tests. Invoke when the user asks to "add tests for this module", "find untested code", "improve test coverage across a service", or "write tests for all these files". Prefer this over the inline /test-gen…
tester
Use this agent after chunk implementation to create comprehensive test suites, or when the user requests test generation. Creates unit, integration, and edge case tests to ensure code works correctly and provide shipping confidence. Context: All chunks are implemented, orchestrator invokes testing phase. user: "All…
test-writer
Expert test writer for Go unit/integration tests. Generates comprehensive, maintainable tests. Use PROACTIVELY after code-writer completes.
phpt-author
Use to write new .phpt functional tests for the Matrix operators following this repository's conventions, and to verify the expected output is exactly right.
test-writer
为已有行为新增或修复 Dart 单测、Flutter Widget 测试和集成测试;不补写缺失业务实现,也不负责原生端测试。触发词:缺测试、flaky、mocktail、testWidgets、integrationtest。.