agentleFS
sergvsssergvss/agents-best-teams/skills/test-first/SKILL.md

test-first

Skill2 starsChanged 17 days agoMITView on GitHub

Use when about to fix a bug or add new logic - a function, a branch of behaviour, an input check, a calculation - before writing the implementation code. Not for configuration, documentation, layout or a prototype the user called throwaway.

24 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use security-sweep, refactor and 3 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • n24q02mSkill

    security-sweep

    Graph-driven security sweep -- scan for dangerous sinks, then rank each finding by whether an entry point can actually reach it, and triage the rest into suppressions.

    Also in 3 projects that use this

  • GitHubSkill

    refactor

    Surgical code refactoring to improve maintainability without changing behavior. Covers extracting functions, renaming variables, breaking down god functions, improving type safety, eliminating code smells, and applying design patterns. Less drastic than repo-rebuilder; use for gradual improvements.

    Also in 4 projects that use this

  • MicrosoftSkill

    api-design

    Guide for designing and documenting RESTful APIs. Use when asked to design an API, create endpoints, or document an API.

    Also in 3 projects that use this

  • GoogleSkill

    code-review

    Adversarial systems, concurrency, memory-model, and architecture code review protocol. Use this skill whenever asked to review code, PRs, diffs, or branches in Filament.

    Also in 4 projects that use this

  • SentrySkill

    skill-creator

    Create new agent skills following the Agent Skills specification. Use when asked to "create a skill", "add a new skill", "write a skill", "make a skill", "build a skill", or scaffold a new skill with SKILL.md. Guides through requirements, writing, registration, and verification.

    Also in 3 projects that use this

The file

Files
SKILL.md

Тест сначала

  1. Красный. Один тест на одно поведение; имя называет поломку, которую он ловит.
  2. Проверь красный — обязательно. Запусти: тест падает на проверке и по ожидаемой причине, а не ошибкой импорта или опечаткой. Упал не так — чини тест.
  3. Зелёный. Минимальный код, после которого тест проходит.
  4. Весь набор проекта зелёный — не один свой файл.
  5. Рефакторинг — только при зелёных тестах.

Баг — первым делом тест, который воспроизводит его и падает на текущем коде. Исправление без такого теста не принимается.

Код уже написан до теста — не удаляй. Напиши тест, затем сломай проверяемое поведение (откати исправление): тест обязан покраснеть. Не покраснел — он ничего не проверяет. Верни код.

Хороший тест проверяет поведение, а не текст файла; настоящий код, а не мок; ожидаемое значение не вычисляется тем же кодом.

В отчёте — команда и вывод красного прогона и итог зелёного прогона всего набора.

Оправдания, которые не отменяют красный тест:

МысльКак на деле
«Срочно, нет времени»Красный тест — минута. Неудачная правка без теста стоит отката и второго захода
«Правка в одну строку, тут нечего проверять»Однострочный баг и возвращается одной строкой — тест держит его навсегда
«Пользователь сказал без формальностей»Это про длину ответа, а не про отказ от теста. Пропустить тест можно только по явной просьбе «без тестов»

Полный текст: ${CLAUDE_PLUGIN_ROOT}/checklists/test-first.md

Если методология установлена копированием — файл лежит в checklists/test-first.md репозитория.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.