Principle Test Behavior Not Implementation
Apply when you write, change, or keep a test. Call the code the way its users do and assert the result they observe against a literal expected value. If the test would still pass when every imported function returns undefined, rewrite the assertion or delete the test.
Install
npx skills add adriannoes/awesome-agentic-ai --skill principle-test-behavior-not-implementationgit clone --depth 1 https://github.com/adriannoes/awesome-agentic-ai.git /tmp/awesome-agentic-ai
mkdir -p ~/.claude/skills
cp -r /tmp/awesome-agentic-ai/cursor-claude-codex/skills/pstack/principle-test-behavior-not-implementation ~/.claude/skills/principle-test-behavior-not-implementationPersonal skills live in ~/.claude/skills. Use .claude/skills in a project folder to share a skill with your team.
From the SKILL.md
# Test Behavior, Not Implementation
A test calls the code the way its users do and asserts the result they observe against a literal expected value. A test that asserts which calls the code made, or restates a constant the code contains, does neither.
The check: before you keep a test, ask whether it would still pass if every function it imports returned `undefined`. If yes, it observes no behavior and cannot fail for a defect. Rewrite the assertion or delete the test.
**Why:** A test that cannot fail for a defect costs CI time and review attention and catches nothing. A constant pin also fails when someone edits the constant or the prompt it restates, so it prevents that edit.
**Five shapes that still pass when every imported function returns `undefined`:**
- **Weak or no assertion.** No `expect`, or only `toBeDefined`, `toBeTruthy`, `not.toThrow`, `toBeInstanceOf`, `toBeGreaterThan(0)`.
- **Mock or absence only.** Only `toHaveBeenCalled`, `not.toHaveBeenCalled`, `toBeUndefined`, `toEqual([])`, `toHaveLength(0)`, `not.toBe(wrongValue)`.
- **Self-referential.** The expected value comes from the code under test: `expect(f(a)).toBe(f(a))`, `expect(parsed.url).toBe(buildUrl(...))`.
- **Constant pin.** The assertion restates a hand-maintained constant, config default, table row, or prompt string: `expect(LIMITS.maxTools).toBe(8)`, `expect(PROMPT).toContain("You are")`.Details
- Skill name
principle-test-behavior-not-implementation- Repository
- adriannoes/awesome-agentic-ai
- Path
cursor-claude-codex/skills/pstack/principle-test-behavior-not-implementation/SKILL.md- License
- MIT
- Repo updated
- 2 November 2026
- Copies
- Found in 2 GitHub repos
FAQ
What does the Principle Test Behavior Not Implementation skill do?
Apply when you write, change, or keep a test. Call the code the way its users do and assert the result they observe against a literal expected value. If the test would still pass when every imported function returns undefined, rewrite the assertion or delete the test.
How do I install the Principle Test Behavior Not Implementation skill?
skills CLI (Claude Code, Cursor, Codex and more): npx skills add adriannoes/awesome-agentic-ai --skill principle-test-behavior-not-implementation. Skills go in ~/.claude/skills (personal) or .claude/skills (project), and Claude loads them automatically when a task matches the description.
Is Principle Test Behavior Not Implementation popular?
It lives in adriannoes/awesome-agentic-ai, which has 100 GitHub stars and 27 forks, and is included in 2 curated skill lists.
Related skills
Browserstack
100adriannoes/awesome-agentic-ai
Run tests on BrowserStack. Use when user mentions "browserstack", "cross-browser", "cloud testing", "browser matrix", "test on safari", "test on firefox", or "browser compatibility".
Coverage
100adriannoes/awesome-agentic-ai
Analyze test coverage gaps. Use when user says "test coverage", "what's not tested", "coverage gaps", "missing tests", "coverage report", or "what needs testing".
Fix
100adriannoes/awesome-agentic-ai
Fix failing or flaky Playwright tests. Use when user says "fix test", "flaky test", "test failing", "debug test", "test broken", "test passes sometimes", or "intermittent failure".
Prototyping Pretotyping
200lyndonkl/claude
Guides validation of ideas before full development using pretotyping (fake doors, concierge MVPs, Wizard of Oz) and prototyping at appropriate fidelity (paper, clickable, coded) to test assumptions about demand, pricing, and feasibility. Use when testing ideas cheaply before building, choosing prototype fidelity, running experiments to validate assumptions, or when user mentions prototype, MVP, fake door test, concierge, Wizard of Oz, landing page test, smoke test, or asks "how can we validate this idea before building?".
Option Valuation Toolkit
200lyndonkl/claude
Prices options for valuation work — Black-Scholes with a cost-of-delay yield, binomial trees that allow early exercise, dilution-adjusted employee options for the equity bridge, equity in a heavily levered firm valued as a call on firm value, and implied volatility. Use when employee options or warrants must be subtracted before computing value per share, when a distressed or negative-earnings company's equity still trades above zero, when testing whether a patent, licence, undeveloped reserve or expansion right is a real option that deserves a premium, or when early exercise makes a European
Reference Class Forecasting
200lyndonkl/claude
Anchors predictions in historical reality by identifying a class of similar past events and using their statistical frequency as a baseline (outside view) before analyzing case-specific details. Use when starting a forecast, establishing base rates, testing "this time is different" claims, or when user mentions reference classes, outside view, base rates, or starting a new prediction.
Browse the most popular Claude skills, all testing & qa skills, or write your own with the skills generator.