liangmiqwq/skills

adding-tests

Load this skill when a project includes tests, and you are finishing things like bug fix or feature addition and you plan to do tests related work.

First seen Jun 11, 2026

Installation

$ npx skills add liangmiqwq/skills --skill adding-tests

Similar popular skills

Related neighbors and high-traction skills in the same topics — useful to compare before installing.

Also in this package

Other skills from liangmiqwq/skills · top by installs.

npx skills add liangmiqwq/skills

Browse all from liangmiqwq/skills

More details

Agent compatibility

Declared targets from SKILL.md / docs. Unmarked agents are not listed — the skill may still install via the CLI.

Claude Code Not declared
Cursor Not declared
Codex Not declared
GitHub Copilot Not declared
Windsurf Not declared
Gemini CLI Not declared
Cline Not declared
OpenCode Not declared

Repository health

Stars 1
License LICENSE
Default branch main
Open issues 0
Status Active

Package contents

Files included with this skill beyond the listing page.

  • skill md SKILL.md 1,556 B
  • docs SUMMARY.md 167 B

History

  1. First seen on skills.sh
  2. First recorded snapshot · 20 installs

SKILL.md

Adding Tests

Core Principle

One test is usually enough. Only add multiple tests if the bug manifests differently under multiple conditions.

Test behavior, not implementation. Validate outcomes, not code paths.

A test's value is measured by:

  1. Does it fail when user-facing behavior breaks?
  2. Does it stay green when internals are refactored?
  3. Does it catch the real issue it was written for?

Routing

Identify your context, then read the corresponding file:

Context When to use Reference
Bug fix Fixing a reported issue, adding a regression guard branches/bug-fix.md
New feature Adding new behavior, validating a spec branches/new-feature.md

Universal Rules

These apply regardless of context:

  • Prefer integration tests — they catch real bugs; unit tests rarely do for most projects
  • Mock as little as possible — use real deps, temp dirs, test guards
  • One behavior per test — don't combine multiple assertions for unrelated behaviors
  • Test the public surface — never modify production code (add params, expose internals) to make a test work

Read the relevant branch file for context-specific guidance.