principle-test-behavior-not-implementation
An agent skill by cursor, from cursor/plugins. Tags: code-quality, qa, review, testing, validation.
What it does
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
With the skills CLI, which installs into Claude Code, Codex, Cursor and other agents:
npx skills add cursor/plugins --skill principle-test-behavior-not-implementation
Or copy the skill folder into Claude Code's skills directory by hand (~/.claude/skills for every project, or .claude/skills inside one):
git clone --depth 1 https://github.com/cursor/plugins
cp -r plugins/pstack/skills/principle-test-behavior-not-implementation ~/.claude/skills/principle-test-behavior-not-implementation
Safety box score
Grade A, minimal risk: 0 of 100 risk points, rated 2026-10-16. The grade rates what the skill and its scripts can reach on the machine of whoever installs it, across eight categories from shell execution to secrets access. How the score works.
This skill is documentation-only guidance for writing tests that assert observable behavior rather than implementation. It does not ship code, scripts, network calls, or filesystem actions, so the main risk is conceptual misuse rather than machine or data impact.
| Category | Level | Why |
|---|---|---|
| Code & shell execution | 0 (none) | The only shipped file is `SKILL.md`; there are no scripts, commands, or code to run. |
| Network access | 0 (none) | `SKILL.md` contains no download/upload instructions or remote endpoints. |
| Filesystem reach | 0 (none) | The skill describes testing principles only and does not read, write, or delete files. |
| Secrets & credentials | 0 (none) | There is no mention of tokens, keys, passwords, `.env` files, or credential stores. |
| Privilege & persistence | 0 (none) | No sudo, installs, services, shell startup edits, or OS configuration changes appear in the skill. |
| Instruction hijack surface | 0 (none) | The text gives testing advice and does not instruct the agent to ignore rules, hide behavior, or follow external instructions. |
| Irreversible actions | 0 (none) | It does not deploy, send, publish, pay, merge, or delete anything; it only discusses how to write tests. |
| Transparency | 0 (none) | There are no binaries, encoded blobs, or unreviewable generated artifacts; the content is plain markdown. |
Before installing
- Confirm the skill path contains only `SKILL.md` and no bundled scripts or installers.
- If you want to verify scope, open `SKILL.md` and check that it is purely guidance with no operational commands.
- No special environment checks are needed before using this skill.
Rated 2026-10-16 by an automated review of 1 file from the skill's repository.
Source
- Repository
- cursor/plugins (all skills from this repository)
- Path
- pstack/skills/principle-test-behavior-not-implementation/SKILL.md
- Branch
- main
- Collection
- cursor
- Updated
- 2026-09-23
Related skills
- principle-prove-it-works — Apply after completing a task, before declaring done.
- verify-and-stop — Prove existing work meets acceptance conditions without expanding scope.
- check-compiler-errors — Run compile and type-check commands and report failures
- maintain-verification-skill — Periodic pass that keeps a project's verification skill and feature map honest: parallel source readers per feature, one live session driving every feature.
- tdd — Use only when the user explicitly asks for TDD, a failing test, or a regression test, OR when the bug has an obvious cheap local test target.
- thermo-nuclear-code-quality-review — Run an extremely strict maintainability review for abstraction quality, giant files, and spaghetti-condition growth.