principle-test-behavior-not-implementation
Skill8 starsChanged yesterdayMITView on GitHub
Apply when you write, change, or keep a test. Assert what the code's users can observe, so that the test fails when that behavior breaks and keeps passing when only the internals change.
60 other projects use a version of this, 27 of them edited; 1 new project in the last 4 weeks, against 0 the 4 before.
Adopted by
Surging: 1 new project took it in the last 4 weeks, none the 4 weeks before.thin data
Most recently taken up by
- BabylonSocial/babylonedited, first seen Nov 30, 2026
- pasevin/pstack-portable-skillsedited, first seen Nov 29, 2026
- MondayNotAGoodDay/skillsword for word, first seen Nov 29, 2026
- karanmrn/karanagentskillsword for word, first seen Nov 29, 2026
- The-Utopia-Studio/skillsedited, first seen Nov 29, 2026
- karanmrn/kstackword for word, first seen Nov 29, 2026
Used with
Projects with it also use Poteto Mode, control-cli and 5 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
The-Utopia-StudioSkillPoteto Mode
poteto's agent style for concise, detailed responses, deliberate subagents, unslopped prose, simple code, and verified work. Use for poteto, /poteto-mode, or requests to work in this style.
Also in 3 projects that use this
ElyzeSolutionsSkillcontrol-cli
Build or adapt a local harness to drive, inspect, and profile an interactive CLI or TUI without external services. Use for CLI UX checks, startup regressions, memory leaks, hangs, prompt flows, or terminal demos.
Also in 4 projects that use this
ElyzeSolutionsSkillcontrol-ui
Build or adapt a local browser/CDP harness to drive and inspect a web, IDE, or Electron UI. Use for local UI verification, screenshots, accessibility snapshots, perf profiles, visual diffs, or reproducing UI bugs.
Also in 4 projects that use this
AnasX7Skillshow-me
Help the user understand the current topic visually with concise diagrams, code-shape sketches, and focused HTML artifacts.
Also in 5 projects that use this
GoogleSkillto-spec
Turn the current conversation into a spec and publish it to the project issue tracker — no interview, just synthesis of what you've already discussed.
Also in 8 projects that use this
GoogleSkilldomain-modeling
Build and sharpen a project's domain model. Use when the user wants to pin down domain terminology or a ubiquitous language, record an architectural decision, or when another skill needs to maintain the domain model.
Also in 8 projects that use this
- +1 more from google
Other versions60 projects use a version of this.
Word for word · 12
- backnotprop/pstack★ 5.4k100% same
- jtaroreh/agystack★ 142100% same
- adjohn/pstack★ 12100% same
- karanmrn/karanagentskills★ 11100% same
- karanmrn/kstack★ 11100% same
- alexnthnz/keel★ 5100% same
- conscientiousness/herdr-pstack-orchestrator★ 2100% same
- conscientiousness/herdr-rex-pstack-orchestrator★ 2100% same
- MondayNotAGoodDay/skills★ 1100% same
- Tashila-109/tstack-skills★ 1100% same
2 more not listed
Edited · 27
- elizaOS/eliza★ 20k25% same
- BabylonSocial/babylon★ 12025% same
- Dimon94/dverity★ 10725% same
- Dimon94/skills★ 10725% same
- dsebban/skills★ 8225% same
- TencentBlueKing/bk-lite★ 7725% same
- stealth-factory/opscope★ 4025% same
- painhardcore/pstack★ 2223% same
- creedants/pstack-t3★ 1998% same
- mariusflorescu/pstack-t3★ 1325% same
17 more not listed
Wrote their own version · 21
- uzairansaruzi/p3-stack★ 126same name
- TheOnlyFusionCube/potetos-for-everyone★ 21same name
- requie/endostack★ 4same name
- dhanji4U/skills★ 2same name
- fullerzz/agent-skills★ 2same name
- JoshueOsuna/pstack★ 2same name
- Timmyy3000/skills★ 2same name
- anhermon/pstack-claude★ 1same name
- iancleary/skills★ 1same name
- ngcto/oh-my-pstack★ 1same name
11 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository59 other files it gives its agents.
- architectSkill
- arenaSkill
- automate-meSkill
- benchmark-checklistSkill
- blast-radiusSkill
- broSkill
- correctSkill
- create-formal-verification-skillSkill
- create-verification-skillSkill
- figure-it-outSkill
- howSkill
- interrogateSkill
- in-your-own-wordsSkill
- ketchupSkill
- ketchup-videoSkill
- maintain-formal-verification-skillSkill
- maintain-verification-skillSkill
- make-bot-uiSkill
- no-commentsSkill
- poteto-helpSkill
- poteto-modeSkill
- principle-attack-the-premiseSkill
- principle-boundary-disciplineSkill
- principle-build-the-leverSkill
- principle-encode-lessons-in-structureSkill
- principle-exhaust-the-design-spaceSkill
- principle-experience-firstSkill
- principle-explain-the-numberSkill
- principle-fix-root-causesSkill
- principle-foundational-thinkingSkill
- principle-guard-the-context-windowSkill
- principle-laziness-protocolSkill
- principle-make-operations-idempotentSkill
- principle-migrate-callers-then-delete-legacy-apisSkill
- principle-minimize-reader-loadSkill
- principle-model-the-domainSkill
- principle-never-block-on-the-humanSkill
- principle-outcome-oriented-executionSkill
- principle-prove-it-worksSkill
- principle-redesign-from-first-principlesSkill
- principle-separate-before-serializing-shared-stateSkill
- principle-sequence-verifiable-unitsSkill
- principle-subtract-before-you-addSkill
- principle-type-system-disciplineSkill
- recallSkill
- reflectSkill
- reframeSkill
- session-reviewSkill
- setup-pstackSkill
- sharpenSkill
- show-me-your-workSkill
- statechartSkill
- swarmSkill
- tddSkill
- teachSkill
- technical-writingSkill
- typescript-best-practicesSkill
- unslopSkill
- whySkill
The file
Files
Test Behavior, Not Implementation
A test is a claim about what users of the code can observe through its interface: return values, errors, state they can read back, and effects on outside systems. Private helpers, internal call order, and intermediate data are implementation.
Judge each test against two imagined edits:
- Break the behavior (a wrong value, a skipped or doubled effect). If the test still passes, it proves nothing. The usual causes are a loose assertion, an expected value computed by the code under test, and an assertion on data the test built itself.
- Change the internals and keep every observable result. If the test fails, it is pinned to the implementation.
Keep a test that catches the first edit and survives the second. Rewrite or delete the rest. Drive the code through its public interface with a concrete input, and derive the expected value from the requirement. What an external service receives is behavior. A call to an internal helper is not. Pair "this never happens" with a case where it does happen. Assert the error type that callers branch on, not the message.
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.

