behavioral-testing
Skill0 starsChanged 9 days agoMITView on GitHub
Use when changing executable behavior or writing unit, integration, or API tests. Select the smallest meaningful test layer, prove changed outcomes and boundaries, and run targeted checks. Browser E2E authoring belongs to e2e-test-authoring.
1 other project uses a version of this.
Adopted by
Most recently taken up by
- caidanw/skillstheir own version, first seen Nov 8, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- caidanw/skills★ 11same name
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 repository34 other files it gives its agents.
- chatgpt/AGENTS.mdAGENTS.md
- opencode/AGENTS.mdAGENTS.md
- zcode/AGENTS.mdAGENTS.md
- claude/CLAUDE.mdCLAUDE.md
- agent-doc-authoringSkill
- agent-experienceSkill
- ai-image-promptsSkill
- api-behavior-flowSkill
- architecture-and-performanceSkill
- behavior-auditSkill
- browser-tabs-uiSkill
- code-qualitySkill
- context-compactSkill
- design-principlesSkill
- design-to-deliverySkill
- design-validationSkill
- e2e-test-authoringSkill
- engineering-reviewSkill
- excalidrawSkill
- external-ai-consultSkill
- google-omni-videoSkill
- llm-agent-tool-disciplineSkill
- parallel-subagentsSkill
- qa-test-scenariosSkill
- reliable-executionSkill
- research-and-reuseSkill
- server-security-hardeningSkill
- session-handoffSkill
- shadcn-librarySkill
- sudo-handoffSkill
- task-intakeSkill
- tauri-v2-docsSkill
- test-failure-triageSkill
- user-behavior-flowSkill
The file
We split this skill into the rules it gives an agent
6 rules. About 0 are common, 5 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈5
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 15
Read project instructions, package scripts, CI configuration, nearby tests and the implementation's callers.
- Distinctive: line 18
Write a small case list: trigger, expected observable result, relevant failure/boundary, and suitable layer.
- Very specific: line 21
Use explicit arrange/act/assert, independent cases and deterministic clocks/randomness where relevant.
- Distinctive: line 23
Use isolated local/test storage and disposable fixtures.
- Distinctive: line 24
Run the changed cases and applicable existing quality checks, then affected callers if a shared contract changed.
- Distinctive: line 29
Do not add trivial implementation-mirroring tests or demand 100% coverage.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Behavioral testing
Purpose
Protect the changed contract with tests that would catch an incorrect implementation, not tests that merely mirror it.
When to use
Behavior changes, regression fixes, and unit/integration/API test authoring. Project test conventions override these defaults.
Preconditions
Read project instructions, package scripts, CI configuration, nearby tests and the implementation's callers. Identify the runner and target environment; do not install a second framework by default.
Workflow
- Write a small case list: trigger, expected observable result, relevant failure/boundary, and suitable layer.
- Unit: isolate business decisions and transformations. Integration: prove component/persistence boundaries. API: exercise the actual HTTP route, validation, authentication, authorization and response contract. E2E: reserve for essential user journeys; use the E2E skill.
- For a bug, write a regression that fails on the original behavior for the expected reason. For new behavior, make a focused failing test when the existing harness supports it. Implement the smallest change and observe the test pass; do not report red/green evidence you did not run.
- Use explicit arrange/act/assert, independent cases and deterministic clocks/randomness where relevant. Mock external boundaries, not the decision under test. Assert outcomes rather than private call order.
- API case selection: valid request; invalid body/query/params; unauthenticated and forbidden role/ownership; not found; conflict; pagination limits; relevant side effects and rollback. Select cases affected by the endpoint, not an exhaustive template for every change.
- Use isolated local/test storage and disposable fixtures. Verify persistence through an independent read when that is the contract. Clean up only owned data, including after failure.
- Run the changed cases and applicable existing quality checks, then affected callers if a shared contract changed. If no harness exists, choose a compatible minimal setup within scope or document the blocker and concrete cases left unverified.
Rules
- One case proves one outcome; several assertions may establish that outcome.
- A route unit test with mocked guards is not evidence that HTTP authentication works.
- Do not add trivial implementation-mirroring tests or demand 100% coverage. Prioritize business risk and regressions.
- Snapshot updates require inspected, intentional changes. Test failures use
test-failure-triage.
Common mistakes
Mocking everything; testing only the happy path; shared mutable fixtures; asserting a status without payload/side effects; treating skipped tests as passed.
Validation
Record the command and actual result. Confirm the regression detects the original defect when feasible, tests are independent, and no test touched shared or production data. State missing coverage explicitly.
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.

