work-test
Skill2 starsChanged 4 months agoMITView on GitHub
Inspect a codebase and write a small number of high-value tests for real, observable behavior using the repository's existing framework and conventions. Use when the user asks to add, improve, or write meaningful tests without optimizing for coverage.
In this repository12 other files it gives its agents.
- AGENTS.mdAGENTS.md
- workSkill
- work-auditSkill
- work-checklistSkill
- work-cleanSkill
- work-concernSkill
- work-helpSkill
- work-ideateSkill
- work-initSkill
- work-planSkill
- work-qualitySkill
- work-statusSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
16 rules. About 0 are common, 16 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈16
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 8
Write meaningful tests for behavior the product genuinely promises or currently depends on.
- Distinctive: line 14
Read the applicable project instructions, repository status and diff, implementation, existing tests and helpers, public APIs, consumers, …
- Distinctive: line 16
If the user did not name a target, choose the smallest coherent feature or current change that can be understood and tested safely.
- Distinctive: line 20
Before editing, provide one entry per justified behavior in this exact format:
- Distinctive: line 27
Keep the plan short. Prefer a small number of high-value tests in this order:
- Distinctive: line 37
Test observable behavior, not internal implementation details.
- Distinctive: line 38
Test negative behavior only when a real contract or regression needs protection.
- Distinctive: line 39
Prefer integration tests for interactions between modules owned by the project.
- Distinctive: line 41
Use realistic inputs and fixtures.
- Distinctive: line 43
Keep each test focused on one behavior without splitting a simple workflow into redundant cases.
- Distinctive: line 45
Do not test unrelated non-events, impossible states the code does not handle, speculative attack surfaces, framework or language behavior, …
- Distinctive: line 49
Use the repository's existing test framework, conventions, helpers, fixtures, and directory structure.
- Distinctive: line 51
Do not modify production code to satisfy an artificial test.
- Distinctive: line 57
Run the narrowest relevant test command first, then the appropriate broader suite.
- Distinctive: line 59
Do not optimize for coverage percentage.
- Distinctive: line 63
Use this compact handoff:
≈ “Common” is an estimate: at least 1 in 5 of the 213,895 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
Work / 4. Test
Write meaningful tests for behavior the product genuinely promises or currently depends on. The testing rules below are binding.
Work directly in the parent conversation. Do not spawn agents or register a goal unless the user explicitly asks. Testing is implementation work: inspect first, show the plan, make the smallest justified edits, run the tests, and report the evidence.
Inspect before writing
Read the applicable project instructions, repository status and diff, implementation, existing tests and helpers, public APIs, consumers, and actual user flows. Identify the behavior users or current callers rely on. Do not invent requirements, hypothetical threats, or unrealistic edge cases.
If the user did not name a target, choose the smallest coherent feature or current change that can be understood and tested safely. State the scope. If no meaningful behavior is worth testing, stop and explain why; never add a test only to increase coverage.
Publish the test plan
Before editing, provide one entry per justified behavior in this exact format:
- Behavior being protected
- Why it matters
- Test level: unit, integration, or end-to-end
- Exact observable assertion
Keep the plan short. Prefer a small number of high-value tests in this order:
- Core happy paths.
- Realistic failure paths.
- Important boundaries.
- Previously broken behavior.
- Data persistence, permissions, billing, authentication, or destructive actions when relevant.
Select meaningful tests
- Test observable behavior, not internal implementation details.
- Test negative behavior only when a real contract or regression needs protection.
- Prefer integration tests for interactions between modules owned by the project.
- Mock external boundaries only when necessary: network APIs, time, randomness, queues, email, payment providers, or databases.
- Use realistic inputs and fixtures. Keep tests deterministic and independent of execution order.
- Assert the actual result, persisted state, returned error, emitted event, or externally visible side effect.
- Keep each test focused on one behavior without splitting a simple workflow into redundant cases.
Do not test unrelated non-events, impossible states the code does not handle, speculative attack surfaces, framework or language behavior, trivial accessors, or library behavior. Do not reproduce the implementation inside the assertion. Do not mock the whole system and merely verify calls.
Implement
Use the repository's existing test framework, conventions, helpers, fixtures, and directory structure. Update obsolete tests when the current owned contract changed; do not retain compatibility tests for a superseded path.
Do not modify production code to satisfy an artificial test. If real behavior is difficult to test, explain the smallest justified production change before making it. Pause for user direction if that change alters public behavior or expands the requested scope.
When a justified test exposes a production bug, preserve and report the evidence. Fix it only when the request clearly includes the repair. Otherwise do not silently broaden test work into product changes or leave the repository with an unexplained failing test; report the exact regression test that should accompany the eventual fix.
Validate
Run the narrowest relevant test command first, then the appropriate broader suite. Re-run failures when useful and distinguish failures caused by this work from established or unrelated baseline failures. Do not claim the suite is green unless the command proves it.
Do not optimize for coverage percentage. Report coverage only when the user explicitly asks, and never use it as a substitute for confidence in real behavior.
Return
Use this compact handoff:
## Work / 4. Test
**Scope:** <implementation and behavior inspected>
### Test plan
| Behavior | Why it matters | Level | Observable assertion |
|---|---|---|---|
| ... | ... | ... | ... |
**Tests added:** <files and cases>
**Behaviors covered:** <real contracts protected>
**Tests deliberately not added:** <omissions and why>
**Actual bugs discovered:** <bugs or none>
**Validation:** <commands and exact results>
**Remaining gap:** <none or the precise unproved boundary>Say complete, partial, or blocked plainly. Completion means every justified test was implemented and the reported validation ran. A no-change result may also be complete when inspection proves that no meaningful test is justified; say that explicitly instead of creating coverage work.
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.

