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 skills add yu-iskw/coding-agent-fabric --skill test-and-fixgit clone --depth 1 https://github.com/yu-iskw/coding-agent-fabricWrote 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/yu-iskw/coding-agent-fabric/test-and-fix)<a href="https://agentmods.dev/skills/yu-iskw/coding-agent-fabric/test-and-fix"><img src="https://agentmods.dev/badge/skills/yu-iskw/coding-agent-fabric/test-and-fix.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.1 | $0.00041 | $0.00489 |
| Opus 5 | $0.00020 | $0.00244 |
| Sonnet 5 | $0.00008 | $0.00098 |
| Haiku 4.5 | $0.00004 | $0.00049 |
Grade A, and why
test-and-fix 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.
This is a copy
100% identical to test-and-fix — 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.
What it actually says
Test and Fix Loop
Purpose
An autonomous loop for the agent to identify, analyze, and fix failing unit tests using Vitest.
Loop Logic
- Identify: Run
pnpm testto identify failing tests. - Analyze: Examine the test output to determine:
- The failing test file and line number.
- The expected vs actual values.
- Refer to ../common-references/troubleshooting.md for common test failure patterns.
- Fix: Apply the minimum necessary change to either the source code (if it's a bug) or the test code (if the test is outdated).
- Verify: Re-run
pnpm test.- If passed: Move to the next failing test or finish if all are resolved.
- If failed: Analyze the new failure (or the same one if the fix was insufficient) and repeat the loop.
Termination Criteria
- All tests pass (as reported by
pnpm test). - Reached max iteration limit (default: 5).
- The error persists after multiple distinct fix attempts, indicating a need for human intervention or a broader architectural change.
Examples
Scenario: Fixing a logic error
pnpm testfails inpackages/common/src/math.test.tsbecauseadd(2, 2)returned5.- Agent analyzes
packages/common/src/math.tsand finds a typoa + b + 1. - Agent fixes the typo to
a + b. pnpm testpasses.
Scenario: Updating a test after a deliberate change
pnpm testfails because a UI component's text changed from "Submit" to "Confirm".- Agent confirms the change was intentional.
pnpm testpasses.
Resources
- pnpm Commands for Node.js: Common commands for testing and managing dependencies.
- Testing Best Practices: Project-specific testing guidelines.
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.
- 6d ago First seen · 49 lines · 41 tokens per session scan A fad7ac48f637
test-and-fix is a skill published in the GitHub repository yu-iskw/coding-agent-fabric (1 stars, last pushed 6d ago), licensed Apache-2.0. It adds 41 tokens to every session and 489 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-and-fix, differing in 0 lines, and is treated as a copy.
Other skills, from other repositories
testing
Use when writing or reviewing Flutter/Dart tests (unit, widget, golden), fixing flaky tests, adding coverage, or choosing between unit and widget tests.
mockito
Use when generating mocks, stubbing methods, verifying interactions, capturing arguments, or choosing between mocks, fakes, and real objects (Mockito).
mocktail
Use when creating mocks, stubbing methods, verifying interactions, registering fallback values, or choosing between mocks, fakes, and real objects (Mocktail).
component-creation
Step-by-step workflow for creating accessible, tested UI components. Use when the user asks to create a new UI component.
iterate-agent-harness
Turn an agent failure—premature stop, false completion, gamed check, missed file, broken handoff—into a durable rule/skill/hook/CI guard plus regression test. Use when "the agent stopped early again", "it gamed the test", or "add a guard so this doesn't recur". App bugs → workflow-fix-and-ship.
coverage-improvement
Systematic workflow for identifying coverage gaps and writing missing tests. Use when coverage is below target or the user asks to improve coverage.