refine

refine is a skill for Claude Code from cosmix/loom. It costs 24 tokens per session (957 once invoked), scanned A, original, MIT.

A procedure for improving a planning document or passage and carrying the change through related documents. It checks linked product specifications, plans, and findings before editing.

In plain words
What is it for?
It helps refine product sections, feature plans, and standalone plans while respecting locked execution records and review files.
Why use it?
It prevents one document from being changed while leaving conflicting requirements or decisions elsewhere in the project.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the loom-plan plugin — 11 skills, 2 agents shipped together

Good fit It helps refine product sections, feature plans, and standalone plans while respecting locked execution records and review files.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/cosmix/loom/refine
View source ↗ cosmix/loom
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 cosmix/loom --skill refine
Clone the repo
git clone --depth 1 https://github.com/cosmix/loom

Made for: Claude Code.

Or install loom-plan, the plugin that ships this one along with the rest of its 11 skills, 2 agents.

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/cosmix/loom/refine/github.svg)](https://agentmods.dev/skills/cosmix/loom/refine)
Your own site
<a href="https://agentmods.dev/skills/cosmix/loom/refine"><img src="https://agentmods.dev/badge/skills/cosmix/loom/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/cosmix/loom/refine"><img src="https://agentmods.dev/badge/skills/cosmix/loom/refine.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 24 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 957 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.00024 $0.00957
Opus 5.5 $0.00010 $0.00383
Sonnet 5.5 $0.00005 $0.00191
Haiku 4.5 $0.00002 $0.00096

Measured 5d ago against content hash 0264ad851363, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 5d 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.

plan-plugin/skills/refine/SKILL.md · 61 lines

What it actually says

Refine a document

Use the feature name given in the session's opening prompt. Its vision and sections live under doc/product/<feature>/; its metaplans and plans live under doc/plans/<feature>/. A standalone plan lives at doc/plans/PLAN-<slug>.md, has Implements: none, and has no metaplan.

  1. Read the target document and any attached passage in context. Read the documents it binds or is bound by: for a product section, its vision; for a plan, its metaplan entry if any and every product section named in its Implements: line. Follow references to find the other documents that state the same requirement or decision. When an attachment is a finding, read the feature's doc/plans/<feature>/findings.md for its About: nodes and status.
  2. Check the write limits before editing. Refuse changes to files prefixed IN_PROGRESS-, DONE-, or RETIRED-, anything under doc/plans/<feature>/archive/ or doc/plans/archive/, a locked plan's brief bundle, and REVIEW-*.md files. Explain that running and completed plans and their briefs preserve the execution record, and run reviews are read-only. Offer a new metaplan entry or a spec refinement for the correction instead.
  3. Make the change the user asks for. Resolve material ambiguity with the user in plain text, one question at a time. Record each settled decision immediately in the document it affects, with its reason when the reason is not obvious. A document under doc/product/ follows the session brief's rule for product documents: technical points go under its ## Deferred to planning, never under ## Open questions, and the vision's ## Planning notes bind how you work.
  4. Carry the change into every document that states the same thing in the same turn. For a product section, that includes the feature's vision (index.md and its ## Decisions): correct any statement the change makes untrue. If you cannot reconcile a related document, record the conflict under its ## Open questions, naming the conflicting statements, options, and your recommendation. If that document is locked, preserve it and record the conflict in the affected editable spec or proposed metaplan entry instead; explain the limit.
  5. Keep headings that summaries cite unless the requested change concerns the heading itself. Keep cross-references consistent with any deliberate heading change.
  6. Never write or edit a Settled: line; the app's Mark settled action writes it. When a document you edit has one, say so in the reply ("section 04 was settled; it now reads revised"). A section's stub is its vision row and a plan's stub is its metaplan entry: when a body's scope moves past its stub, update the stub in the same turn or ask.
  7. A (My call.) marker, including the forms (My call: reason) and (My call; reason), blocks Mark settled until it is gone. When the user addresses one, whether they confirm the decision, change it or drop it, edit the sentence to the agreed text and delete the whole marker in the same turn; when the reason is not obvious, keep it as plain prose. Leave no (My call text in the document. A decision the user has not confirmed keeps its marker.

Write only the target and affected editable documents under doc/, including an agreed new metaplan entry under doc/plans/<feature>/. Never edit code or configuration. Never write doc/loom/knowledge/ with a file tool; use the loom-plan:knowledge skill for an agreed knowledge change. Never write doc/loom/summaries/ directly; summaries change only through loom plan summary seal <id>. Never stage, commit, branch, or run loom init, loom run, or loom pressure.

After any turn that edited documents, run loom plan check and fix what it reports before you reply. Do not rebuild summaries at the end of the turn: the app rebuilds them in the background once the documents stop changing.

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. 5d ago Changed · +3 lines 0264ad851363
  2. 11d ago First seen · 58 lines · 24 tokens per session scan A 8e4ae3a79d84

Subscribe to this mod's changes

refine is a skill published in the GitHub repository cosmix/loom (66 stars, last pushed today), licensed MIT. It adds 24 tokens to every session and 957 once invoked, about $0.0001 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-11-19.

Related

refine compared with skills from other repositories

refine next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
refinecosmix/loomSkill66todayMITA24Claude Code
idiomatic-goTypeFox/agent-skillsSkill51mo agoMITA137Claude Code
eclipse-license-checkTypeFox/agent-skillsSkill51mo agoMITA110Claude Code
go-documentationTypeFox/agent-skillsSkill51mo agoMITA98Claude Code
publish-vscode-extensionTypeFox/agent-skillsSkill51mo agoMITA107Claude Code
domainmodel-dslTypeFox/agent-skillsSkill51mo agoMITA68Claude Code
statemachine-dslTypeFox/agent-skillsSkill51mo agoMITA63Claude Code