arabelatso/skills-4-se/code-repair-generation-combo
- community
Checking that the SKILL.md file is still in the repository.
Automatically repair buggy code and generate comprehensive tests for Python, Java, and C++ programs. Use when users need to fix logic errors or runtime errors in functions, modules, or repositories. Accepts specifications via natural language descriptions, existing test cases, or input/output examples. Generates corrected code, creates or updates tests to verify correctness and prevent regressions, and produces a detailed report explaining the bug, fix, and testing strategy. Triggers on requests like "fix this bug", "repair this code", "debug this function", or "this code is broken".
Install
npx vskill@latest install arabelatso/skills-4-se/code-repair-generation-comboSKILL.md
Code Repair + Generation Combo
Automatically diagnose and repair buggy code while generating comprehensive tests to verify correctness and prevent regressions.
Workflow
Follow this systematic approach for bug fixing and test generation:
1. Understand the Bug
Read the buggy code - Use Read tool to examine the problematic code thoroughly.
Analyze the specification - Understand expected behavior from:
- Natural language description from user
- Existing failing test cases
- Input/output examples provided
- Error messages or stack traces
Identify the scope - Determine if the bug affects:
- A single function
- Multiple related functions
- An entire module
- Cross-module interactions
2. Diagnose the Root Cause
Trace the logic - Walk through the code execution mentally or with examples.
Identify the bug type:
- Logic error: Code runs but produces wrong results (off-by-one, wrong operator, incorrect condition)
- Runtime error: Code crashes or throws exceptions (null pointer, array out of bounds, type mismatch)
Pinpoint the exact location - Identify the specific lines causing the issue.
Understand side effects - Check if the bug affects other parts of the codebase.
3. Fix the Code
Apply minimal changes - Fix only what's broken, preserve existing functionality.
Use Edit tool - Make precise changes to the buggy code.
Verify the fix logic - Ensure the fix addresses the root cause, not just symptoms.
Preserve code style - Match existing formatting, naming conventions, and patterns.
4. Generate Comprehensive Tests
Load testing patterns - Read the appropriate reference file:
- Python:
references/python-testing.md - Java:
references/java-testing.md - C++:
references/cpp-testing.md
Create test cases covering:
- Normal cases: Typical valid inputs
- Edge cases: Boundary values, empty inputs, single elements
- Error cases: Invalid inputs, null values, exceptions
- Regression cases: Specific inputs that triggered the original bug
Update existing tests if they exist, or create new test files following language conventions.
Use parametrized tests when testing multiple similar cases.
5. Verify and Run Tests
Execute the tests - Use Bash tool to run the test suite:
- Python:
pytest test_file.py -v - Java:
mvn testorgradle test - C++:
./test_executableorctest
Ensure all tests pass - If tests fail, revisit the fix.
Check coverage - Verify that the fix and related code paths are tested.
6. Generate Bug Fix Report
Use the report template - Read assets/bug-fix-report-template.md and populate it with:
- Summary of the bug and fix
- Root cause analysis
- Changes made with file paths and line numbers
- Test coverage details
- Verification of regression safety
Be specific and clear - Include code snippets, test results, and reasoning.
Example Usage
Example 1: Python logic error
Example 2: Java runtime error
Example 3: C++ logic error with examples
Language-Specific Notes
Python:
- Use pytest framework
- Follow PEP 8 style
- Use type hints if present in original code
Java:
- Use JUnit 5 framework
- Follow Java naming conventions
- Handle null safety explicitly
C++:
- Use Google Test or Catch2
- Check for memory leaks with valgrind if applicable
- Handle pointer safety and bounds checking
Resources
references/ - Testing patterns and best practices for each language assets/ - Bug fix report template for consistent documentation
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/code-repair-generation-combo/SKILL.md
Popularity
- Repository stars
- 252
- Repository forks
- 24
- 7-day trend score
- 28
Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 20 Mar 2026, 7 months ago.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/arabelatso/skills-4-se/code-repair-generation-combo)