sorting-hat

sorting-hat is a skill for Claude Code, Codex from Totes-MickGOATs/opus-pocus. It costs 118 tokens per session (1,341 once invoked), scanned A, original, MIT.

A skill for assigning explicit model levels to repository agents according to their roles. It separates planners and judges from builders and mechanical workers so each role gets a suitable model.

In plain words
What is it for?
Use it to audit agent definitions, classify their work as planning, building, judging, or mechanical, and set model choices for quality and token-budget decisions.
Why use it?
It prevents every agent from using the same default model, which can spend an expensive model on routine execution and make costs harder to control.

Skill for Claude CodeCodex

Part of the opus-pocus plugin — 21 skills, 1 agent 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/totes-mickgoats/opus-pocus/sorting-hat
Any agent
npx skills add Totes-MickGOATs/opus-pocus --skill sorting-hat
Clone the repo
git clone --depth 1 https://github.com/Totes-MickGOATs/opus-pocus

Made for: Claude Code, Codex.

Or install opus-pocus, the plugin that ships this one along with the rest of its 21 skills, 1 agent.

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 sorting-hat

README.md
[![agentmods](https://agentmods.dev/badge/skills/totes-mickgoats/opus-pocus/sorting-hat.svg)](https://agentmods.dev/skills/totes-mickgoats/opus-pocus/sorting-hat)
Your own site
<a href="https://agentmods.dev/skills/totes-mickgoats/opus-pocus/sorting-hat"><img src="https://agentmods.dev/badge/skills/totes-mickgoats/opus-pocus/sorting-hat.svg" alt="Measured on agentmods" height="20"></a>
Per session 118 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,341 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.00118 $0.01341
Opus 5 $0.00059 $0.00671
Sonnet 5 $0.00024 $0.00268
Haiku 4.5 $0.00012 $0.00134

Measured 5d ago against content hash 9abecf3bf70b, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, from the pricing page.

Security

Grade A, and why

sorting-hat 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 5d 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/sorting-hat/SKILL.md · 94 lines

How it starts

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

✨ The Sorting Hat

"Not every task deserves the expensive wizard. Opus plans, Sonnet toils, Haiku fetches — Opus returns to judge."

The thesis: use the top model as a planner and judge, not an executor. Architecture, decomposition, and final review reward the strongest model; mechanical execution mostly doesn't. An agent roster with no declared tiers runs everything on the session default — usually the most expensive model doing the least discriminating work.

What to scan

Every agent definition (.claude/agents/*.md and plugin agents), each one's model: frontmatter (or its absence), its tool set, and what its body actually asks it to do.

Classification

Read the agent's task shape, not its name:

Role Task shape Tier
Judge Reviews, audits, refutes, grades; output is a verdict someone acts on; being wrong is expensive Top model (Opus-class)
Planner Decomposes, architects, writes briefs others execute Top model
Builder Writes code/content against a settled spec; correctness is checkable downstream (compiles, tests, lints) Mid model (Sonnet-class)
Mechanical Renames, format fixes, lookups, file moves; a wrong answer is obvious and cheap Small model (Haiku-class)

Edge rules:

  • An agent that both builds and self-reviews is a builder — the judging belongs in a separate judge pass, which is the whole point of the split.
  • Read-only auditors whose findings block a merge are judges even when cheap to run wrong — a plausible-but-wrong finding costs more than the model saved.
  • When genuinely torn, tier UP for verdict-producers, DOWN for artifact-producers.

When this spell has no subject

Fewer than about five agents: report the classification table and stop. Do not prescribe a decision record, do not prescribe a lint. Both are drift-control for a roster large enough to drift; on three agents the frontmatter is the policy, and a human reading three files is the enforcement. Prescribing governance for two lines of YAML is the scale inversion this book grades elsewhere.

Read the full file on GitHub · 94 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. 5d ago First seen · 94 lines · 118 tokens per session scan A 9abecf3bf70b

Subscribe to this mod's changes

sorting-hat is a skill published in the GitHub repository Totes-MickGOATs/opus-pocus (10 stars, last pushed 26d ago), licensed MIT. It adds 118 tokens to every session and 1,341 once invoked, about $0.0006 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.

Related

Other skills, from other repositories

metrics-instrumentation

Specification for instrumenting an opik-backend workflow with operational OpenTelemetry metrics — per-stage throughput/latency/error counters and native histograms, dimensioned per-customer (workspace). Use when a pipeline (scoring, ingestion, experiments, jobs) needs per-stage visibility. Covers metric emission only…

comet-ml/opik · 93 tokens

happiness-skill

当用户问「怎么才能更幸福/为什么得到了还不满足/怎么减少焦虑」时调用。 核心理念: 幸福是缺憾感清空的默认状态, 是可训练的技能; 欲望是与自己的契约(得到前不快乐), 同时只留一个重大欲望; 活在当下。 不适用于: 临床抑郁等需要专业治疗的场景(本书方法不能替代医疗)。 Triggers: 幸福/不快乐/欲望/焦虑/知足/活在当下/happiness/desire/anxiety.

kangarooking/cangjie-skill · 136 tokens

short-drama-storyboard

把剧本和视觉事实转成有镜头职责、空间连续性和可冻结起点的 剧集/ /分镜.md。 每镜使用二级标题 ## SHOT-...,同镜下用 ### 冻结关键帧提示词 写起始帧正文。.

zenstory-ai/drama-skills · 102 tokens

setup-matt-pocock-skills

为本仓库配置工程技能——设置其 issue tracker、分诊标签词汇表和领域文档布局。首次使用其他工程技能前运行一次。.

devcxl/mattpocock-skills-zh · 43 tokens

pixel-art-studio

Create production-quality pixel art and animations programmatically. Use when the user asks to "create pixel art", "draw a sprite", "make pixel animation", "generate sprite sheet", "convert image to pixel art", "pixelate this image", "make a pixel character", "пиксель арт", "пиксельная графика", "спрайт", "像素画"…

AnastasiyaW/codex-claude-code-config · 349 tokens

frontend-design

Создание высококачественных, визуально выдающихся фронтенд-интерфейсов. Используй ВСЕГДА когда пользователь просит создать веб-страницу, компонент, лендинг, дашборд, UI-кит, форму, карточки, навигацию, анимации, или любой другой веб-интерфейс. Скилл покрывает: HTML/CSS/JS компоненты, React/Vue/Svelte, Tailwind CSS…

AnastasiyaW/codex-claude-code-config · 264 tokens