home / skills / duc01226 / easyplatform / fix-test

fix-test skill

/.claude/skills/fix-test

This skill analyzes test suites, identifies failures, and applies targeted fixes to C# projects to improve reliability.

npx playbooks add skill duc01226/easyplatform --skill fix-test

Review the files below or copy the command above to add this skill to your agents.

Files (1)
SKILL.md
1.7 KB
---
name: fix-test
description: "[Fix & Debug] ⚡⚡ Run test suite and fix issues"
argument-hint: [issues]
infer: true
---

Analyze the skills catalog and activate the skills that are needed for the task during the process.

## ⚠️ Anti-Hallucination Reminder

**Before modifying ANY code:** Verify assumptions with actual code evidence. Search for usages, read implementations, trace dependencies. If confidence < 90% on any change, investigate first or ask user. See `.claude/skills/shared/anti-hallucination-protocol.md` for full protocol.

## Reported Issues:
<issues>$ARGUMENTS</issues>

## Workflow:
1. Use `tester` subagent to compile the code and fix all syntax errors if any.
2. Use `tester` subagent to run the tests and report back to main agent.
3. If there are issues or failed tests, use `debugger` subagent to find the root cause of the issues, then report back to main agent.
4. Use `planner` subagent to create an implementation plan based on the reports, then report back to main agent.
5. Use main agent to implement the plan step by step.
6. Use `tester` agent to test the fix and make sure it works, then report back to main agent.
6. Use `code-reviewer` subagent to quickly review the code changes and make sure it meets requirements, then report back to main agent.
7. If there are issues or failed tests, repeat from step 2.
8. After finishing, respond back to user with a summary of the changes and explain everything briefly, guide user to get started and suggest the next steps.

## IMPORTANT Task Planning Notes

- Always plan and break many small todo tasks
- Always add a final review todo task to review the works done at the end to find any fix or enhancement needed

Overview

This skill runs a C# test suite, diagnoses failures, and applies targeted fixes to get tests passing. It orchestrates compile-and-test cycles with dedicated subagents for testing, debugging, planning, and code review, then returns a concise summary of changes and next steps. It emphasizes evidence-first edits and repeatable verification.

How this skill works

The skill first compiles the code to catch syntax or build errors, then runs the full test suite to collect failing tests and stack traces. A debugger subagent analyzes failures and traces root causes, while a planner creates a small, verifiable implementation plan. Changes are applied stepwise, re-tested, and reviewed until all tests pass or a clear blocker is reported.

When to use it

  • You have a C# project with failing unit/integration tests that need systematic fixing.
  • You want an evidence-driven approach that verifies usages and dependencies before changing code.
  • You need end-to-end assistance from compilation to test validation and code review.
  • You prefer small, reversible change batches with re-testing after each step.
  • You want a clear summary of fixes and recommended follow-ups after tests pass.

Best practices

  • Verify assumptions with direct code evidence before editing: search for usages and read implementations.
  • Break work into many small TODOs and include a final review task to catch regressions.
  • Run the full test suite after each change to avoid masking new failures.
  • Keep commits focused and descriptive so code-reviewer can quickly validate intent.
  • If confidence is under 90% for a change, investigate further or ask clarifying questions instead of guessing.

Example use cases

  • Fix a failing unit test caused by a recent API refactor and update callers accordingly.
  • Resolve intermittent test failures by tracing environment or timing dependencies and making tests deterministic.
  • Repair build errors introduced by syntax changes or missing package references and re-run the suite.
  • Improve failing integration tests by identifying and mocking external dependencies correctly.
  • Perform a quick review and minor refactor after tests pass to improve maintainability.

FAQ

What languages and projects does this skill support?

This skill is designed for C# projects and test suites that compile with common .NET tooling.

How are changes validated to avoid introducing regressions?

All changes are made in small steps, each followed by a full test run and a code-review step. The workflow requires evidence collection before edits and includes a final review task to catch regressions.