/pstack:principle-test-behavior-not-implementationfrom pstack
Enforces testing observable behavior over implementation details. Checks that tests would fail if imported functions returned undefined, and guides rewriting or deleting weak assertions.
Ships in pstack. 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.
None: SKILL.md is the whole skill.
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:
expect, or only toBeDefined, toBeTruthy, not.toThrow, toBeInstanceOf, toBeGreaterThan(0).toHaveBeenCalled, not.toHaveBeenCalled, toBeUndefined, toEqual([]), toHaveLength(0), not.toBe(wrongValue).expect(f(a)).toBe(f(a)), expect(parsed.url).toBe(buildUrl(...)).expect(LIMITS.maxTools).toBe(8), expect(PROMPT).toContain("You are").beforeEach, and the subject never runs inside the body.The fix: call the subject inside the test body with one concrete input and assert the literal output or the observable effect, expect(slugify("Hello, World!")).toBe("hello-world"). For an absence, assert the presence on the other input in the same test. For a constant, test the mechanism that reads it with one input instead of restating the value. For a mock, assert the payload it received or the state after the call, not that it was called. When no such assertion exists, delete the test.
Keep a test of a relation across a table's rows (a key present in two tables, a parent that exists), and a compile-time check in a *.test-d.ts file.
What SKILL.md sets; muted values are Claude Code's defaults
50 skills in this plugin
/architectSettle types, signatures, and module structure before code crosses a function boundary. Use for `architect`, design-this requests, or non-trivial changes where implementation would lock in the wrong shape./arenaRun parallel agent attempts at the same task, choose a base, graft the strongest ideas from the others, and verify the synthesis. Use when the host supports delegation and the artifact has competing approaches./automate-meCreate or improve a personal work-style skill from preferences and evidence in the current conversation or records the user supplies. Use for automate-me and requests to capture how the user works./benchmark-checklistVet a perf measurement (limiter, tuning, limits, errors, repeatability, relevance, and whether the work happened) before you report or act on it. Use when you run a benchmark or report a speedup or regression you measured./blast-radiusFind what a change could break somewhere else before it ships, beyond the diff, and prove the one fact it's safe because of by running real code instead of writing it up. Use for 'blast radius of X', 'what could this break', or reviewing a small diff you don't trust./broRestate the last message in plain human language, with no jargon.4 plugins ship this exact skill · first indexed Sep 16, 2026
npx claudepluginhub raka334/pstack-for-everyone --plugin pstackOther plugins' skills for the same job