/harness-claude:harness-impact-analysisfrom harness-claude
Performs graph-based impact analysis to answer what breaks when code changes. Useful for PRs, refactoring, and tracing test failures.
Claude never picks this skill on its own
Its frontmatter has no description. Without a description, Claude Code leaves it out of the list Claude chooses from. Typing /harness-claude:harness-impact-analysis still runs it.
What the skill costs in Claude's context, stage by stage
No description Claude Code can read, so Claude's list leaves it out: only you can start it.
SKILL.md joins the conversation and stays.
Graph-based impact analysis. Answers: "if I change X, what breaks?"
on_pr triggers fireA knowledge graph at .harness/graph/ enables full analysis. If no graph exists,
the skill uses static analysis fallbacks (see Graph Availability section).
Run harness scan to enable graph-enhanced analysis.
Before starting, check if .harness/graph/graph.json exists.
If graph exists: Check staleness — compare .harness/graph/metadata.json
scanTimestamp against git log -1 --format=%ct (latest commit timestamp).
If graph is more than 2 commits behind (git log --oneline <scanTimestamp>..HEAD | wc -l),
run harness scan to refresh before proceeding. (Staleness sensitivity: High)
If graph exists and is fresh (or refreshed): Use graph tools as primary strategy.
If no graph exists: Output "Running without graph (run harness scan to
enable full analysis)" and use fallback strategies for all subsequent steps.
git diff --name-only HEAD~1 to get recent changes.Run compute_blast_radius on target files to simulate failure propagation and identify all downstream modules affected. Run predict_failures to forecast which architectural constraints are most at risk from the proposed changes.
For each changed file:
Direct dependents: Use get_impact MCP tool to find all files that import or call the changed file.
get_impact(filePath="src/services/auth.ts")
→ tests: [auth.test.ts, integration.test.ts]
→ docs: [auth-guide.md]
→ code: [routes/login.ts, middleware/verify.ts, ...]
Transitive dependents: Use query_graph with depth 3 to find indirect consumers.
query_graph(rootNodeIds=["file:src/services/auth.ts"], maxDepth=3, includeEdges=["imports", "calls"])
Documentation impact: Use get_relationships to find documents edges pointing to changed nodes.
Test coverage: Identify test files connected via imports edges. Flag changed files with no test coverage.
Design token impact: When the graph contains DesignToken nodes, use query_graph with USES_TOKEN edges to find components that consume changed tokens.
query_graph(rootNodeIds=["designtoken:color.primary"], maxDepth=2, includeEdges=["uses_token"])
→ components: [Button.tsx, Card.tsx, Header.tsx, ...]
If a changed file is design-system/tokens.json, identify ALL tokens that changed and trace each to its consuming components. This reveals the full design blast radius of a token change.
Design constraint impact: When the graph contains DesignConstraint nodes, check if changed code introduces new VIOLATES_DESIGN edges.
When no graph is available, use static analysis to approximate impact:
import.*from.*<changed-file> and require.*<changed-file> patterns to find direct dependents.foo.ts, search for:
foo.test.ts, foo.spec.ts (same directory and __tests__/ directory)*.test.* and *.spec.* files that import the changed file (from step 1)docs/ directory for references to the changed module name (filename without extension).Fallback completeness: ~70% — misses transitive deps beyond 2 levels.
Impact score: Calculate based on:
Risk tiers:
Output report:
## Impact Analysis Report
### Changed Files
- src/services/auth.ts (modified)
- src/types/user.ts (modified)
### Impact Summary
- Direct dependents: 8 files
- Transitive dependents: 23 files
- Affected tests: 5 files
- Affected docs: 2 files
- Risk tier: HIGH
### Affected Tests (must run)
1. tests/services/auth.test.ts (direct)
2. tests/routes/login.test.ts (transitive)
3. tests/integration/auth-flow.test.ts (transitive)
### Affected Documentation (may need update)
1. docs/auth-guide.md → documents src/services/auth.ts
2. docs/api-reference.md → documents src/types/user.ts
### Downstream Consumers
1. src/routes/login.ts — imports auth.ts
2. src/middleware/verify.ts — imports auth.ts
3. src/routes/signup.ts — imports user.ts (transitive via auth.ts)
### Affected Design Tokens (when tokens change)
1. color.primary → used by 12 components
2. typography.body → used by 8 components
harness scan — Recommended before this skill for full graph-enhanced analysis. If graph is missing, skill uses static analysis fallbacks.harness validate — Run after acting on findings to verify project health.query_graph, get_impact, and get_relationships MCP tools.These are common rationalizations that sound reasonable but lead to incorrect results. When you catch yourself thinking any of these, stop and follow the documented process instead.
| Rationalization | Why It Is Wrong |
|---|---|
| "The change is small so the blast radius must be low -- I can skip the transitive dependent check" | Small changes to shared utilities can have outsized blast radius. A one-line change to auth.ts can affect 23 transitive dependents. |
| "The graph is a few commits behind but it is close enough for this analysis" | If the graph is more than 2 commits behind, the skill requires a refresh before proceeding. Recent commits may have added new consumers. |
| "No graph exists so I cannot produce a useful impact analysis" | The fallback strategy using import parsing and naming conventions achieves ~70% completeness. Missing the graph does not mean stopping. |
Input: git diff shows src/services/auth.ts modified
1. IDENTIFY — Extract changed file: src/services/auth.ts
2. ANALYZE — get_impact(filePath="src/services/auth.ts")
query_graph(rootNodeIds=["file:src/services/auth.ts"], maxDepth=3)
Results: 8 direct dependents, 23 transitive, 5 tests, 2 docs
3. ASSESS — Impact score: 34 (High tier)
- Entry points affected: no
- Tests exist: yes (5 files)
Output:
Risk tier: HIGH
Must-run tests: auth.test.ts, login.test.ts, auth-flow.test.ts
Docs to update: auth-guide.md, api-reference.md
Downstream consumers: 8 files across 3 modules
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub intense-visions/harness-engineering --plugin harness-claudeRead when SKILL.md points to them.
793 skills in this plugin
/a11y-aria-patternsARIA Patterns> Apply ARIA roles, states, and properties correctly to enhance assistive technology support for custom widgets/a11y-color-contrastColor Contrast and Color Independence> Ensure sufficient color contrast ratios and never use color as the sole means of conveying information/a11y-form-patternsAccessible Form Patterns> Build accessible forms with proper labeling, grouped controls, inline validation, and clear error communicationOther plugins' skills for the same job