testing
Skill8 starsChanged 10 months agoApache-2.0View on GitHub
Create or expand test suites for microservices (unit, integration, consumer-contract tests for HTTP/gRPC handlers, service flows, event consumers, caches, jobs). Use when adding tests, raising coverage, writing regression tests, or validating consumer-facing behavior. NOT for adversarial code review (use review); NOT for final ship-readiness checks (use finish).
123 other projects use a version of this.
Adopted by
Most recently taken up by
- timmo001/skillstheir own version, first seen Oct 5, 2026
- kortix-ai/sunatheir own version, first seen Oct 5, 2026
- gilsmt/skillstheir own version, first seen Oct 4, 2026
- andeeplus/aplustheir own version, first seen Oct 4, 2026
- JetBrains/intellij-communitytheir own version, first seen Oct 3, 2026
- shinpr/codex-workflowstheir own version, first seen Oct 2, 2026
Used with
Projects with it also use oss-pr, pr-automation and 10 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
CES-LtdSkilloss-pr
Use when creating a pull request, after committing changes, or when user invokes /oss-pr. Covers branch management, quality checks, commit, push, and PR creation.
Also in 3 projects that use this
CES-LtdSkillpr-automation
PR Automation Orchestrator: poll open PRs, check CI, run review, fix, and merge eligible PRs. Use when: (1) Invoked by daemon via scripts/pr-automation.sh, (2) User says "/pr-automation".
Also in 3 projects that use this
ffsshhttiikkSkillcicd
Continuous integration and delivery pipelines
Also in 4 projects that use this
ffsshhttiikkSkillnetworking
Practical application and coding skills for Networking
Also in 3 projects that use this
JohnJBorenSkillci-cd
CI/CD pipeline design, GitHub Actions, testing automation, and deployment strategies
Also in 9 projects that use this
Cogni-AI-OUSkilldotfiles
Reference for repository dotfiles, including their purposes, standard configurations, and usage guidelines. You MUST load this skill when configuring, troubleshooting, or understanding repository dotfiles.
Also in 3 projects that use this
- +2 more from CES-Ltd
- +1 more from ffsshhttiikk
Other versions123 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 123
- lobehub/lobehub★ 83ksame name
- iOfficeAI/AionUi★ 33ksame name
- JetBrains/intellij-community★ 21ksame name
- kortix-ai/suna★ 20ksame name
- modelcontextprotocol/inspector★ 11ksame name
- microsoft/fast★ 9.7ksame name
- bytebase/dbhub★ 3.6ksame name
- theopenco/llmgateway★ 1.7ksame name
- BankrBot/skills★ 1.2ksame name
- microsoft/CCF★ 875same name
113 more not listed
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 repository17 other files it gives its agents.
- AGENTS.mdAGENTS.md
- architectureSkill
- archobsSkill
- debugSkill
- designSkill
- finishSkill
- forecastSkill
- intelSkill
- observabilitySkill
- planSkill
- platformSkill
- resilienceSkill
- reviewSkill
- securitySkill
- specSkill
- typescriptSkill
- workflowSkill
The file
We split this skill into the rules it gives an agent
9 rules. 0 are common, 8 are distinctive, and 1 is very specific to this project.
0
Common
Most of the 105 edited versions we read keep these.
8
Distinctive
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
- Very specific: line 16
Outputs: Test suite pinning consumer-visible behavior.
- Distinctive: line 20
Read relevant specs (system + service) and map them to consumer-visible flows and invariants.
- Distinctive: line 25
Add tests for success and failure paths that a consumer can observe (invalid input, downstream failures, permissions, timeouts where …
- Distinctive: line 27
Run focused coverage and iterate until the target is met (default 80% unless the spec says otherwise).
- Distinctive: line 31
When context or time is constrained, these are the load-bearing steps:
- Distinctive: line 47
Coverage gap (existing code): start with the riskiest paths — auth/permissions, error handling, input validation, state transitions.
- Distinctive: line 69
Avoid real network/listen calls in unit tests.
- Distinctive: line 70
Keep tests consumer-focused.
- Distinctive: line 93
When applying this skill, return:
“Common” is measured: kept by at least 6 in 10 of the 105 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Testing (Consumer Test Coverage)
Overview
Improve coverage by exercising consumer-visible behavior with infra mocked and behavior preserved.
Inputs / Outputs
Inputs: Spec/contract artifacts from spec or plan (optional but preferred); consumer-facing entrypoints to test.
Outputs: Test suite pinning consumer-visible behavior; coverage report. Consumed by finish and review.
Workflow
- Read relevant specs (system + service) and map them to consumer-visible flows and invariants.
- Identify consumer-facing entrypoints: HTTP/gRPC handlers, public service methods, event consumers, cache/storage adapters, jobs.
GATE: Do not write tests until consumer-facing entrypoints are identified (step 2). If no entrypoints are listed, go back — tests without identified entrypoints tend to test implementation details.
- Add tests for success and failure paths that a consumer can observe (invalid input, downstream failures, permissions, timeouts where applicable).
- Mock infra boundaries (DB, Redis, network listeners, clocks/timers). Prefer calling handlers/functions directly instead of running real servers.
- Run focused coverage and iterate until the target is met (default 80% unless the spec says otherwise).
Minimum viable execution
When context or time is constrained, these are the load-bearing steps:
- Read specs and map to consumer-visible flows (step 1) — tests must trace back to spec'd behavior.
- Identify consumer-facing entrypoints (step 2) — determines what to test.
- Write success + failure path tests (step 3) — both paths, not just happy path.
- Run coverage (step 5) — verify the tests actually exercise the code.
Steps that can be cut under pressure: mocking strategy optimization (step 4), coverage iteration beyond first pass.
Chooser (What Test Type Where)
- New endpoint / handler change: consumer-visible tests — call handler with mocked dependencies, assert response shape + status codes + error handling.
- Refactor (no behavior change): characterization tests first — pin existing behavior before changing implementation.
- New event consumer / job: feed mixed payloads (valid, invalid, missing fields, duplicates); assert side effects and idempotency.
- Boundary change (DB/cache/client): adapter tests — cover happy path, empty/null results, connection failures, timeouts.
- Cross-service contract change: consumer-contract tests — verify your consumer expectations match the provider's contract.
- Coverage gap (existing code): start with the riskiest paths — auth/permissions, error handling, input validation, state transitions.
Clarifying Questions
- What entrypoints are affected (HTTP handler, gRPC method, consumer, job, adapter)?
- Are there existing specs/contracts that define expected behavior?
- Is this new behavior (need new tests) or existing behavior (need characterization tests before refactoring)?
- What is the target coverage level (default: 80%)?
- What test runner and mocking setup does the project use?
Testing Patterns
- Handler paths: call handler with mocked service, assert response, metrics, and error handling.
- Event consumers: feed mixed payload shapes (missing type, struct/list values, invalid entries).
- Cache/storage: cover cache hit/miss, null/empty results, invalidation behavior.
- Jobs: use fake timers; cover interval runs and error logging branches.
- Observability: assert metrics render and logging mixins without external services.
- Vitest note: if mocked values are referenced by
vi.mockfactories, usevi.hoistedto avoid init-order bugs.
- Vitest note: if mocked values are referenced by
Guardrails
- Preserve externally visible behavior and API shapes.
- Avoid real network/listen calls in unit tests; mock them.
- Keep tests consumer-focused; do not assert internal implementation details beyond outputs/side effects.
Common failure modes
- Tests implementation details instead of consumer-visible behavior (e.g., asserting internal method call counts instead of response shape).
- Defaults to unit tests regardless of context — should use the chooser to pick the right test type.
- Mocks the thing being tested instead of its dependencies — the test exercises the mock, not the code.
- Tests happy path only, skips failure modes — missing tests for invalid input, downstream failures, permission denials, and timeouts.
Commands
- Vitest example:
npx vitest run apps/<service>/**/*.test.ts --coverage --coverage.include='apps/<service>/src/**' - Generic:
cd apps/<service> && npm test -- --coverage
References
- Specs and contracts as test sources:
spec - TypeScript test skeletons:
references/snippets/typescript.md - Related patterns:
Consumer-side contract test,Service integration contract test,Service component test - Telemetry verification (when tests cover boundary logging/metrics):
observability
Output Template
When applying this skill, return:
- What consumer-visible behavior is now pinned (happy path + key failure modes).
- What tests were added/changed (by entrypoint: handler/consumer/job/adapter).
- Coverage/verification results (commands run + outcomes) and any notable gaps/follow-ups.
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.

