Evo python build fixer

From OpenLAIR/OpenSkill · View interactive version

Evo python build fixer is an AI agent skill from the GitHub repository OpenLAIR/OpenSkill. Diagnoses and fixes Python repository build failures. Analyzes source code for

How to use this skill

Skill file

evo-python-build-fixer

Description

Diagnoses and fixes Python repository build failures. Analyzes source code for

import errors, syntax errors, missing dependencies, and configuration issues.

Generates standard unified diff patches and applies them.

When to Use

Common Patterns

Pattern 1: Optional Dependency Import Guard

When a module imports from an optional dependency unconditionally, wrap it in try/except:

try:
    from .optional_module import OptionalClass
except ImportError:
    OptionalClass = None

Pattern 2: Conditional Export in __init__.py

When init.py exports symbols from optional modules:

try:
    from .langchain_handler import Handler
except ImportError:
    pass  # langchain not installed

Usage

import sys
sys.path.insert(0, '/app/environment/skills/evo-python-build-fixer/scripts')
from utils import (
    diagnose_repo,
    find_import_errors,
    generate_unified_diff,
    write_patch_file,
    apply_patches,
    write_failed_reasons
)

# Step 1: Diagnose
repo_path = '/path/to/repo'
errors = diagnose_repo(repo_path)

# Step 2: Write analysis
write_failed_reasons('/path/to/failed_reasons.txt', errors)

# Step 3: Generate patches
patch_content = generate_unified_diff(original_lines, modified_lines, filepath)
write_patch_file(patch_content, '/path/to/repo/patch_1.diff')

# Step 4: Apply patches
apply_patches(repo_path, ['/path/to/repo/patch_1.diff'])
Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.