← スキル一覧に戻る

detecting-dead-code
by waiwai24
⭐ 1🍴 0📅 2026年1月4日
SKILL.md
name: detecting-dead-code description: Identifies unreachable functions, unused variables, and abandoned code in binary programs. Use when optimizing binary size, analyzing code coverage, or investigating abandoned functionality.
Dead Code Detection
Detection Workflow
- Build call graph: Use
disasmto build control flow, identify all functions, map function call relationships - Identify entry points: Find main/entry functions, locate exported functions, identify callback registrations, map interrupt handlers
- Trace reachability: Perform forward reachability analysis from entry points, mark all reachable functions and blocks, identify unreachable code
- Analyze dead code: Categorize dead code types, assess security implications, identify potential vulnerabilities, estimate size reduction
Key Patterns
- Unreachable functions: functions with no callers, functions only called from dead code, functions after infinite loops, functions after exit() calls
- Unreachable blocks: basic blocks after return statements, code after unconditional jumps, blocks with no incoming edges, code guarded by always-false conditions
- Unused data: global variables never referenced, string constants never used, data sections with no references, debug symbols in production builds
- Conditional dead code: code in always-false branches, debug-only code in release builds, platform-specific code for other platforms, feature flags permanently disabled
Output Format
Report with: id, type, subtype, severity, confidence, location, dead_code_type, reason, callers, references, size_estimate, security_implications, potential_vulnerabilities, recommendation.
Severity Guidelines
- MEDIUM: Dead code containing security vulnerabilities
- LOW: Dead code with no security impact
See Also
patterns.md- Detailed detection patterns and exploitation scenariosexamples.md- Example analysis cases and code samplesreferences.md- CWE references and mitigation strategies
スコア
総合スコア
55/100
リポジトリの品質指標に基づく評価
✓SKILL.md
SKILL.mdファイルが含まれている
+20
✓LICENSE
ライセンスが設定されている
+10
○説明文
100文字以上の説明がある
0/10
○人気
GitHub Stars 100以上
0/15
○最近の活動
3ヶ月以内に更新がある
0/10
○フォーク
10回以上フォークされている
0/5
✓Issue管理
オープンIssueが50未満
+5
○言語
プログラミング言語が設定されている
0/5
○タグ
1つ以上のタグが設定されている
0/5
レビュー
💬
レビュー機能は近日公開予定です