building-a-spell

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

A guided builder that turns a repeated task into a reusable spell, meaning a saved set of instructions that can be triggered again.

In plain words
What is it for?
Use it to systematize recurring research, operations, writing, or development work and save the resulting SKILL.md file.
Why use it?
It captures a process once so the same approach can be followed consistently in future sessions.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: mentions subagents.

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/building-a-spell
Any agent
npx skills add redhuntlabs/wizard --skill building-a-spell
Clone the repo
git clone --depth 1 https://github.com/redhuntlabs/wizard

Made for: Claude Code.

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/redhuntlabs/wizard/building-a-spell.svg)](https://agentmods.dev/skills/redhuntlabs/wizard/building-a-spell)
Your own site
<a href="https://agentmods.dev/skills/redhuntlabs/wizard/building-a-spell"><img src="https://agentmods.dev/badge/skills/redhuntlabs/wizard/building-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 2,306 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.1 $0.00037 $0.02306
Opus 5 $0.00018 $0.01153
Sonnet 5 $0.00007 $0.00461
Haiku 4.5 $0.00004 $0.00231

Measured 6d ago against content hash 06a5ac2e27ca, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

building-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 6d 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/building-a-spell/SKILL.md · 221 lines

How it starts

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

Building a Spell

What this does

Interviews the user about a task they do repeatedly, then writes a spell file (a SKILL.md) that captures it. Future sessions auto-invoke that spell whenever the trigger matches.

This skill is the meta-builder. It calls other skills (intuitive-interviewing, kind-specific builders, pressure-testing-a-spell) and dispatches the spell-tester subagent.

When to use

  • User describes a task they do over and over and asks to capture it
  • User says "build a workflow / skill / spell for X"
  • User shows you a process and says "I want this systematized"
  • User wants the AI to behave the same way every time they hit a certain trigger

What you bring (Inputs)

  • A description of the task (one or two sentences is enough)
  • Your domain (research, ops, writing, dev, etc.) — inferred if not stated
  • Any constraints (time budget, tools available, style preferences)

What you get (Output)

A new spell file at $WIZARD_HOME/<category>/<name>/SKILL.md, validated and tested.

How it works (Steps)

This is a workflow chain. The stages below are the master flow.

Stages

Stage -1: Inference prelude (conditional)

Skip this stage entirely if no transcript was supplied (the default /build-spell flow).

If invocation came with --from-transcript <path> OR was routed through /capture-this-chat, the input includes a transcript blob plus provenance.

In that case:

  1. Invoke inferring-a-spell-from-examples (passes the transcript + provenance).
  2. The inference skill produces either:
    • A BUILDABLE outcome → context dictionary + draft SKILL.md. Resume at Stage 2 (kind-route) with kind already set. Skip Stage 0 and Stage 1 entirely.
    • A TOO-THIN or TOO-BROAD outcome → halt with the inference skill's user-facing message. Do not enter Stages 0–4.
    • A user choice of "Re-do as interview" (bail) → resume at Stage 1 with the inferred fields as pre-filled defaults. Stage 1's batch-confirm still runs; user can accept-with-Enter or correct.

Read the full file on GitHub · 221 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. 6d ago First seen · 221 lines · 37 tokens per session scan A 06a5ac2e27ca

Subscribe to this mod's changes

building-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 2,306 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.