code-repair-generation-combo

Solid

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".

AI & Automation 160 stars 17 forks Updated today Apache-2.0

Install

View on GitHub

Quality Score: 87/100

Stars 20%
73
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
80
License 10%
100
Description 5%
100

Skill Content

# 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. **Preser...

Details

Author
ArabelaTso
Repository
ArabelaTso/Skills-4-SE
Created
6 months ago
Last Updated
today
Language
Python
License
Apache-2.0

Similar Skills

Semantically similar based on skill content — not just same category