← スキル一覧に戻る

analyze-code-structure
by mvillmow
Training framework written in Mojo
⭐ 11🍴 4📅 2026年1月24日
SKILL.md
name: analyze-code-structure description: "Examine code organization and identify structural patterns. Use when reviewing module design or understanding architecture." mcp_fallback: none category: analysis tier: 2 user-invocable: false
Analyze Code Structure
Examine code organization, dependencies, and architectural patterns to understand how modules are organized.
When to Use
- Reviewing module design before implementation
- Understanding how components connect
- Identifying structural improvements needed
- Planning refactoring strategies
Quick Reference
# Analyze Python file structure
python3 << 'EOF'
import ast
import sys
def analyze_structure(filepath):
with open(filepath) as f:
tree = ast.parse(f.read())
classes = [n.name for n in ast.walk(tree) if isinstance(n, ast.ClassDef)]
functions = [n.name for n in ast.walk(tree) if isinstance(n, ast.FunctionDef)]
print(f"Classes: {classes}")
print(f"Functions: {functions}")
analyze_structure(sys.argv[1])
EOF
Workflow
- Identify module components: List classes, functions, and major imports
- Map dependencies: Trace how modules import and reference each other
- Analyze layers: Categorize code into logical layers (interface, business logic, persistence)
- Document patterns: Note recurring architectural patterns (factory, singleton, observer)
- Propose improvements: Identify coupling issues or missing separation of concerns
Output Format
Structured analysis report:
- Component inventory (classes, functions, data structures)
- Dependency graph (which modules import which)
- Layer organization (presentation, business, data)
- Design patterns identified
- Recommendations for improvement
References
- See CLAUDE.md > Modularity section for design principles
- See
identify-architectureskill for full architecture analysis - See CLAUDE.md > SOLID principles for structural best practices
スコア
総合スコア
60/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
✓言語
プログラミング言語が設定されている
+5
○タグ
1つ以上のタグが設定されている
0/5
レビュー
💬
レビュー機能は近日公開予定です