Write tests

SkillFiles & storage

Lets your agent write unit tests for a file or function in the style of your project's existing tests.

Instructions available. Your AI can read the instructions. Execution depends on the setup they require.

Add ahel to your AI once: Claude, ChatGPT, Cursor, Claude Code or Codex. Then ask it to use this.

Then ask your AI: use the Write tests skill

About this skill

Writes unit tests for a specified file or function in the style of the project's existing tests. Use when asked to add tests, cover code with tests, or check edge cases.

What this skill tells your AI

The instructions your AI receives, as published by justxor/claude-code-pro-course in starter-kit/.claude/skills/write-tests/SKILL.md and read by ahel’s review.

Цель: $ARGUMENTS

  1. Найди тестовый фреймворк и 1–2 существующих теста рядом — повторяй их стиль, структуру и расположение.
  2. Прочитай тестируемый код. Составь список сценариев:
    • основной (happy path)
    • граничные значения (пусто, 0, отрицательные, очень большие, unicode)
    • ошибки и исключения
    • взаимодействие с зависимостями (моки — только для внешних систем)
  3. Покажи список сценариев одной строкой каждый, затем напиши тесты.
  4. Запусти только новые тесты. Если тест падает из-за бага в коде — НЕ подгоняй тест, а сообщи о баге.
  5. Итог: сколько тестов, что покрыто, какие баги найдены.

Signals

GitHub stars
143
Forks
26
Last commit
Oct 2026
Advanced
Item type
skill
Key
write-tests-justxor
Source
github.com/justxor/claude-code-pro-course