Awesome-omni-skill autofix-skill
Comprehensive build error repair tool for C++, Rust, and Java projects using Soong, GN, Make, or CMake. Automatically fixes 30+ types of errors including headers, linking, APIs, and config.
install
source · Clone the upstream repo
git clone https://github.com/diegosouzapw/awesome-omni-skill
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/diegosouzapw/awesome-omni-skill "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/tools/autofix-skill" ~/.claude/skills/diegosouzapw-awesome-omni-skill-autofix-skill && rm -rf "$T"
manifest:
skills/tools/autofix-skill/SKILL.mdsource content
AutoFix-Skill
This skill integrates the AutoFix engine to intelligently repair build failures in AOSP, OpenHarmony, and Linux Kernel environments.
capabilities
The skill operates by parsing build logs (or error strings), identifying the specific error type via regex/heuristics, and applying targeted fixes to the source code or build configuration files.
1. Symbol & Header Issues
- Missing Header: Adds
for standard and project headers.#include <...> - Undeclared Identifier: Import/include missing symbols.
- Namespace Errors: Fixes missing
or namespace scopes.std:: - Forward Declaration: Inserts forward decls to resolve circular deps.
2. Linkage & Dependencies
- Undefined Reference: Adds libraries to
/shared_libs
indeps
/Android.bp
.BUILD.gn - Rust Crates: Adds missing
implies.rustlibs - Visibility: Resolves visibility restrictions between modules.
- Multiple Definitions: Removes duplicate sources or link dependencies.
- Vtable Issues: Identifies missing virtual function implementations.
3. API & Type Safety
- Signature Mismatch: Fixes function call arguments (too few/many).
- Type Conversion: Suggests
,static_cast
, etc.c_str() - Const Correctness: Fixes
qualifier mismatches.const - Deprecated API: Updates legacy API calls to modern equivalents.
- Missing Override: Adds
keyword to virtual destructors/methods.override
4. Build Configuration
- Syntax Errors: Fixes typos in
/Android.bp
.BUILD.gn - Compiler Flags: Removes unsupported/illegal flags.
- Permissions: Fixes
for build scripts.chmod +x - Ninja Cache: Cleans dirty ninja build states.
Usage
Fix from Log File (Recommended)
cd /absolute/path/to/autofix_skill PYTHONPATH=. python3 -m src.cli fix --log /path/to/build.log --root /path/to/project_root
Fix Single Error
cd /absolute/path/to/autofix_skill PYTHONPATH=. python3 -m src.cli fix --error "fatal error: 'vector' file not found"
Scan for Patterns
cd /absolute/path/to/autofix_skill PYTHONPATH=. python3 -m src.cli scan
Build Systems
- Android:
(Soong)Android.bp - OpenHarmony:
(GN)BUILD.gn - Linux Kernel:
/KbuildMakefile - General C++:
CMakeLists.txt