Unit Test

Write excellent unit tests — FIRST, AAA, Right-BICEP. Use when the user asks to "write tests", "add unit tests", "add tests", "this needs tests", or any scenario involving writing or reviewing unit tests.

223 stars 42 forksTesting & QA

Install

skills CLI (Claude Code, Cursor, Codex and more)
npx skills add NeverSight/learn-skills.dev --skill unit-test
Manual install
git clone --depth 1 https://github.com/NeverSight/learn-skills.dev.git /tmp/learn-skills.dev
mkdir -p ~/.claude/skills
cp -r /tmp/learn-skills.dev/data/skills-md/0xlxx/skills/unit-test ~/.claude/skills/unit-test

Personal skills live in ~/.claude/skills. Use .claude/skills in a project folder to share a skill with your team.

From the SKILL.md

<unit-test>

<core-principle>
A great unit test isn't a bug-finding tool — it's **executable documentation**. A new teammate should understand what the code does by reading the tests three months later. The baseline: FIRST — Fast, Independent, Repeatable, Self-validating, Timely. Break any of these and it's not a unit test.
</core-principle>

<rules>

### 1. AAA — every test does exactly three things

**Arrange → Act → Assert.** Separate the three sections with blank lines so intent is visible at a glance.

```javascript
test('addProduct: should update item count and total price', () => {
    // Arrange
    const cart = new ShoppingCart();
    const product = { id: 1, name: 'Book', price: 100 };

    // Act
    cart.addProduct(product);

    // Assert
    expect(cart.getItemsCount()).toBe(1);
    expect(cart.getTotalPrice()).toBe(100);
});
```

**Red flags:** no visible three-section separation, Arrange exceeds 10 lines (the unit under test is too coupled), Assert is interleaved with Act.

### 2. Right-BICEP — scan every dimension when you don't know what to test

After writing a function, run through these six letters to catch missing cases:

| Letter | Meaning | Ask yourself |
|--------|---------|-------------|
| **R**ight | Happy path | Does it return the correct result for normal input? |
| **B**oundary | Edge cases | null, empty string, 0, negative, MAX_VALUE, empty array, out-of-bounds — all covered? |
Read the full skill on GitHub

Details

Skill name
unit-test
Path
data/skills-md/0xlxx/skills/unit-test/SKILL.md
Repo updated
18 November 2026

FAQ

What does the Unit Test skill do?

Write excellent unit tests — FIRST, AAA, Right-BICEP. Use when the user asks to "write tests", "add unit tests", "add tests", "this needs tests", or any scenario involving writing or reviewing unit tests.

How do I install the Unit Test skill?

skills CLI (Claude Code, Cursor, Codex and more): npx skills add NeverSight/learn-skills.dev --skill unit-test. Skills go in ~/.claude/skills (personal) or .claude/skills (project), and Claude loads them automatically when a task matches the description.

Is Unit Test popular?

It lives in NeverSight/learn-skills.dev, which has 223 GitHub stars and 42 forks.

Related skills

Council

223

NeverSight/learn-skills.dev

Convene the Council of High Intelligence — multi-persona deliberation with historical thinkers for deeper analysis of complex problems.

Other42

Megaeth Developer

223

NeverSight/learn-skills.dev

End-to-end MegaETH development playbook (Feb 2026). Covers wallet operations, token swaps (Kyber Network), eth_sendRawTransactionSync (EIP-7966) for instant receipts, JSON-RPC batching, real-time mini-block subscriptions, storage-aware contract patterns (Solady RedBlackTreeLib), MegaEVM gas model, WebSocket keepalive, bridging from Ethereum, and debugging with mega-evme. Use when building on MegaETH, managing wallets, sending transactions, or deploying contracts.

Software Development42

Openclaw Stock Skill

223

NeverSight/learn-skills.dev

使用 data.diemeng.chat 提供的接口查询股票日线、分钟线、财务指标等数据,支持 A 股等市场。

Finance & Crypto42

Kranz Services

62

kranz-org/kranz

Use existing Kranz runtimes via MCP to inspect services, logs, ports, actions, and plans, or to start, stop, restart, and handle confirmation tokens. Also use before starting a dev server, worker, Docker stack, build, test, or migration. If no matching runtime exists, use the project's normal workflow.

Testing & QAIn 1 list

Testing Patterns

223

NeverSight/learn-skills.dev

Cross-language testing strategies and patterns. Triggers on: test pyramid, unit test, integration test, e2e test, TDD, BDD, test coverage, mocking strategy, test doubles, test isolation.

Testing & QA42

Ab Test Setup

213

TerminalSkills/skills

Plans a controlled experiment (A/B test) so its result can be trusted: writes the hypothesis, picks one primary metric and the guardrails, computes sample size and run time, specifies how visitors are assigned and when exposure is logged, and reads out the result with a confidence interval. Use when someone says "set up an A/B test", "split test this page", "how many visitors do I need", "how long should the experiment run", "is this result significant", "can I stop the test early", or wants to test a headline, price, layout or onboarding change against the current version.

Testing & QA34

Browse the most popular Claude skills, all testing & qa skills, or write your own with the skills generator.