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 agentmods add skills/dhofheinz/open-plugins/refinenpx skills add dhofheinz/open-plugins --skill refinegit clone --depth 1 https://github.com/dhofheinz/open-pluginsWrote 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/dhofheinz/open-plugins/refine)<a href="https://agentmods.dev/skills/dhofheinz/open-plugins/refine"><img src="https://agentmods.dev/badge/skills/dhofheinz/open-plugins/refine.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 | $0.00093 | $0.03248 |
| Opus 5 | $0.00046 | $0.01624 |
| Sonnet 5 | $0.00019 | $0.00650 |
| Haiku 4.5 | $0.00009 | $0.00325 |
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 4d 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.
How it starts
The opening of the file, as written. The whole thing — 216 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Refinery — Unified Specification Refinement
You are the orchestrator for the Refinery plugin. Your job is to interpret the user's intent and dispatch to the correct mode procedure, never to perform operations directly. Mode files (loaded on demand) contain the actual procedures.
Directive
Refinery treats specifications as typed nodes in an artifact graph. Every operation reads working-directory state from artifact frontmatter, executes a focused mode procedure, writes results back to artifacts, and exits. The plugin is stateless across invocations — all state lives in markdown files.
Your responsibility on every invocation:
- Parse
$ARGUMENTSto determine intent - Read working-directory state (read frontmatter only — do not load full artifact bodies until a mode requires them)
- Resolve to one of eleven modes
- Load the corresponding mode file via
Readfrom${CLAUDE_SKILL_DIR}/mode-<name>.md - Execute the mode's procedure (which may load further stage files, reference files, templates, and spawn agents)
- Report outcome and suggest next action
- Exit
You never embed mode logic directly in this orchestrator. You dispatch.
Working Directory
Default resolution order (highest priority first):
--output-dir=<path>flag on the invocation${user_config.working_directory}if set in plugin user configdocs/refinery/(built-in default, distinct fromdocs/specs/to avoid colliding with legacy artifacts)
If the resolved working directory does not exist and the user did not invoke init, prompt before creating it.
Input Parsing
Process $ARGUMENTS in the following order. First match wins.
- Empty arguments + working directory has artifacts → mode =
status - Empty arguments + working directory has no artifacts → AskUserQuestion: "What would you like to refine?" with options:
- "Initialize project conventions" →
init - "Start a new system from an idea" → prompt for idea then
advance --stage=principles - "Document an existing feature" → prompt for feature name then
advance --stage=feature-spec - "Cancel"
- "Initialize project conventions" →
- Mode keyword as first argument (
init,advance,iterate,review,finalize,check,tickets,update,status,archive,mark-implemented) → use that mode; remaining arguments are passed through to the mode file. --stage=<name>flag present → mode =advance; target stage =<name>- First argument is an existing file path (matches
*.mdand exists) → inspect file'sartifact:andstatus:frontmatter; suggest the most likely operation and confirm via AskUserQuestion if ambiguous. - First argument is a free-text idea (multi-word, no special characters that suggest a path or feature name) → mode =
advance; target stage =principles; idea text passed as input. - First argument is a single-word identifier that doesn't match a mode keyword and doesn't exist as a file → assumed to be a feature name; mode =
advance; target stage =feature-spec; scope =feature; feature name = the argument. - Otherwise → AskUserQuestion to clarify intent (do not guess).
What ships with it
34 files 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.
- mode-advance.md 7.8 KB
- mode-archive.md 6.5 KB
- mode-check.md 8.7 KB
- mode-finalize.md 7.4 KB
- mode-init.md 8.5 KB
- mode-iterate.md 12 KB
- mode-mark-implemented.md 9.6 KB
- mode-review.md 6.7 KB
- mode-status.md 5.5 KB
- mode-tickets.md 9.5 KB
- mode-update.md 6.3 KB
- references/agent-handoffs.md 12 KB
- references/commit-protocol.md 12 KB
- references/convergence.md 9.2 KB
- references/document-format.md 13 KB
- references/operation-bookkeeping.md 10.0 KB
- references/requirement-syntax.md 7.9 KB
- references/state-detection.md 7.1 KB
- references/ticket-format.md 12 KB
- stage-design.md 4.3 KB
- stage-feature-spec.md 6.7 KB
- stage-plan.md 4.8 KB
- stage-principles.md 5.8 KB
- stage-spec.md 4.2 KB
- stage-stack.md 5.6 KB
- templates/_conventions.md 4.5 KB
- templates/_glossary.md 1.3 KB
- templates/design.md 5.4 KB
- templates/feature-spec.md 4.1 KB
- templates/plan.md 4.2 KB
- templates/principles.md 5.0 KB
- templates/spec.md 4.8 KB
- templates/stack.md 4.6 KB
- templates/tickets.md 3.5 KB
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.
- 4d ago First seen · 216 lines · 93 tokens per session scan A adc874559342
refine is a skill published in the GitHub repository dhofheinz/open-plugins (9 stars, last pushed 4mo ago), licensed MIT. It adds 93 tokens to every session and 3,248 once invoked, about $0.0005 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-08-31.
Other skills, from other repositories
systematic-debugging
Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes.
brainstorming
You MUST use this before any creative work - creating features, building components, adding functionality, or modifying behavior. Explores user intent, requirements and design before implementation.
auto-perf-optimize
Run agent-driven VS Code performance or memory investigations. Use when asked to launch Code OSS, automate a VS Code scenario, run the Chat memory smoke runner, capture renderer heap snapshots, take workflow screenshots, compare run summaries, or drive a repeatable scenario before heap-snapshot analysis.
chat-perf
Run chat perf benchmarks and memory leak checks against the local dev build or any published VS Code version. Use when investigating chat rendering regressions, validating perf-sensitive changes to chat UI, or checking for memory leaks in the chat response pipeline.
chat-pet-sprite-creation
Use when creating or changing VS Code chat pet sprite art, sprite sheets, state animations, eye treatments, Stable/Insiders variants, or pet transitions under src/vs/workbench/contrib/chat/browser/widget/media/chatPet.
cpu-profile-analysis
Analyze V8/Chrome CPU profiles (.cpuprofile) and DevTools trace files (Trace-.json). Use when: profiling performance, investigating slow functions, comparing code paths, finding bottlenecks, analyzing timeToRequest, understanding call trees from sampling profiler data, analyzing layout/paint/rendering, investigating…