skill-refinement-loop

skill-refinement-loop is a skill for Claude Code, Codex from Firstp1ck/pi-coding-agent-forge. It costs 58 tokens per session (923 once invoked), scanned A, original, MIT.

A feedback workflow for improving a coding-agent skill after a correction, failed test, unsafe result, or other runtime problem. It records the issue and proposes a structured patch without directly changing the production skill.

In plain words
What is it for?
Use it to analyse problems in a skill's instructions, routing, scripts, tests, safety checks, or evidence requirements and prepare a refinement proposal.
Why use it?
A one-off correction can be forgotten, causing the same skill failure to return. This preserves reusable lessons while keeping proposed changes separate from the live behaviour.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to analyse problems in a skill's instructions, routing, scripts, tests, safety checks, or evidence requirements and prepare a refinement proposal.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/firstp1ck/pi-coding-agent-forge/skill-refinement-loop
Install

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.

Any agent
npx skills add Firstp1ck/pi-coding-agent-forge --skill skill-refinement-loop
Clone the repo
git clone --depth 1 https://github.com/Firstp1ck/pi-coding-agent-forge

Made for: Claude Code, Codex.

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 skill-refinement-loop

README.md
[![agentmods](https://agentmods.dev/badge/skills/firstp1ck/pi-coding-agent-forge/skill-refinement-loop/github.svg)](https://agentmods.dev/skills/firstp1ck/pi-coding-agent-forge/skill-refinement-loop)
Your own site
<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.

agentmods 80×15 button for skill-refinement-loop

Your own site · 80×15
<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>
Per session 58 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 923 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 original No closer match found 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.00058 $0.00923
Opus 5.5 $0.00023 $0.00369
Sonnet 5.5 $0.00012 $0.00185
Haiku 4.5 $0.00006 $0.00092

Measured today against content hash 62b36461a6f0, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

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.

pi-package-skill-lifecycle/skills/skill-refinement-loop/SKILL.md · 98 lines

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_run is 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

  1. Identify the affected skill and the exact correction/failure.
  2. Collect evidence: user quote, failing command/test output, prompt, file path, or observed behavior.
  3. Call skill_refinement_plan with the skill name, failure, evidence, root-cause hypothesis if known, and a regression test proposal.
  4. Review the generated PATCH.md-style proposal.
  5. Add/update regression coverage if possible; if not possible, document why.
  6. Run the skill evaluator if installed; otherwise run the package's tests and inspect routing/contract behavior by hand.
  7. Apply source changes only after validation and user approval for risky edits.

Read the full file on GitHub · 98 lines

Files

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.

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. today First seen · 98 lines · 58 tokens per session scan A 62b36461a6f0

Subscribe to this mod's changes

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.

Related

skill-refinement-loop compared with skills from other repositories

skill-refinement-loop next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
skill-refinement-loopFirstp1ck/pi-coding-agent-forgeSkill96yesterdayMITA58Claude Code, Codex
smiles-validationsynthetic-sciences/openscienceSkill4.5k2d agoApache-2.0A24Claude Code, Codex
convex-component-authoringwaynesutton/convexskillsSkill40517d agoApache-2.0A28Claude Code, Codex
reproduce-bugmarcusrbrown/systematicSkill33todayMITA39Claude Code
meminfoai-ecoverse/sliccSkill37yesterdayApache-2.0A64Claude Code
mandu-lintkonamgil/manduSkill4613d agoMPL-2.0A53Claude Code, Codex
linkr-qualify-devicercarmo/piclaw-addonsSkill25yesterdayMITA39Claude Code, Codex