# Autofix Blueprint Syntax

> Fixes syntax errors in Android.bp files.

- Skill: `hyz0906/autofix-blueprint-syntax` (Agent Skill)
- Install (CLI): `npx skillmds@latest add hyz0906/autofix-blueprint-syntax`
- Raw SKILL.md: https://api.skillmd.com/api/skills/hyz0906/autofix-blueprint-syntax/raw
- Safety review: pending (external: skill-scanner PASS, skillspector PASS)
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: hyz0906 (https://skillmd.com/u/hyz0906)
- Updated: 2026-09-10
- Page: https://skillmd.com/skills/hyz0906/autofix-blueprint-syntax

---


# Blueprint Syntax Skill

Fixes parsing and syntax errors in Android Blueprint (Android.bp) files.

## Detection Patterns
- `Android.bp:X:Y: parse error`
- `expected ',' before ']'`
- `unexpected '}'`
- `unrecognized property`

## Strategy

1. **Locate Error**: Find the exact line and column in Android.bp.
2. **Identify Issue**: Parse the syntax error description.
3. **Fix Syntax**: Apply the appropriate correction.

## Instructions

### Step 1: Go to Error Location
From: `Android.bp:42:15: parse error: expected ',' before ']'`
Open Android.bp at line 42.

### Step 2: Common Fixes

**Missing comma:**
```json
// Before (error)
srcs: [
    "file1.cpp"
    "file2.cpp"
]
// After
srcs: [
    "file1.cpp",
    "file2.cpp",
]
```

**Trailing comma issue:**
```json
// Before (error in some cases)
deps: [
    "libfoo",
]  // Trailing comma is OK in Android.bp
```

**Missing colon:**
```json
// Before
name "mylib"
// After
name: "mylib",
```

**Unclosed bracket:**
```json
// Before
srcs: [
    "main.cpp",
// Missing ]
// After
srcs: [
    "main.cpp",
],
```

### Step 3: Validate
Run `m blueprint_tools` or check with Android build.

