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 skills/agentsope/skillalchemy/agentsop-test-fix-loopnpx skills add agentsope/SkillAlchemy --skill agentsop-test-fix-loopgit clone --depth 1 https://github.com/agentsope/SkillAlchemyWhat 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.00146 | $0.07743 |
| Opus 5 | $0.00073 | $0.03871 |
| Sonnet 5 | $0.00029 | $0.01549 |
| Haiku 4.5 | $0.00015 | $0.00774 |
Grade A, and why
agentsop-test-fix-loop scanned grade A with 1 finding 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 3d 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.
Runs shell commandslowCapability
Expected in a hook, worth knowing in a rule or an instructions file.
result = subprocess.run( How it starts
The opening of the file, as written. The whole thing — 593 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Test-Fix Loop · SOP
One-liner: The test result IS the next prompt. Wiring the verifier is 20% of the work; framing its output as a useful feedback message is 80%.
1. 何时激活 (Activation Rules)
Activate this skill when any of the following triggers fire:
- The user says "have the agent fix until tests pass", "run lint and tests
automatically", "iterate until green", or invokes
aider --auto-test,cline --yes, or an OpenHands-style headless agent. - The task has a verifiable success command: a non-zero exit code on failure (pytest, ruff, mypy, eslint, tsc, go test, cargo check, npm run build, make check, …).
- You're wrapping a code-editing LLM in a script/CI step and need to decide: when does the agent return?
- The agent just made an edit and the next message in the loop would be "here's what the verifier said".
Do not activate when:
- Success is subjective (writing prose, designing UX). The loop has no feedback signal worth replaying.
- The verifier is slow + interactive (full E2E suite, multi-min builds).
Either async-ify the loop, or run a fast subset (
pytest -x -k changed) in the loop and gate the slow suite at PR review. - The gate is human approval, not a machine check — use the HITL skill.
2. 核心心智模型 (Core Mental Model)
2.1 The test result IS the next prompt
The agent's next turn is conditioned almost entirely on the message you
inject between edit-N and edit-N+1. That message — formatted from
stdout, stderr, exit_code — is the prompt. The framework labels it
"tool result" or "verifier output" but mechanically it is a user-role message
the LM consumes verbatim.
⇒ Framing the feedback dominates the model choice. A 4000-line raw pytest dump prompts a worse fix than a 30-line "first failing test, traceback, the diff you just applied" digest, regardless of the model behind it.
2.2 Four primitives
+-----------------+ +-----------------+ +-----------------+ +-----------------+
| 1. Verifier | | 2. Capture | | 3. Format | | 4. Iteration |
| command | | (stdout + | | feedback | | bound |
| | | stderr + | | message | | |
| - pytest -x | | exit_code) | | - first error | | - max N tries |
| - ruff check | | - timeout cap | | - last K lines | | - escalate / |
| - mypy --strict | | - byte cap | | - drop noise | | commit / skip |
| - eslint . | | - kill on hang | | - keep colors=0 | | |
+-----------------+ +-----------------+ +-----------------+ +-----------------+
What ships with it
4 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
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.
- 3d ago First seen · 593 lines · 146 tokens per session scan A f488ba856d7f
agentsop-test-fix-loop is a skill published in the GitHub repository agentsope/SkillAlchemy (342 stars, last pushed 8d ago), licensed MIT. It adds 146 tokens to every session and 7,743 once invoked, about $0.0007 per session on Opus 5. A static security scan graded it A with 1 finding (runs shell commands). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other skills, from other repositories
shellgames
Play board games on ShellGames.ai — Chess, Poker, Ludo, Tycoon, Memory, and Spymaster. Use when the agent wants to play games against humans or other AI agents, join tournaments, chat with players, check leaderboards, or manage a ShellGames account. Triggers on "play chess/poker/ludo/memory", "shellgames", "join…
curl-search
Web search using curl + multiple search engines (Baidu, Google, Bing, DuckDuckGo). Activates when user asks to search, look up, or query something online. Includes security enhancements: input sanitization, command injection protection, and URL encoding.
skills-vote-local
Use when retrieving the most relevant skills from a local or private skill library instead of relying on network-based skill discovery.
skills-vote
Find the most relevant external agent skills for the current task, then submit grounded feedback about which skills were actually used and useful in the same session. Whenever you start a task, use this skill first.
Use this skill whenever the user wants to do anything with PDF files. This includes reading or extracting text/tables from PDFs, combining or merging multiple PDFs into one, splitting PDFs apart, rotating pages, adding watermarks, creating new PDFs, filling PDF forms, encrypting/decrypting PDFs, extracting images, and…
xlsx
Use this skill any time a spreadsheet file is the primary input or output. This means any task where the user wants to: open, read, edit, or fix an existing .xlsx, .xlsm, .csv, or .tsv file (e.g., adding columns, computing formulas, formatting, charting, cleaning messy data); create a new spreadsheet from scratch or…