Skip to content
Back to skills

Autofix Skill

ASecurity

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.

  • 57 stars
  • 0 votes
  • 0 copies
  • 3 views
  • Added October 17, 2026
developmentpythonrustjavac++bashapi

Works with

  • cli
  • api

Security analysis

A100/100

Scanned October 17, 2026

npx -y skills add diegosouzapw/awesome-omni-skill --skill autofix-skill --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Autofix Skill?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Autofix Skill
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/diegosouzapw-autofix-skill/badge)](https://www.skillsdirectory.com/skills/diegosouzapw-autofix-skill)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: autofix-skill
description: 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.
---

# 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 `#include <...>` for standard and project headers.
- **Undeclared Identifier**: Import/include missing symbols.
- **Namespace Errors**: Fixes missing `std::` or namespace scopes.
- **Forward Declaration**: Inserts forward decls to resolve circular deps.

### 2. Linkage & Dependencies
- **Undefined Reference**: Adds libraries to `shared_libs`/`deps` in `Android.bp`/`BUILD.gn`.
- **Rust Crates**: Adds missing `rustlibs` implies.
- **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`, `c_str()`, etc.
- **Const Correctness**: Fixes `const` qualifier mismatches.
- **Deprecated API**: Updates legacy API calls to modern equivalents.
- **Missing Override**: Adds `override` keyword to virtual destructors/methods.

### 4. Build Configuration
- **Syntax Errors**: Fixes typos in `Android.bp`/`BUILD.gn`.
- **Compiler Flags**: Removes unsupported/illegal flags.
- **Permissions**: Fixes `chmod +x` for build scripts.
- **Ninja Cache**: Cleans dirty ninja build states.

## Usage

### Fix from Log File (Recommended)
```bash
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
```bash
cd /absolute/path/to/autofix_skill
PYTHONPATH=. python3 -m src.cli fix --error "fatal error: 'vector' file not found"
```

### Scan for Patterns
```bash
cd /absolute/path/to/autofix_skill
PYTHONPATH=. python3 -m src.cli scan
```

## Build Systems
- **Android**: `Android.bp` (Soong)
- **OpenHarmony**: `BUILD.gn` (GN)
- **Linux Kernel**: `Kbuild`/`Makefile`
- **General C++**: `CMakeLists.txt`

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in development →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.