Index of every page on this site: llms.txt
All skills
joacod avatar

/test-health

@652e752
by joacodjoacod/skills3 stars
Run it yourself

Slash command only. Audit a repository's automated testing health and recommend a bounded, high-value next improvement slice when this command is invoked to assess an existing test suite, introduce tests into an untested or legacy project, decide what to test next, evaluate testing strategy or coverage, choose between unit, integration, and end-to-end tests, investigate brittle or flaky tests, or determine whether a small architecture change is needed for testability. Detect and prefer the repository's existing stack and conventions. Improve testing incrementally rather than pursuing arbitrary coverage targets.

Use this Skill: https://skilld.dev/gh/joacod/skills/test-health

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

referencestest-quality.md

≈1.1k tokens on demand. Your agent reads this file only when SKILL.md points to it.

Test quality

Sample enough real tests to understand the repository's testing habits. Judge whether the tests make changes safer, not whether they look sophisticated.

Behavior and implementation

Prefer tests that state what a caller or user can observe: a returned result, state transition, persisted outcome, emitted event, response, error, rendered interaction, or CLI effect. A useful test can often survive a substantial internal refactor.

Warning signs include private-method tests, assertions on internal call counts or ordering, reaching around a public interface to inspect storage, and test names that describe implementation mechanics rather than behavior. A test can legitimately assert a collaborator interaction when that interaction is itself the contract at an external boundary; do not apply the rule mechanically.

Avoid tautological assertions that recompute the production algorithm. Expected values should come from an independent example, domain rule, fixture, contract, or known outcome.

Mocks and test doubles

Use doubles deliberately at system seams such as external services, time, randomness, filesystem access, or a database when a real test database is not appropriate. Prefer real in-process collaborators for behavior that belongs to the application.

Excessive mocking can make a test pass while the integration is broken. It can also freeze internal structure and make refactoring expensive. If a test needs to mock most of the application, reconsider the test level or introduce one small seam at the actual external dependency. Fakes and in-memory adapters can be useful when they preserve the relevant contract; they are not automatically better than a test database or a real boundary.

Assertions and readability

A good test has a clear scenario, a name that describes the behavior, focused setup, and assertions on meaningful outcomes. Keep the expected result visible and independent. Multiple assertions are appropriate when they describe one coherent outcome; split unrelated behaviors.

Prefer ordinary test code that a maintainer can read over elaborate fixture abstractions. Shared helpers should remove genuine repetition without hiding important setup. Avoid a test DSL whose indirection makes the scenario harder to understand than the production code.

Isolation and reliability

Check for:

  • shared mutable state or order-dependent setup;
  • fixed ports, global environment variables, or leaked files;
  • arbitrary sleeps and fragile timing assumptions;
  • current time, random IDs, locale, timezone, or platform dependence;
  • live network calls or services that are not controlled by the test;
  • broad fixtures that make unrelated changes affect the test; and
  • retries that hide real failures instead of removing their cause.

A flaky critical test is negative value: it trains developers to ignore the signal. Identify and stabilize the highest-value failure before adding more coverage. Record observed intermittent behavior rather than labeling a test flaky from suspicion alone.

Test-level fit

Choose the cheapest level that still observes the risk with useful fidelity:

  • Unit-like: fast and focused for pure rules and transformations;
  • integration/contract: appropriate for application wiring, persistence, serialization, permissions, queues, and external contracts;
  • system/browser: appropriate for a small number of critical user journeys whose risk is in the rendered or deployed interaction.

Do not enforce a universal ratio. Too much browser coverage can be slow and fragile; too much isolated testing can miss wiring and boundary failures. The right level is the one that gives trustworthy evidence for the specific risk.

Snapshots

Use snapshots only when the whole captured output is a meaningful, reviewed contract and a snapshot diff is easy to interpret. Prefer explicit assertions for important behavior. Do not add snapshots merely because they are quick or because they increase a coverage report.

Speed and maintenance

Consider local runtime, setup cost, failure diagnosis, and how often the test runs. A slower test can be the right choice for a high-fidelity boundary, but its cost should be visible and justified. A fast test that does not exercise the real risk is not a good bargain.

Review whether test data and setup communicate domain intent, whether failures point to the broken behavior, and whether the test is likely to survive normal refactoring. Favor a small number of strong tests over a large number of change detectors.

Source: SKILL.md on GitHub

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

No alerts1mo3 checks · Risk SAFE
  • Gen Agent Trust Hub1mo

    The skill is a repository auditor that collects evidence about a project's testing suite. It is implementation-safe but carries an inherent risk of indirect prompt injection and command execution because it instructs the agent to read and execute commands found in potentially untrusted project repositories.

  • Socket1mo

    No alerts

  • Snyk1mo

    Risk: LOW · No issues

Signed by skilld at 652e752. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub last month.

Steadyupdated last month
user-invocable
true
disable-model-invocation
true

README badge

README badge for joacod/skills/test-health