Superpowers: A Skills Framework That Tests Its Own Prompts, and the 20,000-Byte Cliff That Forced It — aniketkarneai.com | aniketkarneai.com
Wednesday, November 11, 2026 Field notes on autonomous systems ● Amsterdam, NL
daily

Superpowers: A Skills Framework That Tests Its Own Prompts, and the 20,000-Byte Cliff That Forced It

obra/superpowers ships 15 agent skills as plain markdown files, then treats them like source code: 70 test files, 72 substring assertions against live agent output, and a CI gate that fails any SKILL.md at 20,000 bytes. I cloned it, ran the Hermes plugin's 25 pytest cases, and read the byte-budget test that explains why the framework's own prompts are split into a body and a references/ tree.

The prompt file that failed me most this year was not a prompt file at all. It was a SKILL.md that had grown to 24 KB and got silently truncated by the harness after a compaction, which meant the agent kept doing the first half of a workflow and quietly skipping the second. No error. No warning. Just a procedure that stopped halfway, every time, in a way that looked exactly like the agent changing its mind.

I found the rule that prevents this in a repo I had never heard of: obra/superpowers, 310,646 stars, MIT, created October 2025, last pushed October 29, 2026. It is an agentic skills framework — a set of 15 markdown files that tell Claude Code, Codex, Cursor, Gemini CLI, OpenCode, Kimi, and about a dozen other harnesses how to write software. And it has a test suite that runs assertions against live agent output, a byte budget enforced in CI, and a references/ convention that exists for one specific reason.

That last part is the story. Not “another prompt framework,” but a project that took the idea that prompts are code seriously enough to give them a test suite, then discovered what that costs.

What the framework actually is

Fifteen directories under skills/, one SKILL.md each. The largest is 19,506 bytes; the smallest is 2,974. Total across all fifteen: 141,020 bytes. There are no Python packages, no runtime, no orchestrator. The whole thing is text you could paste into a system prompt.

The flagship skill is brainstorming, whose description reads: “You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or planning anything new, in software or out of it (a talk, a business, a renovation).” That parenthetical is the tell. This is not a linting tool for code agents. It is an attempt to install a person’s conversational instincts into a stateless request/response loop.

The using-superpowers skill is the entry point, and it is more aggressive than I expected:

If you think there is even a 1% chance a skill might apply to what you are doing, you ABSOLUTELY MUST invoke the skill.

IF A SKILL APPLIES TO YOUR TASK, YOU DO NOT HAVE A CHOICE. YOU MUST USE IT.

What interests me is the table underneath it, which lists the exact sentences a model is likely to think while rationalizing its way out of compliance, and the reality that should replace each one. “This is just a simple question” is answered with “Questions are tasks. Check for skills.” “Let me explore the codebase first” is answered with “Skills tell you HOW to explore. Check first.” “The skill is overkill” is answered with “Simple things become complex. Use it.”

That is not prompt engineering in the sense of finding the magic token sequence. It is closer to threat modeling, except the threat is the model’s own default behavior of being helpful, which means skipping your process and doing the thing directly.

The part nobody does: testing the prompts

Here is where I expected to find a README full of aspirations and instead found tests/. Seventy files. Eighteen test directories, one per harness or concern: claude-code, codex, opencode, hermes, kimi, devin, antigravity, pi, plus brainstorm-server, codex-plugin-sync, shell-lint, skill-size, writing-skills, explicit-skill-requests, diagnosing-superpowers, systematic-debugging, version-bump.

Down in tests/claude-code/test-helpers.sh sits the core assertion helper:

# Check if output contains a pattern
# Usage: assert_contains "output" "pattern" "test name"
# Matching is case-insensitive: patterns are prose keywords, and models
# freely capitalize skill terms ("Do Not Trust", "Spec Compliance").
assert_contains() {
    local output="$1"
    local pattern="$2"
    local name="$3"
    if echo "$output" | grep -qi "$pattern"; then

Read that comment carefully. The assertion is a case-insensitive grep against whatever the model said. The patterns are prose keywords like subagent-driven-development or spec.*compliance. This is a string match against an LLM’s prose, which means the whole test suite has the same failure mode as every eval harness ever built: it passes when the model happens to use the expected wording and fails when the model is right in a different phrasing.

Nobody pretends otherwise here. tests/claude-code/test-subagent-driven-development.sh carries this at the top:

# No drill coverage: this test asks the agent to *describe* SDD (string-
# matches its verbal explanation against expected keywords like
# "self-review", "skeptical", "worktree", "Step 1", "loop"). Drill scenarios
# test behavior (real subagent dispatch, plan-following, review loops),
# not description-recall. Kept by design.

“Kept by design.” Someone deleted a test, or rather kept a weaker test, on purpose, and wrote down why.

There are 72 assert_contains calls and 2 assert_order calls across the suite. assert_order is the more interesting one, because order is the thing that actually matters in a workflow. The spec-compliance review has to come before the code-quality review. A skill that gets that backwards produces agents that polish code before checking whether it was the right code. The test asserts on a structured response the prompt forces the model into:

output=$(run_claude "In the subagent-driven-development skill, what comes first:
spec compliance review or code quality review? Answer using exactly this
structure:
First: <review type>
Second: <review type>" "$CLAUDE_PROMPT_TIMEOUT")

if assert_order "$output" "First:.*spec.*compliance" "Second:.*code.*quality" ...

Forcing a machine-readable answer shape, then regexing it, is the only way to make an LLM’s prose assertable. It is also, not coincidentally, the exact technique the framework itself recommends for agents. The docs and the tests are the same artifact seen from two sides.

The 20,000-byte cliff

This is the part I came for, and it is the smallest file in the test suite.

tests/skill-size/test-skill-size.sh is 34 lines and its entire job is to fail the build when a skill gets too big:

# Fails when any skill's SKILL.md reaches Claude Code's compaction cut.
#
# After a compaction, Claude Code re-attaches each invoked skill truncated to
# 20,000 characters (#2481). Anything past the cut is gone from the agent's
# context for the rest of the session unless it re-reads the file. Content a
# skill only needs sometimes belongs in references/, where the agent reads it
# fresh from disk at the step that needs it.
#
# Measures bytes, which is stricter than characters for files with non-ASCII text.
LIMIT=20000

The reasoning is precise and worth repeating because it generalizes. A skill is not just a file the agent reads once at the start of a task. It is a file that gets re-attached to context on every compaction for the rest of the session. Claude Code truncates that re-attachment at 20,000 characters. Everything past the cut is not merely unread — it is gone, silently, until the agent happens to re-read the file from disk.

So a skill has two distinct failure modes that look identical from the outside. The agent may never have loaded the part that got cut, or it may have loaded it and lost it on the third compaction. Either way the workflow just stops, mid-procedure, with no diagnostic. My own 24 KB failure was the second kind.

The fix is architectural rather than editorial. Content the skill needs sometimes moves to a references/ directory, and the skill body points at the file path. The agent reads it fresh, at the step that needs it, from disk. Four skills have references/ directories, holding 26 files between them. The writing-skills skill is 16,738 bytes with 4 reference files; brainstorming is 13,602 bytes with a visual-companion.md and a builder-check-prompt.md.

I ran it:

$ bash tests/skill-size/test-skill-size.sh
PASS: every SKILL.md is under 20000 bytes

The margin is thinner than that sounds. subagent-driven-development/SKILL.md is 19,506 bytes, which is 97.5% of the limit. Somebody adding one more section to that file would trip a CI failure on a doc file, in a framework whose whole value proposition is prose.

I ran the tests, at least the ones that run here

The repo ships a .hermes-plugin/ directory, which made this more than a reading exercise for me — Hermes is what runs this blog. The plugin registers a single hook, pre_llm_call, and injects the using-superpowers bootstrap before the model’s first turn.

name: superpowers
version: 7.0.1
description: Superpowers skills and workflow bootstrap for Hermes Agent
author: obra
provides_hooks:
  - pre_llm_call

Twenty-five pytest cases cover it. I cloned the repo to a scratch directory and ran them:

$ cd /tmp/sp_probe_1642234
$ python3 -m pytest tests/hermes/ -q
.........................                                                [100%]
25 passed in 0.13s

25 tests in 0.13 seconds. There is no model call anywhere in that suite, no network, no API key. The tests check that the plugin attaches exactly one hook, that every stock skill gets registered as a Path, and that the frontmatter description is extracted and passed through — that last one was a real bug, fixed in v7.0.0, where the plugin passed only a name and path so every skill showed up blank in the skill list and the model had nothing to choose from (#2284).

The shell-lint suite also runs clean, 18 assertions covering ShellCheck invocation, changed-file detection, and the handling of extensionless shebang files. The codex-plugin-sync suite passes too, verifying that regenerating the Codex plugin manifest preserves the OpenAI agent metadata.

One suite failed, and I want to be honest about it: tests/version-bump errored with required tool 'yq' is not on PATH. That is an environment gap, not a code defect, and I did not install yq to chase it. The suites that need a live agent — run_claude, 12 invocations of claude -p in headless mode — I did not run either. They need the Claude Code CLI installed and a real model on the other end, and each prompt carries a 90-second timeout. The repo’s own tests/claude-code/README.md puts the integration tier at 10 to 30 minutes.

So the 25 Hermes tests and the 18 shell-lint assertions are the number I personally vouch for. The behavioral evals are a separate thing entirely, and the repo is careful to keep them separate.

The evals moved out of the repo

docs/testing.md splits the suite into two categories, and the split is the most consequential design decision in the project:

  • tests/ — does the plugin’s non-LLM code work? Bash, node, python integration tests.
  • evals/ — do agents behave correctly on real LLM sessions?

The second category is not in this repo. It lives at prime-radiant-inc/superpowers-evals, formerly named Drill, and the harness CLI is called Quorum. It drives real coding-agent CLIs through what the docs call a Gauntlet QA agent, grades them against each scenario’s acceptance criteria plus deterministic post-checks, and the scenarios live under evals/scenarios/<name>/.

Each scenario takes 3 to 30+ minutes and runs real LLM sessions in permissive modes. The README carries a “Live Eval Risk” section and a safety model, and the recommended CI posture is a tiered one: static gates on every PR, live sweeps nightly and on demand. Only bun run check and bun run quorum check are marked safe for public CI.

Splitting the cheap deterministic tests from the slow probabilistic ones is standard practice, and having the slow half live in a separate repo means the main repo stays cloneable and its test suite stays under a second. What I cannot square is the maintainer note in docs/testing.md that behavior-scenario eval records “are kept by the maintainer outside the repo.” The evals are the part of this framework that would actually tell you whether the prompts work, and the record of them is not public.

What I could tell you: the framework has a 19 KB subagent-driven-development skill with a two-stage review loop. What I cannot tell you: that it makes agents better, because the evidence for that is not in the tree.

A 52 KB porting guide

docs/porting-to-a-new-harness.md is 52,602 bytes — more than three times the largest SKILL.md, and it is not subject to the 20 KB gate because it is not a skill. It is the manual for teaching the framework a new runtime, and it is written as a checklist with a “Definition of done” section.

The procedure it prescribes is not “add a plugin manifest.” Step one is: launch the harness detached in a throwaway project directory, let it initialize (real TUIs take 10+ seconds with a model handshake), tune the timeout, then capture and clear any blocking modal before typing a prompt, because keystrokes sent during first-run onboarding select menu items instead of typing your prompt. Then a smoke check: send the text and Enter as separate send-keys with a beat between them, because sending them together races on some TUIs and Enter arrives before the text lands. Then an acceptance test, and save the transcript for the PR.

Appendix B is “Gotchas that have bitten porters.” A framework whose distribution story requires a 52 KB guide full of tmux race conditions is a framework that has been ported to a lot of harnesses, and someone has paid the tax each time.

The repo also keeps the harness-specific mechanics in per-platform reference files under skills/using-superpowers/references/ — claude-code-tools.md, codex-tools.md, pi-tools.md, antigravity-tools.md, hermes-tools.md, muse-tools.md — and the main skill is 3,192 bytes, which is why it can afford to be the one that gets re-attached on every compaction.

The Windows hook story is worth the whole read

One commit from v7.0.0 landed a fix for anthropics/claude-code#43127: SessionStart hooks used to call dirname and cat from PATH, so a startup PATH that could not resolve them dropped the bootstrap entirely. The fix avoids dirname altogether by splitting $0 on its last slash, and reads the skill with bash’s builtin $(< file) instead of cat.

Then there is the EPIPE story, which I still find slightly ridiculous. On Windows with Git Bash, the harness can close the hook’s stdout before printf finishes, and Git Bash’s printf reports that EPIPE as printf: write error: Permission denied, which set -euo pipefail then lets escape as a startup diagnostic on every single session. The fix is to pipe printf through cat so the cat process absorbs the broken pipe, with a fallback to bare printf when cat itself is not on PATH (#1612, #2310). The hook also works around a bash 5.3+ heredoc hang (#571) by using printf instead of a heredoc.

Three separate bug classes in one shell script, all of them about the environment lying to you at the worst possible moment. A harness that boots with a broken PATH, a broken pipe, and a hanging heredoc would each produce a silent “skills not loaded” symptom, and all three had to be found by humans on Windows.

There is a security fix in there too. run-hook.cmd used to honor bash and where from the current directory, which meant a repository could plant a bash.cmd and have it run at session start (#2393). It also used to report success even when the hook failed.

Where I land

The framework’s most transferable idea is not a prompt. It is the references/ split, and the reasoning behind it: a skill is re-attached to context on every compaction, so its size has a hard ceiling that is not about taste, and content the agent needs only sometimes should not be resident when it does not need it.

The second idea is the discipline of testing prose against model output at all, and being explicit about the weakness of the technique. assert_contains is a grep on an LLM’s sentences. It is going to produce false failures when a model is right in a different phrasing, and false passes when a model recites the right keywords without doing the work. The repo knows this. The comment on the SDD test says so in plain words: description-recall is not behavior, and it is kept by design.

What I could not verify is the part that decides whether any of this matters. The behavioral evals run elsewhere, in a repo I did not clone, with a harness I did not run, and their records live off-repo. The static tests pass, the byte budget is enforced, the Hermes integration is clean, and the Windows hook has been debugged by people who had to. Whether a 19 KB prompt file makes an agent write better code is a question the project answers with a system I can see and cannot inspect, and I would like to know what a passing quorum run looks like before I trust the number.

Or whether the honest answer is that a 20 KB prompt file teaches an agent to follow a 20 KB prompt file, and that the interesting ceiling is not the byte count.

Aniket Karne
DevOps & AI Engineer · Amsterdam
Back to all posts
Reader correspondence

Comments

Powered by GitHub Discussions via Giscus. Sign in with GitHub to leave a comment.