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 Firstp1ck/pi-coding-agent-forge --skill skill-refinement-loopgit clone --depth 1 https://github.com/Firstp1ck/pi-coding-agent-forgeWrote 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/firstp1ck/pi-coding-agent-forge/skill-refinement-loop)<a href="https://agentmods.dev/skills/firstp1ck/pi-coding-agent-forge/skill-refinement-loop"><img src="https://agentmods.dev/badge/skills/firstp1ck/pi-coding-agent-forge/skill-refinement-loop/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.
<a href="https://agentmods.dev/skills/firstp1ck/pi-coding-agent-forge/skill-refinement-loop"><img src="https://agentmods.dev/badge/skills/firstp1ck/pi-coding-agent-forge/skill-refinement-loop.svg" alt="Reviewed on agentmods" width="80" 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.00058 | $0.00923 |
| Opus 5.5 | $0.00023 | $0.00369 |
| Sonnet 5.5 | $0.00012 | $0.00185 |
| Haiku 4.5 | $0.00006 | $0.00092 |
Grade A, and why
skill-refinement-loop 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 today.
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.
How it starts
The opening of the file, as written. The whole thing — 98 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Skill Refinement Loop
When to use
Use this skill when the issue is with a Pi skill or skill routing/workflow, for example:
- The user says a skill should have behaved differently.
- A skill-specific test, routing fixture, or evaluator check fails.
- A skill omits required evidence, safety checks, verification, or citations.
- Runtime feedback reveals a reusable failure pattern worth preserving.
Do not use this for ordinary application bugs unless the bug is caused by a skill's instructions, scripts, routing, or validation behavior.
Lifecycle policy
Before proposing production skill edits, enablement, pruning, publishing, or risky lifecycle changes, read the bundled package policy at references/SKILL-LIFECYCLE-POLICY.md when available.
Critical implementation notes
The original MUSE task recommends Task 2 (per-skill memory tools) and Task 3 (skill evaluator) as dependencies. Those may not exist yet. This package deliberately handles that inconsistency with safe fallbacks:
- Per-skill memory is appended directly to
~/.pi/agent/memory/skills/<skill>.md. skill_eval_runis treated as optional; include it in verification when available, otherwise use package tests plus hand-inspected routing checks.- Production skill files are never edited by the tool. The tool writes a proposal file and memory only.
Workflow
- Identify the affected skill and the exact correction/failure.
- Collect evidence: user quote, failing command/test output, prompt, file path, or observed behavior.
- Call
skill_refinement_planwith the skill name, failure, evidence, root-cause hypothesis if known, and a regression test proposal. - Review the generated PATCH.md-style proposal.
- Add/update regression coverage if possible; if not possible, document why.
- Run the skill evaluator if installed; otherwise run the package's tests and inspect routing/contract behavior by hand.
- Apply source changes only after validation and user approval for risky edits.
What ships with it
1 file 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.
- today First seen · 98 lines · 58 tokens per session scan A 62b36461a6f0
skill-refinement-loop is a skill published in the GitHub repository Firstp1ck/pi-coding-agent-forge (96 stars, last pushed yesterday), licensed MIT. It adds 58 tokens to every session and 923 once invoked, about $0.0002 per session on Opus 5.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-12-01.
skill-refinement-loop compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| skill-refinement-loopFirstp1ck/pi-coding-agent-forge | Skill | 96 | yesterday | MIT | A | 58 | Claude Code, Codex |
| smiles-validationsynthetic-sciences/openscience | Skill | 4.5k | 2d ago | Apache-2.0 | A | 24 | Claude Code, Codex |
| convex-component-authoringwaynesutton/convexskills | Skill | 405 | 17d ago | Apache-2.0 | A | 28 | Claude Code, Codex |
| reproduce-bugmarcusrbrown/systematic | Skill | 33 | today | MIT | A | 39 | Claude Code |
| meminfoai-ecoverse/slicc | Skill | 37 | yesterday | Apache-2.0 | A | 64 | Claude Code |
| mandu-lintkonamgil/mandu | Skill | 46 | 13d ago | MPL-2.0 | A | 53 | Claude Code, Codex |
| linkr-qualify-devicercarmo/piclaw-addons | Skill | 25 | yesterday | MIT | A | 39 | Claude Code, Codex |