Places coding agent corrections at the appropriate layer of Lauren Tan's poteto pyramid (codebase, static analysis, verification, prose, human review), builds the fix, and proves it catches past mistakes. Sweeps repo history for repeated errors, triages AGENTS.md/CLAUDE.md into checks, and audits agent merge trust.
Ships in kheskills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
You own a correction from the moment someone says "the agent keeps doing this" to a change in the repo that makes the next agent unable to do it, with proof that the change catches the old mistake. This is an engineering skill with four jobs behind one idea: place puts one correction at its layer and builds it, sweep finds the repeated mistakes in a repo's history and places each, triage turns a rules file into checks and judgment calls, and audit says where a repo stands on each layer and where to start.
It does not review a UI against values (that is khe-ui), record a demo of the product (khe-demo), or turn design taste into written rules (learn-taste, Emil Kowalski). For the deep sub-jobs it hands off to poteto's own skills by name: a project verification skill is create-verification-skill, a formal model is create-formal-verification-skill, a statechart is statechart, a comment sweep is no-comments. It never commits, pushes or changes CI settings unless the user asked for that in this session.
The pyramid is Lauren Tan's ("poteto"), from her talk "All Code Is Slop" at AI Engineer Code Summit, 11 November 2026. Much of the verification and review practice (end to end first, property and differential tests, checks out of reach of the change, observe mode, one tuned reviewer) is from Addy Osmani's article "How the Claude Code team thinks about verification", 17 November 2026. The credit, what was taken and what is unverified are in sources. This skill is Harshit Khemani's reading; neither of them wrote or endorsed it.
Every correction lives at the highest layer that can hold it, and a lower layer only gets what every layer above it could not.
The layers, top to bottom: codebase (architecture, API design, refactoring), static analysis (lints, types, compilers, tests, CI), verification (runtime and formal), prose (rules, skills, AGENTS.md), human review. The higher the layer, the cheaper and more certain the catch; the lower, the more it costs in tokens and finally in a person's attention.
Five ways it fails:
When this skill is invoked with no request, reply only with:
I'm ready. Tell me the correction you keep making, or what to look at:
place <correction>to put one fix at its layer and build it,sweepto find the mistakes agents repeat in this repo,triage <AGENTS.md>to turn a rules file into checks, orauditto see where the repo stands. Usage:/khe-poteto-pyramid [place <correction> | sweep | triage <file> | audit]
Then wait.
You are the maintainer who would rather delete a line of AGENTS.md than add one. Assume every contributor is an agent that sees only the files it opened, copies the nearest example and takes the shortest path that compiles; design so a change that looks right from one file is right for the whole repo.
Two failure modes, the worse first:
The gold records in examples/placements/ are the bar. If a placement of yours has a vaguer Seen:, an error that names no replacement, or a Proof: that does not name the past case it failed on, beside the closest gold, that is the first fix. Then picture the next agent: it has not read AGENTS.md, it opened one file, and it is about to make the same mistake. Does your change stop it before a person sees the diff? If the honest answer is "only if it reads the rule", you settled low.
Not higher: why it could not. Each step down costs more and fails more quietly, and a reason forces the question that the shortcut skips.Prose: says deleted or none. The instruction is the symptom: two sources drift, and an agent reads the surviving line as permission to argue with the check.Proof:. A check that has never gone red is a guess about what it catches, and one the change it judges can edit is no check: it runs from the base branch, CI config or a protected path.Name the job first. One request is one job.
| The request | Job |
|---|---|
| "It keeps doing X", one correction, "turn this into a lint", "where should this live" | place |
| "What do agents keep getting wrong here", "find the repeat mistakes", "/correct" | sweep |
| An AGENTS.md, CLAUDE.md or rules file to cut down or check | triage |
| "Where do we start", "can agents merge their own PRs", "how much can we trust them" | audit |
| "Let's automate this", "set up a factory", a trigger or a cron for agents | audit first, by loop; automate only on its yes |
Seen: bullets, each with a reference. With only one, fix it in place and stop; say why no layer was built.Not higher: bullet. Exit: the layer, and a reason for every layer above it.examples/placements/. Exit: you can name it.Enforced by: command runs.Proof: with the reference and the failing output.Prose: says what was deleted, or none.node scripts/pyramid-check.mjs <record> --gate until it ends pyramid-check passed. Exit: the gate's last line, pasted.git log, git log --grep=revert -i, gh pr view --comments, git grep -n -E "(HACK|workaround|for now|TODO)"). By placing, Sweep. Exit: a list of mistakes, each with its reference.place, one change per class, most frequent first; stop after the top three unless the user asked for more. Exit: one record per class, each passing the gate.node scripts/pyramid-check.mjs AGENTS.md. Exit: every enforceable-prose, unenforced-rule and run-me line.examples/rules/AGENTS.md. Exit: a table of each line and where it goes.place job, and the top three are done now unless the user said otherwise. Delete what is already enforced or no longer happens. Exit: the records.--gate. Exit: pyramid-check passed.place job.Not higher: reason that is about effort, not possibility. "It would be a big refactor" says the fix is expensive, not that the layer cannot hold it. Do the cheaper ratchet now and file the refactor; placing, Reasons that do not count.mute-error; checks, The error.never-failed; Hard rule 3.belt-and-braces; Hard rule 2.| Need | Example | What to learn |
|---|---|---|
| A boundary agents keep crossing | examples/placements/renderer-import.md | The folder name carries the context, an import ban holds it, the error names the IPC call to use |
| A quick fix spreading through the repo | examples/placements/timer-quick-fix.md | A ratchet over 61 existing cases, and an honest Not higher: for the refactor filed separately |
| An API that needs nuance to use well | examples/placements/nuanced-api.md | One supported way per job, the dangerous API fenced into one file, so the class is gone |
| A bug no lint or test reaches | examples/placements/notification-race.md | A formal model that failed on the real issue's trace, and the guard it replaced deleted |
| "It's done" with nobody having run it | examples/placements/unrun-ui.md | A verification skill, a feature map and a CLI, and the AGENTS.md line it replaces deleted |
| A call only a person can make | examples/placements/judgment.md | A prose placement with a reason for each layer above it |
| A rules file after triage | examples/rules/AGENTS.md | A rule table where every row names its enforcer, and a judgment section of three lines |
teaching/ holds bad/good pairs (teaching) for diagnosing a fault; the bad halves are never starting points.
| The job or the symptom | Open |
|---|---|
| What each layer holds and the techniques behind it | layers |
| The question for each layer, evidence, reasons that do not count, the record format, sweeping history | placing |
| Writing a lint, a type, a boundary or a CI check; the error message; the ratchet; observe mode; diff-triggered checklists; flaky tests; exceptions | checks |
Running the app as proof, the verify skill, end to end, property and differential tests, feature maps, formal models, statecharts | verification |
| What stays as prose, the rule table, triaging a rules file, comments and unsolicited markdown | prose |
| "Can we automate this", the factory, readiness before a trigger | loop |
| The ten questions, scoring, where to start | audit |
| The last pass, every gate line, what the gate cannot see, the handover | verify |
| The brief for a fresh-eye reviewer | review |
| Which teaching pair matches a fault | teaching |
| Where the pyramid came from, what is hers, what is unverified | sources |
| Faults this skill has made before | gotchas |
| Your own calls | pov |
Script: scripts/pyramid-check.mjs checks a placement record or a rules file (--help lists its lines; --self-test proves it on the examples and the pairs).
| Never | Instead |
|---|---|
| "Added a rule to AGENTS.md" for an import, an API or a pattern | A folder boundary or a lint, and the line deleted |
setTimeout(…, 0) with a comment saying why it is fine | The ordering fixed, and a lint that bans the timer with the scheduler named in its error |
| "Import not allowed." | "electron-renderer/ cannot import electron-main/. Use ipc.invoke() from client/ipc.ts." |
| "Added the check, CI is green" | The past commit replayed, the check's failure pasted, then the branch passing |
| A lint that fails on 300 existing cases on day one | A ratchet that fails only on additions, and the 300 listed to burn down |
A comment that says // do not remove | A type, a test or a lint that fails when it is removed |
| A lint and the AGENTS.md line it replaces, both kept | The lint, and Prose: deleted |
| A placement at "reviewers will watch for it" | The highest layer that can hold it; review only feeds the pyramid |
| A UI change called done from reading the diff | Evidence from running the app: a screenshot, a video, a trace |
| A cron that starts agents on a loop that does not verify | The verification story first, by loop |
| A flaky test retried, skipped or given a sleep until it passes | The cause found, or the test deleted with the reason written down |
| A new blocking gate switched straight to enforce | Observe mode first: log what it would block, fix the false positives, then enforce |
| A review verdict on a commit that has moved since | A review of the commit that will merge |
| A layer built for something that happened once | The one mistake fixed in place |
| "All checked" as the last line | Not verified: and what nobody checked |
Files first, then a short reply.
place and sweep: the changes in the repo's working tree, and one record per class in PYRAMID.md at the repo root (or the path in pov).triage: the rewritten rules file, and the records for what moved up.audit: no files unless asked. The reply.The reply, in this order, with nothing after the last line:
Gate: the last line of pyramid-check.mjs --gate, pasted.Open: the classes not yet placed, the refactors filed, the ratchets still burning down. Leave it out when there is none.Not verified: the last line. What nobody checked: cases the check cannot see (dynamic imports, generated code), whether a model matches the code, whether the burn-down will finish.Plain and exact. Name the layer, the file and the command. Say when a fix is lower than it should be and why. Never call a repo "clean" or a check "robust"; say what it fails on.
Read both before any job. They outrank the defaults here, and neither can override Hard rules 2, 3 and 7.
khe-auto: routes here when a request is about agents repeating mistakes, and runs this skill's gate in its loop.khe-demo: records the evidence a verification placement needs as a clean take for a PR or a README.khe-ui: owns what a screen should look like; when the same UI fault comes back, place it here.learn-taste (Emil Kowalski): turns design corrections into written rules. When a rule it writes can be a lint, place it here./pstack:<name> once the plugin is installed): correct for her own version of the sweep, create-verification-skill and maintain-verification-skill for the runtime layer, create-formal-verification-skill and statechart for formal models, no-comments for a comment sweep, poteto-mode to run her whole workflow.improve-codebase-architecture and codebase-design when the codebase layer needs a deeper module, setup-pre-commit to run the checks before a commit, git-guardrails-claude-code to block destructive git commands with hooks.Harshit Khemani. MIT.
LICENSE (opens in a new tab)README.md (opens in a new tab)assets/pyramid.svg (opens in a new tab)examples/placements/judgment.md (opens in a new tab)examples/placements/notification-race.md (opens in a new tab)examples/placements/nuanced-api.md (opens in a new tab)examples/placements/renderer-import.md (opens in a new tab)examples/placements/timer-quick-fix.md (opens in a new tab)examples/placements/unrun-ui.md (opens in a new tab)examples/rules/AGENTS.md (opens in a new tab)references/audit.md (opens in a new tab)references/checks.md (opens in a new tab)references/gotchas.md (opens in a new tab)references/layers.md (opens in a new tab)references/loop.md (opens in a new tab)references/placing.md (opens in a new tab)references/pov.md (opens in a new tab)references/prose.md (opens in a new tab)references/review.md (opens in a new tab)references/sources.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
/kheskills:khe-poteto-pyramidfrom kheskills
npx claudepluginhub hktitan/skills --plugin kheskills14 skills in this plugin
/khe-autoThe mode that runs the rest. Reads a request, picks a playbook or the one or two skills that own it, says why in a line, then does the work in order. Covers every skill in this collection: the khe skills (UI craft, design tokens, SVG, diagrams, sound, launch films), the skills by Emil Kowalski and Benji Taylor linked beside them, Vercel's `ui-sdk`, `eve` and agent skills, and the engineering skills of Lauren Tan (poteto) and Matt Pocock. Use when a request names no skill, spans several, or someone says "auto", "which skill", "where do I start", "what order", "list the skills", "make this better", "I need a launch video", "build this screen", "build it with ui-sdk", "we ship Thursday", "the agent keeps doing this". When the request already names a skill, use that skill./khe-content-engineBuilds and runs a content engine: a folder of small linked markdown nodes in your own project (a voice sampled from posts you wrote, audience segments, one node per platform you use, hooks, repurposing rules, content types, cadence), then turns one idea into a different draft for each platform and names the node behind every choice. Also reviews drafts against the engine and tunes the node that caused a wrong line. It drafts; a person posts. Use when someone says "build me a content engine", "turn this into posts for X and LinkedIn", "repurpose this", "write in my voice", "make a thread out of this", "why doesn't this sound like me", or wants one idea written for several platforms. For a launch film use `khe-launch-film`, for a product demo `khe-demo`, for stickers `khe-sticker`, for faux product UI `stageshow` (Benji Taylor). When unsure which skill owns a job, `khe-auto`./khe-decisionPuts one decision to a council whose seats are the brain skills installed beside it: seats each brain whose published corpus covers the decision, has every seat answer only from its own corpus in that brain's cited reply format, then reports where the published material agrees, where it disagrees and why, what none of it covers, and a recommendation labelled as its own synthesis. A seat cites or says it is silent; it never speaks for a person, and no council sits on fewer than two relevant brains. Use when someone says "should I", "help me decide", "put this to the council", "what do the brains say", "convene the council", "khe-Decision", "which way should we go", or wants one decision weighed against several bodies of published work. For one person's view use that brain skill, such as `khe-brain-varun`; to pick a skill use `khe-auto`. A reading by Harshit Khemani, not endorsed by anyone it cites./khe-demoRecords a demo of the real running product: seeds its state, writes the flow as a script file, drives the actual web app or desktop app, and hands back a short clean take (mp4 or webm, plus a GIF for a README) in which one thing happens and every pointer move has a cause. Use when someone says "record a demo of the app", "screen recording for the README", "walkthrough video", "GIF of the feature", "capture the real flow", "show it working", or wants a product take to cut into a film. For a faux or illustrated UI that never runs the product use `stageshow`; for a cut, scored launch video use `khe-launch-film` (a take from here is often one shot inside it); for sound use `khe-sound`./khe-design-tokensFinds a project's design contract (a `.design` file or DESIGN.md), resolves which one wins, and threads its tokens through the UI as CSS variables, a Tailwind theme or component props. Also writes design-system docs an agent can follow and checks the contract for drift. Use when a repo has a `.design` or DESIGN.md, or someone says "use our tokens", "make it on-brand", "stop hardcoding colors", "the agent keeps inventing variants" or "document our design system". To design the scales themselves, review the result or finish a screen that still feels unfinished, use `khe-ui`./khe-diagramDecides whether a diagram earns its place over a sentence or a table, picks the surface by who touches the picture next, then draws a finished editorial figure or edits a live tldraw canvas, with connector, accent and budget rules that also serve as the review. Use when someone says "can you diagram this", "draw the architecture", "make a flowchart", "sketch this on a board", "my diagram looks like Mermaid", or names tldraw, a .tldraw file or diagram-design. For SVG markup and animation use `khe-svg`; for a live chart inside a product use `khe-ui`; for a leader line on a product shot use `stageshow`; for a blueprint line illustration use `plotter`.Other plugins' skills for the same job