Skip to content
W

writing-unit-tests

Writing or refactoring unit tests

by riekeltFree

5
#4442in AI Skills
0In stores

Description

writing-unit-tests is an agent skill from the riekelt/principal-engineer collection, listed on skills.sh. It guides an AI agent in writing o…

Highlights

  • Tests the contract, not the implementation
  • One behavior per test, named as the claim
  • Literal expected values with derivations
  • Arrange, act, assert with no logic in tests

Ratings & Reviews

No ratings yet

Be the first to rate writing-unit-tests.

People also visit

P

principle-test-behavior-not-implementation

Apply when you write, change, or keep a test

AI Skills
Get
T

test

Run /test to write a test suite for code you just built or changed

AI Skills
Get
F

fix-tests

Systematically fix all failing tests after business logic changes or refactoring

AI Skills
Get
T

test-master

Generates test files, creates mocking strategies, analyzes code coverage

AI Skills
Get
T

testing-craft

Writing, reviewing, or refactoring tests

AI Skills
Get
F

frontend-testing

Writing or changing Vitest or React Testing Library tests under `web/` or

AI Skills
Get

writing-unit-tests FAQ

What does the writing-unit-tests skill do?

It guides an AI agent in writing or refactoring unit tests that check behavior rather than implementation details.

How do I install it?

Run: npx skills add https://github.com/riekelt/principal-engineer --skill writing-unit-tests

How should tests be named?

After the claim: subject, scenario and expected outcome, for example expired token is rejected with 401.

Can a test compute its expected value?

No. The skill says expected values must be literals worked out independently, not derived from production code.

Should tests contain loops or branches?

No. The skill says a test with logic needs its own test, and generation belongs in builders and helpers.

What do the security audits say?

Gen Agent Trust Hub: Pass. Socket: Pass. Snyk: Pass.

What are the best writing-unit-tests alternatives?

Popular alternatives to writing-unit-tests include principle-test-behavior-not-implementation, test and fix-tests. See all writing-unit-tests alternatives

Developer Stuff

Badges