← スキル一覧に戻る

autofix-missing-header
by hyz0906
⭐ 0🍴 0📅 2026年1月19日
SKILL.md
name: autofix-missing-header description: Fixes 'file not found' errors by locating headers and adding include paths or #include statements.
Missing Header Skill
Fixes C/C++ compilation errors where header files cannot be found.
Detection Patterns
fatal error: 'X.h' file not foundcannot open source file "X.h"No such file or directory(for headers)
Strategy
- Extract Header Name: Parse the error to get the missing header (e.g.,
utils/config.h). - Search for Header: Use file search to locate the header in the project.
- Determine Fix Type:
- If header exists elsewhere → Add include path to build file OR fix the #include path.
- If header is a system/standard header → Add appropriate #include.
- Apply Fix: Modify the source file or build configuration.
Instructions
Step 1: Parse the Error
Extract:
- Source file: The file that failed to compile.
- Header name: The missing header path.
Step 2: Search for the Header
find . -name "config.h" -type f
Or use semantic search to locate the header.
Step 3: Apply the Fix
Option A: Fix #include path in source file
If the header is at src/utils/config.h but included as #include "config.h":
// Before
#include "config.h"
// After
#include "utils/config.h"
Option B: Add include directory to build file
For GN (BUILD.gn):
include_dirs = [ "src/utils" ]
For Soong (Android.bp):
local_include_dirs: ["src/utils"],
Step 4: Verify
Re-run the build or check that the include now resolves.
Common Header Mappings
| Symbol | Header |
|---|---|
std::vector | <vector> |
std::string | <string> |
std::cout | <iostream> |
printf | <cstdio> |
NULL | <cstddef> |
スコア
総合スコア
50/100
リポジトリの品質指標に基づく評価
✓SKILL.md
SKILL.mdファイルが含まれている
+20
○LICENSE
ライセンスが設定されている
0/10
○説明文
100文字以上の説明がある
0/10
○人気
GitHub Stars 100以上
0/15
○最近の活動
3ヶ月以内に更新がある
0/10
○フォーク
10回以上フォークされている
0/5
✓Issue管理
オープンIssueが50未満
+5
✓言語
プログラミング言語が設定されている
+5
○タグ
1つ以上のタグが設定されている
0/5
レビュー
💬
レビュー機能は近日公開予定です