Agent skill

hammer-dependency-analyzer

Verify dependency structure and architecture health for SDL3 HammerEngine. Detects circular dependencies, excessive coupling, layer violations, header bloat, and provides dependency graph visualization. Ensures adherence to layered architecture (Core→Managers→States→Entities). Use monthly, after major refactors, or when investigating compile time issues.

majiayu000github.com/majiayu000GitHub ↗
claude-codecan modify filesMIT
Install
npx skills add majiayu000/claude-skill-registry --skill hammer-dependency-analyzer --agent claude-code

Same command for any agent — swap --agent for codex, cursor, copilot.

Facts
Files in the skill folder: 2
SKILL.md size: 47 KB
Bundled scripts: none
Allowed tools: BashReadWriteGrepGlob
Path: skills/analysis/hammer-dependency-analyzer/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 534
Language: HTML

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

Review
written from the skill's own SKILL.md · Aug 5, 2026

What it does

Verifies dependency structure and architecture health for SDL3 HammerEngine. Detects circular dependencies, excessive coupling, layer violations, header bloat, and provides dependency graph visualization. Ensures adherence to layered architecture (Core→Managers→States→Entities).

How it works

The skill provides a multi-mode analysis workflow:

  • Mode-based analysis with user input to choose between Quick Circular Check, Coupling Analysis, Full Architecture Audit, or Specific Component.
  • Scans include dependencies by collecting header files from include/ and src/ and extracting local #include directives to build a dependency graph as source -> dependencies.
  • Mode 1 (Quick Circular Check) runs a Python-based DFS to detect cycles in the graph and reports any cycles, suggesting forward declarations or interface extraction as fixes.
  • Mode 2 (Coupling Analysis) computes fan-out and fan-in metrics from the graph, classifies coupling strength, and reports a basic instability metric I = Efferent / (Afferent + Efferent).
  • Mode 2 also includes a Manager-to-Manager Coupling matrix across include/managers/*.hpp and a coupling strength analysis with a set of functional dependencies considered acceptable.
  • The workflow includes optional output formats (Markdown Report, ASCII Tree, or Both) and guidance for interpreting results.
  • It uses allowed tools Bash, Read, Write, Grep, Glob and declares claude-code as an allowed tool.

When to use it

Use Mode 1 for quick daily validation to catch circular dependencies before commits. Use Mode 2 when adding/refactoring managers to understand and limit coupling. Use Mode 3 for a full audit during monthly checks or major refactors. Use Mode 4 for a targeted analysis of a single component.

What it can touch

The analysis touches include dependencies, header files under include/ and src/, and specific manager headers located in include/managers/. It reads header files, parses #include directives, and writes results to test_results/dependency_analysis/dependencies_raw.txt and dependency_graph.txt.

Caveats

The skill assumes a conventional C++-style project layout with Core/Managers/States/Entities layering. It depends on local includes only and excludes system headers. It does not guarantee removal of all circulars but reports them and provides suggested fixes (forward declarations, interfaces, inversion). It relies on Python for cycle detection and uses shell scripts to compute metrics.

From the SKILL.md

# HammerEngine Dependency Analyzer Comprehensive dependency structure analysis for SDL3 HammerEngine. Verifies architectural integrity, detects circular dependencies, identifies coupling issues, and maintains clean layered design. ## Purpose HammerEngine follows a **layered architecture** pattern: ``` Core (ThreadSystem, Logger, GameLoop) ↓ Managers (AIManager, CollisionManager, etc.) ↓ States (GameState, MenuState, etc.) ↓ Entities (Entity classes, Components) ↓ Utils (Vector2D, Math helpers) ``` This Skill ensures: 1. **Circular Dependency Detection** - Prevent include cycles that break compilation 2. **Coupling Analysis** - Maintain loose coupling between managers 3. **Layer Violation Detection** - Enforce one-way dependencies (no upward dependencies) 4. **Header Bloat Identification** - Find unnecessary includes slowing compilation 5. **Forward Declaration Opportunities** - Reduce compilation dependencies 6. **Dependency Graph Visualization** - Understand system relationships 7. **Compile Time Impact Analysis** - Estimate compilation cost per component 8. **Architecture Health Scoring** - Quantify overall design quality ## Architecture Rules (from CLAUDE.md) ### Layer Rules **1

What's inside
Steps it walks through
  1. Purpose
  2. Architecture Rules (from CLAUDE.md)
  3. Layer Rules
  4. Coupling Rules
  5. Analysis Modes
  6. Mode 1: Quick Dependency Check (2-3 minutes)
  7. Mode 2: Coupling Analysis (5-10 minutes)
  8. Mode 3: Full Architecture Audit (15-20 minutes)
  9. Mode 4: Specific Component Analysis (3-5 minutes)
  10. Step 1: Gather User Input
  11. Step 2: Scan Include Dependencies
  12. Step 3: Analyze Dependencies by Mode
  13. Mode 1: Quick Circular Check
  14. Mode 2: Coupling Analysis
Ships with 1 file
  • metadata.json
Commands it runs
echo "=== Scanning Include Dependencies ==="
Find all headers
echo "Total headers found: $HEADER_COUNT"
mkdir -p "$OUTPUT_DIR"
echo "Extracting #include directives..."
for HEADER in $ALL_HEADERS; do
if [ ! -z "$LOCAL_INCLUDES" ]; then
echo "=== $HEADER ===" >> "$DEPENDENCY_FILE"
echo "$LOCAL_INCLUDES" >> "$DEPENDENCY_FILE"
echo "" >> "$DEPENDENCY_FILE"
More from claude-skill-registry
All skills →
About this skill
What does the hammer-dependency-analyzer skill do?

Verify dependency structure and architecture health for SDL3 HammerEngine. Detects circular dependencies, excessive coupling, layer violations, header bloat, and provides dependency graph visualization. Ensures adherence to layered architecture (Core→Managers→States→Entities). Use monthly, after major refactors, or when investigating compile time issues.

How do I install it?

Run `npx skills add majiayu000/claude-skill-registry --skill hammer-dependency-analyzer --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.

Where does this skill come from?

From majiayu000/claude-skill-registry, a repository with 534 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.

Is a popular skill a good skill?

Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.

Keep going