chaining-spells

chaining-spells is a skill for Claude Code, Codex from redhuntlabs/wizard. It costs 30 tokens per session (1,097 once invoked), scanned A, original, MIT.

A workflow builder that connects several existing spells, or reusable task instructions, into one end-to-end process.

In plain words
What is it for?
Use it for sequences such as brainstorming, planning, execution, and verification, or for any repeatable multi-step workflow.
Why use it?
It removes the need to run each stage manually and manages the handoff between stages, including failures and loop-backs.

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/chaining-spells
Any agent
npx skills add redhuntlabs/wizard --skill chaining-spells
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 chaining-spells

README.md
[![agentmods](https://agentmods.dev/badge/skills/redhuntlabs/wizard/chaining-spells.svg)](https://agentmods.dev/skills/redhuntlabs/wizard/chaining-spells)
Your own site
<a href="https://agentmods.dev/skills/redhuntlabs/wizard/chaining-spells"><img src="https://agentmods.dev/badge/skills/redhuntlabs/wizard/chaining-spells.svg" alt="Measured on agentmods" height="20"></a>
Per session 30 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,097 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.00030 $0.01097
Opus 5 $0.00015 $0.00549
Sonnet 5 $0.00006 $0.00219
Haiku 4.5 $0.00003 $0.00110

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

Security

Grade A, and why

chaining-spells 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/chaining-spells/SKILL.md · 138 lines

How it starts

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

Chaining Spells

What this does

Builds and runs a chain — a workflow spell whose stages each invoke another existing spell. The chain handles handoffs, loop-backs, and stop-on-failure.

When to use

  • User says "do X then Y then Z" where each is a known spell
  • User wants to formalize a multi-spell workflow they keep doing manually
  • Loading a default chain (e.g. general-research-loop)

What you bring (Inputs)

  • The names of the spells to chain (in order)
  • The handoff artifact between each pair

What you get (Output)

A new chain spell (kind: workflow, complexity: chained) saved to $WIZARD_HOME, plus a runnable execution path.

How it works (Steps)

This is a workflow — and the resulting chain is also a workflow. Don't confuse the two.

Stages

Stage 1: Identify constituents

List the spells in the order they'll run. Verify each exists (in $WIZARD_HOME or bundled). Reject the chain if any are missing — offer to build them first.

Stage 2: Define handoffs

For each adjacent pair (A → B):

  • What does A produce?
  • What does B require as input?
  • Do they match, or does a translation step exist?

If they don't match, the chain isn't yet runnable. Either:

  • Edit B's What you bring (Inputs) to accept A's output, OR
  • Insert a translator spell between them, OR
  • Reject the chain and tell the user

Stage 3: Define stage gates

For each transition, name what must be true to pass to the next stage. Default: "the constituent spell's Quality bar was met."

Stage 4: Define loop-back conditions

When does the chain return to an earlier stage?

Default: "if any stage's Quality bar is not met after the constituent finishes, return to that stage and re-run."

Document any custom loop-backs.

Stage 5: Build the chain SKILL.md

Use templates/spell-template-chained.md. Set composes: to the list of constituent names.

Read the full file on GitHub · 138 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 · 138 lines · 30 tokens per session scan A d0eff7eabb53

Subscribe to this mod's changes

chaining-spells is a skill published in the GitHub repository redhuntlabs/wizard (9 stars, last pushed 4mo ago), licensed MIT. It adds 30 tokens to every session and 1,097 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.