code-testing
Что он делает
Этот скилл пишет новые тесты, исправляет сломанные или нестабильные тесты и добавляет регрессионные тесты для существующего кода. Он нужен разработчикам, которым требуется лучшее покрытие тестами без ручной настройки.
Когда использовать
- ✓Когда нужны новые тесты для кода, у которого их нет, или тест, который не даст ошибке вернуться.
- ✓Когда существующие тесты падают, нестабильны или нуждаются в более строгих проверках.
- ✓Когда вы хотите заполнить пробелы в покрытии проекта, который использует поддерживаемый фреймворк тестов.
Ссылка на скилл
https://github.com/dotnet/skills/blob/main/plugins/dotnet-test/skills/code-testing/SKILL.mdСкопируйте и вставьте её в ваш ИИ (Claude, ChatGPT или Cursor) с просьбой следовать инструкциям.
Как использовать
Самый простой способ: скопируйте сообщение и вставьте его в свой ИИ. Он прочитает скилл и выполнит инструкции.
Готовое сообщение для вставки
Для Claude Code, Codex или Cursor: запустите в папке проекта, и скилл установится.
Скачайте SKILL.md и положите его в папку скиллов вашего агента.
Пример запроса к вашему ИИ
“Добавь тесты для моего платёжного сервиса, включая регрессионный тест для ошибки с возвратом средств, которую мы исправили на прошлой неделе.”
5 новых скиллов в неделю. 1 минута чтения.
Как это работает
Агент читает код и существующие тесты, выбирает подходящий стиль для фреймворка, пишет случаи и запускает их. Крупная работа сначала планируется по этапам.
Технический текст (оригинальный SKILL.md)
Оригинальный текст автора на английском, прямо с GitHub.
Code Testing Skill
The reliable implicit entry point for generating, repairing, and strengthening
tests. It handles focused work directly and invokes the public test-engineer
agent for broad or multi-stage requests.
Non-negotiable execution contract
Check pipeline ownership first. If the active agent is
test-engineer (including a plugin-qualified name such as
dotnet-test:test-engineer), or the caller assigned you a phase of
that pipeline, do not delegate to another generator. Continue the assigned
work inline. This guard takes precedence over every broad-scope delegation
instruction below, even if this skill was loaded automatically.
Classify scope before editing:
- Broad (a project/package-wide suite, or multiple production
files/modules): create
research.mdandplan.mdin a resolved non-stageable<TESTAGENT_DIR>before implementation, thenstatus.mdthere after the final test-quality review. Whentest-engineeris available, invoke that named custom agent before implementing; do not replace it with a generic subagent carrying the same label or implement the broad request inline. If the state files are absent, the broad workflow is incomplete. - Focused (the user explicitly limits work to one function/class/file or one missing method): do not create intermediate state files or fan out to multiple agents. A sparse project-wide request remains broad even when only one source module is present.
For either scope, run the narrowest relevant test command to a clean exit.
Always apply Report-safe test names and result validation,
including when the caller supplies conventions. Pass this contract to delegated
implementers/testers; preserve edge-case data and validate configured reports,
not just console output.
Keep the handoff proportional: for one to three focused requirements, use a
compact bullet list under a Requirement coverage label that names the tests
and successful command; for broader or multi-requirement work, use a
Requirement | Evidence table. Each requested behavior must cite an exact test
name.
Before sending a broad-scope final response, check that the response itself
contains | Requirement | Evidence | and exact test names for every behavioral
row. A table in a child report or internal plan is not enough. Do not summarize
away those names into module-level bullets or an Area | Tests table.
Intermediate state files are internal working data, never deliverables. Keep
<TESTAGENT_DIR> non-stageable, never place it or its files in
version-controlled workspace content, and never modify .gitignore to hide
them.
Treat completeness as a requirement matrix, not a test-count target. Give every independently requested state, boundary, error path, or interaction its own concrete assertion. Combine cases only when one execution genuinely proves the whole requested combination; do not let a parameterized happy-path case stand in for an empty state, invalid discriminator, or before/at/after boundary. For broad requests that name several production modules or layers, give each named module direct tests for its non-trivial public behavior. Cross-module tests prove composition, but do not substitute for the requested module-level coverage. Judge breadth by the behavior matrix, never by matching or exceeding a raw test count.
At the public entry point, delegate broad work to test-engineer
once. Research, plan, implementation, and review remain required, but they
need not be separate sub-agent calls.
Use only capabilities available in the current runtime. Do not retry a missing
skill under aliases or use another agent to retry a policy-denied operation.
Read language guidance directly from the caller-provided or runtime-listed
code-testing-extensions catalog and its matching language file. It is reference-only,
not an invocable skill. If the bundle is absent, use manifests and representative
tests and report the missing reference rather than searching installation dirs.
If scratch storage is denied, keep the research and plan in context, continue
permitted test edits, and report the missing state artifacts. If execution is
denied, continue permitted static review and report tests as unrun, never passed.
Neither blocker authorizes modifying production code or weakening requirements.
For a broad or comprehensive request, the explicit matrix is the floor, not the
Частые вопросы
Он только запускает тесты?
Нет. Он пишет и исправляет тесты. Запуск тестов сам по себе — отдельный скилл.
Будет ли он сначала планировать большие задачи?
Да. Широкая или многоэтапная работа планируется и фиксируется до написания тестов.
Какие фреймворки он поддерживает?
Он работает с xUnit, MSTest, NUnit, pytest, Jest, Vitest, Go и другими фреймворками.
Подробности
Оригинальное описание автора
ALWAYS USE for test work that requires changes: write, add, generate, repair, or strengthen tests for existing code in xUnit, MSTest, NUnit, pytest, Vitest/Jest, Go, or another framework. Includes regression cases, failing or flaky tests, coverage-driven additions, and audit-then-fix requests. Focused work stays direct; broad or multi-stage work invokes test-engineer. DO NOT USE for only running tests, analysis-only audits, framework/platform migrations, a test blocked on a missing production seam (testability-obstacle), or MSTest API/configuration corrections that do not design new cases (wri
repo: dotnet/skills
Популярность
- Звёзды на GitHub
- 5.8k
- Место в рейтинге
- #14624
- Лицензия
- MIT
- Обновлён
- 02.11.2026
Комментарии
- …
Другие скиллы из этого репозитория
create-custom-agent
5.8kПомогает агенту создавать файлы пользовательских агентов для VS Code со своими инструментами, инструкциями и передачей работы другим агентам.
create-skill
5.8kПомогает агенту создать новый скилл с корректным именем, понятным описанием триггера и файлом SKILL.md по стандарту.
csharp-scripts
5.8kПомогает агенту запустить небольшую программу на C# как один файл с помощью командного инструмента .NET, без создания полного проекта.
dotnet-pinvoke
5.8kПомогает агенту правильно вызывать нативные библиотеки C и C++ из .NET: сигнатуры, работу со строками, память и безопасные дескрипторы.
Похожие скиллы
test-driven-development
311kУчит агента сначала писать падающий тест, увидеть, что он падает, и только затем писать минимальный код, который его проходит, прежде чем создавать любую функцию или исправление.
verification-before-completion
311kУчит агента запускать настоящие проверки и читать их вывод, прежде чем утверждать, что задача, исправление или сборка готовы или проходят.
migrate-to-shoehorn
310kЗаменяет рискованные приведения типов в тестовых файлах на библиотеку shoehorn, чтобы тесты могли использовать неполные данные и проходить проверку типов.