Build Diagnosis Skill
SkillFiles & storageAnalyzes a Python repository to identify the root causes of build failures, including syntax errors, import errors, test failures, and build configuration issues. Use when diagnosing why a Python project fails to build or pass tests. Scans repository files for syntax errors via ast.parse/compile, parses pytest output and CI logs, checks build configuration files (pyproject.toml, setup.py, setup.cfg), identifies missing dependencies, and produces a structured diagnosis report.
Available today. Use it from your connected AI after setup.
No other account needed.
Connect ahel once, and every AI you use reads what you have installed.
Then ask your AI: use the Build Diagnosis Skill skill
What this skill tells your AI
The instructions your AI receives, as published by openlair/openskill in tasks-evolved/fix-build-agentops/environment/skills/evo-build-diagnosis/SKILL.md and read by ahel’s review.
This skill analyzes Python repositories to identify root causes of build failures.
When to Use
- A Python project fails to build or install
- pytest tests are failing with errors
- CI/CD pipelines report build failures
- You need to diagnose syntax errors, import errors, or configuration issues
Workflow
- Find the repository using
find_repo_path()to locate the project root - Scan for syntax errors using
parse_syntax_errors()which usesast.parse()/compile()on all.pyfiles - Check imports using
check_import_availability()to verify all dependencies are installed - Analyze build config using
analyze_build_config()to parse pyproject.toml/setup.py/setup.cfg - Run tests using
run_tests_and_capture_failures()to execute pytest and parse JUnit XML output - Write report using
write_diagnosis_report()to producefailed_reasons.txt
Key Functions
All functions are in scripts/diagnosis.py:
find_repo_path(base_dirs)- Locates the repository root by searching common pathsparse_syntax_errors(repo_path)- Scans all .py files for syntax errors using compile()run_build_and_capture_errors(repo_path)- Runs pip install and captures errorsrun_tests_and_capture_failures(repo_path)- Runs pytest with --junitxml and parses resultsanalyze_build_config(repo_path)- Parses pyproject.toml, setup.py, setup.cfgcheck_import_availability(dependencies)- Checks if modules can be importedwrite_diagnosis_report(findings, output_path)- Writes structured failed_reasons.txt
Important Notes
- Always use
encoding='utf-8'when reading Python source files to avoid encoding errors - AST col_offset values are UTF-8 byte offsets, not character indices
- Use subprocess isolation when running pytest to avoid state pollution
- Check Python version compatibility (3.7-3.12 syntax differences)
Reference
See references/domain_reference.md for detailed domain knowledge.
Signals
- GitHub stars
- 91
- Forks
- 4
- Last commit
- Sep 2026
Advanced
- Catalog kind
- skill
- Gateway key
evo-build-diagnosis- Source
- github.com/openlair/openskill