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 commands/data-wise/claude-plugins/refinegit clone --depth 1 https://github.com/Data-Wise/claude-pluginsWhat 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.00000 | $0.03486 |
| Opus 5 | $0.00000 | $0.01743 |
| Sonnet 5 | $0.00000 | $0.00697 |
| Haiku 4.5 | $0.00000 | $0.00349 |
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 2d 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 — 597 lines — stays where its author put it; the contents beside it link to each section on GitHub.
/refine - Prompt Optimizer
Optimize vague or unclear prompts into specific, well-structured requests that get better results from Claude.
Purpose
Help users write better prompts by:
- Analyzing clarity and specificity
- Checking project context
- Rewriting with improvements
- Explaining what changed and why
- Learning prompt engineering patterns
Usage
/refine "<your prompt>"- Optimize a specific prompt/refine- Interactive mode (will ask for prompt)
When invoked:
Step 1: Get the Prompt
If provided as argument:
/refine "Can you help me write a function that does X?"
Use the provided text.
If invoked without argument:
💡 PROMPT OPTIMIZER
Paste or type the prompt you want to optimize:
(Type 'cancel' to exit)
>
Wait for user input.
Step 2: Analyze Context
Before optimizing, gather context:
-
Project type - Check for:
- R package (DESCRIPTION file)
- Python (pyproject.toml, setup.py)
- Node.js (package.json)
- Quarto (_quarto.yml)
- General (git repo)
-
Project instructions - Read if exists:
CLAUDE.mdin project~/.claude/CLAUDE.mdfor user preferences
-
Recent work - Check git log (last 3 commits) for context
-
Coding patterns - Infer from context:
- Language/framework in use
- Testing framework
- Documentation style
- Type hints/annotations preference
Step 3: Analyze the Prompt
Identify issues:
- ❌ Vague requirements - "make it better", "fix this", "help with X"
- ❌ No language specified - "write a function" (which language?)
- ❌ Question phrasing - "Can you..." instead of directive
- ❌ Missing quality criteria - No mention of tests, docs, types
- ❌ Unclear scope - What exactly should be done?
- ❌ No edge cases - What should handle errors, empty input, etc.
- ❌ Context missing - Doesn't mention relevant constraints
Step 4: Optimize the Prompt
Rewrite to be:
- Specific - Clear language, framework, requirements
- Directive - "Write X" not "Can you write X?"
- Structured - Use bullets for multi-part requests
- Complete - Include quality criteria (tests, docs, types)
- Contextual - Reference project context when relevant
- Edge-case aware - Mention error handling, validation
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.
- 2d ago First seen · 597 lines · 0 tokens per session scan A 473e3ca2a58e
refine is a command published in the GitHub repository Data-Wise/claude-plugins (7 stars, last pushed 6d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 3,486 tokens. 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 commands, from other repositories
checklist
Generate a custom checklist for the current feature based on user requirements.
clarify
Identify underspecified areas in the current feature spec by asking up to 5 highly targeted clarification questions and encoding answers back into the spec.
specify
Create or update the feature specification from a natural language feature description.
analyze
Perform a non-destructive cross-artifact consistency and quality analysis across spec.md, plan.md, and tasks.md after task generation.
converge
Assess the current codebase against the feature's spec, plan, and tasks, then append any remaining unbuilt work as new tasks to tasks.md so implement can complete it.
implement
Execute the implementation plan by processing and executing all tasks defined in tasks.md.