refine

refine is a skill for Claude Code, Codex from Kevin-Liu-01/Agent-Machines. It costs 61 tokens per session (1,410 once invoked), scanned A, original, MIT.

A seven-part quality review for recently changed code, covering comments, style, types, interfaces, tests, and example-based checks.

In plain words
What is it for?
Use it after a feature or refactor to review touched files, verify documented behavior, and test the rules the code must preserve.
Why use it?
It catches correctness, maintainability, and testing problems before the final commit by checking the work from several angles.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: mentions subagents; positional $N argument.

Good fit Use it after a feature or refactor to review touched files, verify documented behavior, and test the rules the code must preserve.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/kevin-liu-01/agent-machines/refine
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 Kevin-Liu-01/Agent-Machines --skill refine
Clone the repo
git clone --depth 1 https://github.com/Kevin-Liu-01/Agent-Machines

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 refine

README.md
[![agentmods](https://agentmods.dev/badge/skills/kevin-liu-01/agent-machines/refine/github.svg)](https://agentmods.dev/skills/kevin-liu-01/agent-machines/refine)
Your own site
<a href="https://agentmods.dev/skills/kevin-liu-01/agent-machines/refine"><img src="https://agentmods.dev/badge/skills/kevin-liu-01/agent-machines/refine/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 refine

Your own site · 80×15
<a href="https://agentmods.dev/skills/kevin-liu-01/agent-machines/refine"><img src="https://agentmods.dev/badge/skills/kevin-liu-01/agent-machines/refine.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 61 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,410 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. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 10 findings, up to medium

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • medium Agent Snooping · line 49
    Skill enumerates or reads other installed skills. Access to other skills' SKILL.md files or the skills directory reveals prompt instructions, capabilities, and secrets that should be invisible to peer skills.
    Fix: Remove all code or instructions that list or read other skills' files or directories. Skills should operate independently; cross-skill access is a privilege escalation.
  • medium Agent Snooping · line 62
    Skill enumerates or reads other installed skills. Access to other skills' SKILL.md files or the skills directory reveals prompt instructions, capabilities, and secrets that should be invisible to peer skills.
    Fix: Remove all code or instructions that list or read other skills' files or directories. Skills should operate independently; cross-skill access is a privilege escalation.
  • medium Excessive Agency · line 72
    Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.
    Fix: Add human-in-the-loop confirmation for destructive, irreversible, or high-impact operations. Never auto-execute commands that modify files, send data, or alter system state.
  • medium Agent Snooping · line 80
    Skill enumerates or reads other installed skills. Access to other skills' SKILL.md files or the skills directory reveals prompt instructions, capabilities, and secrets that should be invisible to peer skills.
    Fix: Remove all code or instructions that list or read other skills' files or directories. Skills should operate independently; cross-skill access is a privilege escalation.
  • medium Agent Snooping · line 81
    Skill enumerates or reads other installed skills. Access to other skills' SKILL.md files or the skills directory reveals prompt instructions, capabilities, and secrets that should be invisible to peer skills.
    Fix: Remove all code or instructions that list or read other skills' files or directories. Skills should operate independently; cross-skill access is a privilege escalation.
  • medium Agent Snooping · line 86
    Skill enumerates or reads other installed skills. Access to other skills' SKILL.md files or the skills directory reveals prompt instructions, capabilities, and secrets that should be invisible to peer skills.
    Fix: Remove all code or instructions that list or read other skills' files or directories. Skills should operate independently; cross-skill access is a privilege escalation.
  • medium Agent Snooping · line 101
    Skill enumerates or reads other installed skills. Access to other skills' SKILL.md files or the skills directory reveals prompt instructions, capabilities, and secrets that should be invisible to peer skills.
    Fix: Remove all code or instructions that list or read other skills' files or directories. Skills should operate independently; cross-skill access is a privilege escalation.
  • medium Agent Snooping · line 113
    Skill enumerates or reads other installed skills. Access to other skills' SKILL.md files or the skills directory reveals prompt instructions, capabilities, and secrets that should be invisible to peer skills.
    Fix: Remove all code or instructions that list or read other skills' files or directories. Skills should operate independently; cross-skill access is a privilege escalation.
  • medium Agent Snooping · line 124
    Skill enumerates or reads other installed skills. Access to other skills' SKILL.md files or the skills directory reveals prompt instructions, capabilities, and secrets that should be invisible to peer skills.
    Fix: Remove all code or instructions that list or read other skills' files or directories. Skills should operate independently; cross-skill access is a privilege escalation.
  • medium Agent Snooping · line 137
    Skill enumerates or reads other installed skills. Access to other skills' SKILL.md files or the skills directory reveals prompt instructions, capabilities, and secrets that should be invisible to peer skills.
    Fix: Remove all code or instructions that list or read other skills' files or directories. Skills should operate independently; cross-skill access is a privilege escalation.
How audits are shown
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.00061 $0.01410
Opus 5 $0.00030 $0.00705
Sonnet 5 $0.00012 $0.00282
Haiku 4.5 $0.00006 $0.00141

Measured 7d ago against content hash 41b63922a011, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

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

knowledge/skills/refine/SKILL.md · 157 lines

How it starts

The opening of the file, as written. The whole thing — 157 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Refine

Seven-pass quality gate. Each pass delegates to a standalone skill, so you can run any pass independently (/comment, /lerp, /fix-types, /exemplar-audit, etc.) or all seven in order (/refine).

Principle: docs and by-the-book examples first

Before implementing anything, check official documentation and real-world examples. Clone reference repos into /tmp, read upstream READMEs, and verify the canonical approach before inventing your own. This applies to every pass. The internet is smarter than guessing.

Principle: test the invariant, not the implementation

Don't write tests that confirm the code you wrote works. Write tests that probe the contract the code is supposed to uphold. "Rename works" is an implementation test. "Rename never orphans children" is an invariant test. The second one catches bugs before they exist.

Scope

Operates on every file in the current working set (unstaged + staged + recent commits). If the user names specific files, a package, or a directory, scope to those.

  • /refine -- all touched files, all 7 passes
  • /refine $0 -- scope to a file, crate, or directory
  • /refine --pass N -- run only pass N (1-7)
  • /refine --skip N -- skip pass N

Passes

Each pass reads its own skill file for the full checklist, so updates to individual skills propagate automatically.

Pass 1: Comment

Skill: .agents/skills/comment/SKILL.md

Check Applies to
License/copyright header present all languages
File-level doc answers what / why / where in 30 seconds all
Acronyms spelled out on first use all
Inline comments pass the deletion test all
No "This module/struct/class/function..." openers all
Concrete examples for formats, protocols, state machines all

Pass 2: LERP (Least Experienced Reader Principle)

Skill: .agents/skills/lerp/SKILL.md

Check Applies to
Acronyms spelled out on first use, short form in parens, then abbreviate freely all prose
Domain terms explained inline on first use all prose
No orphan references ("this split", "this pattern") without context all prose
Every "important" or "necessary" claim states the consequence all prose
Abstract nouns replaced with concrete descriptions all prose
Sentences connected into flowing reasoning, not staccato facts all prose
A sixth grader could follow the argument without asking someone all prose

Read the full file on GitHub · 157 lines

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. 7d ago First seen · 157 lines · 61 tokens per session scan A 41b63922a011

Subscribe to this mod's changes

refine is a skill published in the GitHub repository Kevin-Liu-01/Agent-Machines (29 stars, last pushed yesterday), licensed MIT. It adds 61 tokens to every session and 1,410 once invoked, about $0.0003 per session on Opus 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-09-03.

Related

Other skills, from other repositories

hermes-change-review

Use when a branch, pull request, Kanban task, or implementation must be reviewed separately for intent fidelity, repository quality, and verification evidence before completion or merge is accepted.

asimons81/hermes-field-kit · 40 tokens

fable-judge

Adversarial verification of finished work. Treats any 'done' claim as a set of claims to verify by re-running everything yourself. Use when someone reports work complete and you must gate it: load this before trusting a completion report. Subcommands: suite runs a trap suite against any skill/model.

ardhaecosystem/fable-method · 69 tokens

readme-template

Standard README template for repos — professional structure with badges, overview, table of contents, features/modules, stack, installation, configuration, tests, security, structure, docs, roadmap, contribute, license, author + RepoActivity sections (Star History, repo stats) + profile GIF footer. Use when creating…

pedroiff0/awesome-skills · 72 tokens

docker-single-port-multi-instance

Consolidate multiple Docker Compose app instances (production / test / demo) behind ONE host port using an nginx reverse proxy that routes by URL path prefix (e.g. /demo). Use when a user wants 'one port, several apps/banks' or a demo reachable simultaneously from the main landing page with its own database.

pedroiff0/awesome-skills · 73 tokens

review

Challenge a Hardproof implementation during REVIEW against its approved contract, code quality, tests, and risk boundaries.

asimons81/hardproof · 23 tokens

implement

Implement an agreed specification through existing seams with tests, checks, and review.

MoonTzai/folderbridge-mcp · 17 tokens