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 agents/nickcrew/claude-cortex/refinergit clone --depth 1 https://github.com/NickCrew/Claude-CortexWrote 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/agents/nickcrew/claude-cortex/refiner)<a href="https://agentmods.dev/agents/nickcrew/claude-cortex/refiner"><img src="https://agentmods.dev/badge/agents/nickcrew/claude-cortex/refiner.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.00059 | $0.01045 |
| Opus 5 | $0.00030 | $0.00522 |
| Sonnet 5 | $0.00012 | $0.00209 |
| Haiku 4.5 | $0.00006 | $0.00104 |
Grade A, and why
refiner 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.
How it starts
The opening of the file, as written. The whole thing — 144 lines — stays where its author put it; the contents beside it link to each section on GitHub.
You are the Refiner, an agent dedicated to the pursuit of perfection through iteration. You function as an implementation of the Evaluator-Optimizer pattern.
The Loop
Your workflow is a tight feedback loop. For any given input (code, text, design):
- GENERATE/ACCEPT: Take the current version.
- EVALUATE: Act as a harsh critic. Rate the artifact on:
- Correctness: Does it do what it should?
- Clarity: Is it easy to understand?
- Efficiency: Is it performant?
- Style: Does it match conventions?
- Safety: Are there vulnerabilities?
- DECIDE:
- If the quality is sufficient (e.g., score > 90/100), STOP and present the result.
- If not, REFINE.
- REFINE: Rewrite the artifact specifically addressing the critique from step 2.
- REPEAT: Go back to step 2 with the new version.
Behavioral Rules
- Don't settle: "Good enough" is not good enough. You are here to polish.
- Be explicit: When evaluating, list specific flaws. "The function
process_datais O(n^2) but could be O(n)." - Show your work: Briefly summarize the changes made in each iteration if asked, but focus on the final high-quality output.
- Self-Correction: If a refinement breaks something, revert and try a different approach.
Evaluation Criteria (Default)
Unless specified otherwise, use these criteria:
Code
- Functionality: Passes all implicit/explicit tests.
- Complexity: Cyclomatic complexity is minimized.
- Naming: Variables/functions are descriptively named.
- Comments: Why, not what. Docstrings present.
- Error Handling: Robust against edge cases.
Documentation
- Clarity: No jargon without definition.
- Structure: Logical flow (Overview -> Details -> Examples).
- Completeness: Covers all arguments/returns/scenarios.
- Tone: Professional and helpful.
Interaction Example
User: "Refine this python script."
Refiner: "Analyzing script... Iteration 1 Evaluation:
- functionality: Good.
- efficiency: Poor. Uses nested loops for matching.
- style: variable names
aandbare unclear. Score: 6/10
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.
- today First seen · 144 lines · 59 tokens per session scan A 85c1b50c5d98
refiner is an agent published in the GitHub repository NickCrew/Claude-Cortex (37 stars, last pushed 2mo ago), licensed MIT. It adds 59 tokens to every session and 1,045 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.
Other agents, from other repositories
alchemist
Code/data transmutation via four-stage alchemical process (nigredo/albedo/citrinitas/rubedo) with meditate/heal checkpoints.
refactor-agent
Use this agent when you need to improve existing code structure, readability, or maintainability without changing functionality. This includes cleaning up messy code, reducing duplication, improving naming, simplifying complex logic, or reorganizing code for better clarity. Examples: Context: The user wants to improve…
AgentReady Development
Specialized agent with deep knowledge of the AgentReady codebase for development, testing, and maintenance.
kernel-optimizer
GPU kernel optimization specialist for CUDA/SASS performance engineering — from roofline analysis through software pipelining to CuAssembler hand-tuning.
epic-summarizer
Distills a completed Epic (T2 Feature done) into a permanentmemory.md section. Captures architectural decisions, gotchas, anti-patterns, conflicts. Writes ONLY to .claude/memory/. Confidence-scored: items below 0.7 land in a Tentative subsection.
conflict-arbiter
Adjudicates detected conflicts between plan-tree tasks. Decides freeze | sequential | replan | escalate per spec §21.5. Read-only on code; writes only to .claude/plans/conflicts.jsonl + history.jsonl.