spike-and-stabilize
Skill1 starsChanged 3 months agoMITView on GitHub
Use when a genuine unknown blocks progress — "can this even be done?", an unfamiliar API or library, an uncertain approach — and you're tempted to either research forever or build production code around something you don't yet understand. Not for wiring a known design thinly end-to-end (that's walking-skeleton), nor for polishing working code (whittler)
In this repository23 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- .cursor/rules/beads.mdcCursor rule
- beadsSkill
- builderSkill
- consulting-codexSkill
- dispatching-subagentsSkill
- evidence-before-claimsSkill
- finishingSkill
- hacking-workflowSkill
- naming-as-designSkill
- planningSkill
- reading-like-proseSkill
- reviewing-workSkill
- shapingSkill
- subtraction-firstSkill
- test-firstSkill
- using-beadsSkill
- using-hackinatorSkill
- using-worktreesSkill
- walking-skeletonSkill
- whittlerSkill
- writing-skillsSkill
The file
We split this skill into the rules it gives an agent
3 rules. About 0 are common, 3 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 10
Core principle: When you don't know whether something is possible or how it behaves, write a
- Distinctive: line 35
Throw the spike away: Delete it, or move it aside where it can't be mistaken for real code.
- Distinctive: line 57
Genuine exception: if the spike was trivial *and* you'd write it identically now, keeping it is fine — but say so out loud ("keeping the …
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Spike and Stabilize
Overview
Core principle: When you don't know whether something is possible or how it behaves, write a throwaway probe to find out — fast, ugly, deliberately disposable — then throw it away and rebuild the answer cleanly. Learn in the spike; keep only in the stabilize.
A spike is an experiment, not a foundation. Its only product is knowledge. You are allowed to write terrible code in a spike precisely because none of it survives.
Why Two Phases
Trying to learn and build well at the same time does neither well: you write careful, defensive, abstracted code around behavior you don't understand yet — and half of it is wrong because your understanding was wrong. Separating the phases lets each be honest. The spike is cheap because it's disposable. The rebuild is clean because you finally know the answer.
The Two Phases
Phase 1 — Spike (learn)
- Timebox it. Pick a limit up front (30 min, an afternoon). The clock forces the question to be sharp.
- Answer one question. "Can I get X from this API?" "Does this approach handle Y?" Write the ugliest code that answers it. No tests, no structure, no error handling.
- Optimize for learning, not keeping. Hard-code,
print, copy-paste, comment out. It's scaffolding. - Write down what you learned the moment you know it — the answer outlives the code.
Phase 2 — Stabilize (keep)
- Throw the spike away. Delete it, or move it aside where it can't be mistaken for real code.
- Rebuild for keeps with everything you now know: clean structure, real error handling, tests.
- The rebuild is fast — the hard part (understanding) is already done.
The Iron Rule
THE SPIKE DOES NOT GET PROMOTEDThe single most common failure is the spike quietly becoming the product. It works, so why rewrite it? Because it was written by someone who didn't understand the problem — you, an hour ago. Spike code carries every wrong assumption you've since corrected, in code you stopped reading critically the moment it worked.
| Rationalization | Reality |
| "It already works, rewriting is wasteful" | It works by luck around assumptions you've since disproven. |
| "I'll clean it up in place" | In-place cleanup keeps the wrong bones. Deletion forces the right ones. |
| "I'll lose the working version" | You keep the knowledge, which is the part that mattered. |
| "There's no time to rebuild" | The rebuild is the cheap phase. You already paid for the expensive one. |
Genuine exception: if the spike was trivial and you'd write it identically now, keeping it is fine — but say so out loud ("keeping the spike; it's already what I'd write") rather than sliding into it by default.
Quick Reference
| Phase | Goal | Code quality | Fate |
| Spike | Answer one question | As ugly as it takes | Deleted |
| Stabilize | Ship the answer | Clean, tested | Kept |
Relationship to Other Skills
The builder persona reaches for this when an unknown blocks the walking-skeleton. Once the answer is stabilized, hand the clean result to whittler if it wants a final craft pass.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

