refining-a-spell

refining-a-spell is a skill for Claude Code, Codex from redhuntlabs/wizard. It costs 37 tokens per session (1,301 once invoked), scanned A, original, MIT.

A maintenance workflow for improving an existing spell, meaning a reusable set of task instructions, after real-world use exposes a problem.

In plain words
What is it for?
Use it to update a spell, record why the change was needed, rerun its tester, increase its version, and save the result.
Why use it?
It makes sure changes are tested and versioned instead of being saved as unverified edits.

Skill for Claude CodeCodex

Part of the wizard plugin — 37 skills, 6 commands, 1 agent, 1 hook shipped together

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.

agentmods
npx agentmods add skills/redhuntlabs/wizard/refining-a-spell
Any agent
npx skills add redhuntlabs/wizard --skill refining-a-spell
Clone the repo
git clone --depth 1 https://github.com/redhuntlabs/wizard

Made for: Claude Code, Codex.

Or install wizard, the plugin that ships this one along with the rest of its 37 skills, 6 commands, 1 agent, 1 hook.

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 refining-a-spell

README.md
[![agentmods](https://agentmods.dev/badge/skills/redhuntlabs/wizard/refining-a-spell.svg)](https://agentmods.dev/skills/redhuntlabs/wizard/refining-a-spell)
Your own site
<a href="https://agentmods.dev/skills/redhuntlabs/wizard/refining-a-spell"><img src="https://agentmods.dev/badge/skills/redhuntlabs/wizard/refining-a-spell.svg" alt="Measured on agentmods" height="20"></a>
Per session 37 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,301 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00037 $0.01301
Opus 5 $0.00018 $0.00651
Sonnet 5 $0.00007 $0.00260
Haiku 4.5 $0.00004 $0.00130

Measured 4d ago against content hash 4ffec01fae02, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

refining-a-spell 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.

skills/refining-a-spell/SKILL.md · 140 lines

How it starts

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

Refining a Spell

What this does

Updates an existing spell in the user's library. Walks through the diff, re-runs the tester (this is non-skippable), bumps the version field, and saves.

When to use

  • User invoked /refine-spell <name>
  • User says "this skill needs to also handle X"
  • A spell's tester verdict changes (e.g., a new edge case found in production use)

What you bring (Inputs)

  • The name of the spell to refine
  • What needs to change (and ideally why — what failed in real use)

What you get (Output)

The updated SKILL.md, validated, re-tested, and saved with bumped version.

How it works (Steps)

This is a workflow.

Stages

Stage 1: Load the current version

Find the spell in $WIZARD_HOME (preferred) or bundled spells/. If it's bundled and not yet overridden, copy it to $WIZARD_HOME/personal/<name>/ first — never modify the bundled file.

Stage 2: Capture the diff

Ask: "What needs to change?" and "What real situation showed you this was needed?"

The "what real situation" question is required. A refinement without a real-world trigger is speculative — push back: "Want to wait until you hit a real case?"

Stage 3: Apply the change

Edit the SKILL.md. Common changes:

  • New step → add to How it works (Steps) and to Quality bar
  • New variation → add to Variations
  • Better example → swap the Example block
  • New rationalization (discipline) → add to Excuses and counters
  • New input → update What you bring (Inputs) and add a step to capture it

Stage 4: Re-run the tester (NON-SKIPPABLE)

Any change requires re-test. The kind of test depends on the kind:

Kind Test
content, workflow, subagent Standard mode tester on 2-3 scenarios
discipline pressure-testing-a-spell with at least one scenario that exercises the change

Forbidden excuses (re-test is non-skippable)

Read the full file on GitHub · 140 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. 4d ago First seen · 140 lines · 37 tokens per session scan A 4ffec01fae02

Subscribe to this mod's changes

refining-a-spell is a skill published in the GitHub repository redhuntlabs/wizard (9 stars, last pushed 4mo ago), licensed MIT. It adds 37 tokens to every session and 1,301 once invoked, about $0.0002 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.