Skip to content
Productivity
Skill

/write-tests

Generate unit tests for existing code

From plugin
cowork-os
421154 skills
Install
$ npx -y skills add CoWork-OS/CoWork-OS --skill write-tests --agent claude-code

How it fires

How this skill gets triggered: by you, by Claude, or both.

  • Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
  • You can call itInvoke it directly when you want it.
  • Slash command/write-tests

Context preview

The summary Claude sees to decide when to auto-load this skill.

Generate unit tests for existing code

SKILL.md

write-tests.SKILL.md
name: write-tests
description: "Generate unit tests for existing code"

Write Tests

Purpose

Generate unit tests for existing code

Routing

  • Use when: Use when the user requests missing test coverage for a specific file or module.
  • Do not use when: Don't use for snapshot tests or manual QA-only validation.
  • Outputs: Prioritized test plan and test cases with clear coverage mapping.
  • Success criteria: Includes positive/negative cases and test setup assumptions.

Trigger Examples

Positive

  • Use the write-tests skill for this request.
  • Help me with write tests.
  • Use when the user requests missing test coverage for a specific file or module.
  • Write Tests: provide an actionable result.

Negative

  • Don't use for snapshot tests or manual QA-only validation.
  • Do not use write-tests for unrelated requests.
  • This request is outside write tests scope.
  • This is conceptual discussion only; no tool workflow is needed.

Parameters

| Name | Type | Required | Description | |---|---|---|---| | path | string | Yes | Path to the file to test | | framework | select | Yes | Testing framework to use |

Runtime Prompt

  • Current runtime prompt length: 339 characters.
  • Runtime prompt is defined directly in `../write-tests.json`.
Ships withcowork-os

Local-first personal agentic OS and everything app for coding, knowledge work, web design, automations, and artifacts.

Get the whole plugin