Skip to content
Back to skills

Cf Test Writer

ASecurity

When the user asks to write tests, add test coverage, generate test cases, or says "this needs tests" — activate this skill to generate framework-matching tests

  • 2 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added November 11, 2026
testinggo

Security analysis

A100/100

Scanned November 11, 2026

npx -y skills add pauldx/claudifying --skill cf-test-writer --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Cf Test Writer?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Cf Test Writer
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/pauldx-cf-test-writer/badge)](https://www.skillsdirectory.com/skills/pauldx-cf-test-writer)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: test-writer
description: When the user asks to write tests, add test coverage, generate test cases, or says "this needs tests" — activate this skill to generate framework-matching tests
---

# Test Writer Skill

## Goal

Generate thorough, reliable tests that match the project's existing test framework and conventions. Tests should pass on the first run.

## Constraints

- **Match the project's style exactly** — file location, naming, imports, helpers. Find existing tests first.
- **Always run the tests** after writing them. If they fail, fix them before reporting done.
- Mock external dependencies (DB, network, filesystem) but never mock the code under test.
- Cover: happy path, edge cases (null, empty, boundary), and error cases (thrown exceptions, rejected promises).

## Key Principle

Discover, don't assume. Read the project's test setup before writing a single test. The framework, directory structure, assertion library, and mock patterns are all discoverable from existing tests.

## Gotchas

- **Co-located vs `tests/` directory**: Some projects put tests next to source, others in a separate `tests/` tree. Get this wrong and the test runner won't find your tests.
- **Import paths**: Test files often need different import paths than source files. Check existing tests for the pattern.
- **Mock cleanup**: Forgetting to reset/restore mocks between tests causes cascading failures that look like real bugs.
- **Async tests**: Missing `await` on assertions is the #1 cause of tests that pass when they should fail.
- **Snapshot tests**: Don't generate snapshots unless the project already uses them — they create noisy diffs.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in testing →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.