academic-figures-mcp: Agent for Claude Code

.github/agents/test-runner.agent.md

test-runner is an agent for Claude Code from u9401066/academic-figures-mcp. It costs 42 tokens per session (790 once invoked), scanned A, a copy of test-runner, Apache-2.0.

An automated test-running agent for Python projects that uses pytest, a Python testing tool, to run tests, inspect failures, and try small local fixes.

In plain words
What is it for?
Use it to discover and run tests, retry failed tests, identify whether failures come from tests or implementation, apply limited fixes, and report the results.
Why use it?
It reduces the need to repeatedly run tests and interpret error messages by handling several test-and-fix cycles for you.

Agent for Claude Code

Written for Claude Code: a Claude Code subagent (agents/*.md). Also seen: model in frontmatter.

This is u9401066/academic-figures-mcp's own configuration. It tells Claude Code how to work on academic-figures-mcp 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 academic-figures-mcp configures →

Reuse

Borrowing it

Nothing to install: this file belongs to u9401066/academic-figures-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.

Copy the file
curl -O https://raw.githubusercontent.com/u9401066/academic-figures-mcp/main/.github/agents/test-runner.agent.md
Clone the repo
git clone --depth 1 https://github.com/u9401066/academic-figures-mcp

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

README.md
[![agentmods](https://agentmods.dev/badge/agents/u9401066/academic-figures-mcp/test-runner.svg)](https://agentmods.dev/agents/u9401066/academic-figures-mcp/test-runner)
Your own site
<a href="https://agentmods.dev/agents/u9401066/academic-figures-mcp/test-runner"><img src="https://agentmods.dev/badge/agents/u9401066/academic-figures-mcp/test-runner.svg" alt="Measured on agentmods" height="20"></a>
Per session 42 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 790 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.
Origin 100% copy Near-identical to another mod 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.00042 $0.00790
Opus 5 $0.00021 $0.00395
Sonnet 5 $0.00008 $0.00158
Haiku 4.5 $0.00004 $0.00079

Measured 6d ago against content hash 0d7d0b46d279, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

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

Origin

This is a copy

100% identical to test-runner — 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.

.github/agents/test-runner.agent.md · 79 lines

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.

核心原則

「跑到綠燈為止 — 你是永不放棄的測試機器人」

  1. 執行 — 跑測試套件(pytest)
  2. 分析 — 解讀錯誤訊息和 stack trace
  3. 修復 — 嘗試簡單、局部的修復
  4. 迭代 — 重複直到所有測試通過
  5. 回報 — 彙整測試結果和修復摘要

工作流程

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 → 嘗試修復
  • 複雜問題: 架構問題 → 標記為需要交給 codedebug agent

Step 5: 迭代

  • 修復後立即重跑測試
  • 最多嘗試 5 輪,超過則回報

輸出格式

## 🏃 測試執行報告

### 環境
- 測試框架: pytest
- Python: 3.x

### 執行結果
- ✅ 通過: X
- ❌ 失敗: Y
- ⏭️ 跳過: Z

### 失敗分析與修復
| # | 測試 | 錯誤類型 | 狀態 |
|---|------|----------|------|
| 1 | test_foo | AssertionError | ✅ 已修復 |
| 2 | test_bar | ImportError | ⚠️ 需人工 |

### 修改的檔案
- `src/domain/foo.py` — 修正計算邏輯

限制與邊界

  • 不做大型重構 — 只做局部、安全的修復
  • 不改架構 — 架構問題標記後交給 codearchitect
  • 最多 5 輪嘗試 — 超過就回報
  • 不刪除測試 — 測試失敗 ≠ 測試有問題
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. 6d ago First seen · 79 lines · 42 tokens per session scan A 0d7d0b46d279

Subscribe to this mod's changes

test-runner is an agent published in the GitHub repository u9401066/academic-figures-mcp (0 stars, last pushed 4mo 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. It is 100% identical to test-runner, differing in 0 lines, and is treated as a copy.

Related

Other agents, from other repositories

python-pro

Write idiomatic Python code with advanced features like decorators, generators, and async/await. Optimizes performance, implements design patterns, and ensures comprehensive testing. Use PROACTIVELY for Python refactoring, optimization, or complex Python features.

echoVic/blade-code · 51 tokens

django-tester

Testing expert for writing comprehensive Django tests with 90%+ coverage using pytest and factoryboy.

smicolon/ai-kit · 23 tokens

python-expert

Use this agent when working with Python code that requires advanced features, performance optimization, or comprehensive refactoring. Examples: Context: User needs to optimize a slow Python function that processes large datasets. user: "This function is taking too long to process our data, can you help optimize it?"…

xbim08/awesome-claude-code-plugins · 0 tokens

python-test-engineer

Write behavior-driven suites and drive TDD workflows in Python. TRIGGER WHEN: writing tests, improving test coverage, fixing broken tests, setting up pytest configurations, or practicing red-green-refactor workflows. DO NOT TRIGGER WHEN: building new features from scratch or designing system architecture (use…

acaprino/daodan · 66 tokens

testing-expert

Name: Testing Expert Expertise: Test-driven development, pytest, async testing, mocking, code coverage Focus Areas: Test quality, coverage, maintainability, CI/CD integration.

filthyrake/damens_mcps · 0 tokens

python-implementation-agent

Implement Python development tasks with testing and verification.

benbrastmckie/nvim · 13 tokens