packtpublishing/claude---master-claude-cowork-claude-code-skills-plugins/test-writer

Claude Code and agent skill by packtpublishing/claude---master-claude-cowork-claude-code-skills-plugins

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

Write tests for existing code. Use when the user asks to add tests, write tests, or improve test coverage.

Install

npx vskill@latest install packtpublishing/claude---master-claude-cowork-claude-code-skills-plugins/test-writer

SKILL.md

Test Writer

Process

  1. Read the source file to understand what it does
  2. Identify all functions, methods, and branches to test
  3. Check if a test file already exists
  4. Write comprehensive tests following the project conventions
  5. Run the tests to verify they pass

Test Structure

describe('ModuleName', () => {
describe('functionName', () => {
it('should [expected behavior] when [condition]', () => {
// Arrange
// Act
// Assert
});
});
});

What to Test

  • Happy path: normal inputs produce expected outputs
  • Edge cases: empty inputs, null, undefined, zero, max values
  • Error cases: invalid inputs throw or return errors
  • Boundary conditions: limits, off-by-one scenarios
  • Async behavior: promises resolve/reject correctly
  • Side effects: external calls are made with correct args

Rules

  • Test file goes next to source: file.ts → file.test.ts
  • Use descriptive test names that read like sentences
  • Each test tests ONE thing
  • Use describe blocks to group related tests
  • Mock external dependencies (APIs, databases, file system)
  • Don't test implementation details — test behavior
  • After writing, run npm test to verify all tests pass
  • Aim for at least 80% coverage of the target file

Security

  • Security scanPassed, 90 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

7-day trend score
0

Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/packtpublishing/claude---master-claude-cowork-claude-code-skills-plugins/test-writer/badge)](https://verified-skill.com/skills/packtpublishing/claude---master-claude-cowork-claude-code-skills-plugins/test-writer)

Something wrong with this skill or its page? Tell us.