
Principle Test Behavior Not Implementation
Test assertions that check observable behavior, not the internals that produce it.
- CCM score
- 58 of 100
- skills.sh installs
- 3.5K
- GitHub stars
- 19.4K
- last updated
- Nov 25, 2026
Own this skill? Claim it
What it does
- Covers judging each test against two edits: breaking observable behavior and changing internals while keeping results
- Keeps tests that fail on a broken result and pass on internal refactors; rewrites or deletes the rest
- Drives code through its public interface with concrete inputs and derives expected values from the requirement, not the code
- Treats what an external service receives as behavior, but a call to an internal helper as implementation
- Designed for writing, changing, or reviewing tests where assertions should survive refactoring
Install
$ npx -y skills add cursor/plugins --skill principle-test-behavior-not-implementation -yInstalls into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.
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.
Details
- Repository
- github.com/cursor/plugins
- Category
- Testing & QA
- First seen
- Nov 25, 2026
More from cursor/plugins
All 93- Make Pr Easy To Review3.5K
- Thermo Nuclear Review3K
- Fix Merge Conflicts3K
- Control Cli2.8K
- What Did I Get Done2.8K
- Review And Ship2.8K
- Principle Explain The Number2.8K
- Verify This2.7K
- Correct2.7K
- Weekly Review2.7K
- Benchmark Checklist2.7K
- Fix Ci2.7K
- Control Ui2.6K
- Pr Review Canvas2.5K
- Poteto Help2.5K
- Check Compiler Errors2.5K
- Thermos2.4K
- Get Pr Comments2.4K
- Loop On Ci2.3K
- New Branch And Pr2.3K
- Run Smoke Tests2.3K
- Create Formal Verification Skill2.3K
- Workflow From Chats2.3K
- In Your Own Words2.2K
Similar to Principle Test Behavior Not Implementation
More Testing & QA
provider-test-patternshashicorp/agent-skills3.5K installsTerraform provider acceptance test patterns using terraform-plugin-testing with the Plugin Framework. Covers test structure, TestCase/TestStep fields, ConfigSta
testing-setupandroid/skills3.4K installsAnalyze and create a testing strategy for native Android apps - install testing libraries, set up test infrastructure, create harnesses for unit tests, UI tests
playwright-testingalinaqi/maggy3.4K installsplaywright testing
vitestonmax/nuxt-skills3.3K installsUse when writing unit/integration tests for Vite projects - configure vitest.config.ts, write test suites with describe/it, create mock implementations with vi.
ux-auditjezweb/claude-skills3.3K installsWalk through a live web app AS a real user to find usability + behavioural bugs that static reviews miss. REQUIRES proof of interaction (typing, clicking, sendi
ce-test-browsereveryinc/compound-engineering-plugin3.2K installsRun browser tests for pages affected by the current branch or PR.