A Claude Code skill that detects breaking changes before they hit production.
Parsesgit diff, maps business impact across your codebase, and blocks risky commits.
You delete a field from a DTO. Tests pass. CR passes. Then OrderService and CustomerService both crash at runtime because they were calling getMobile() on the old struct.
This skill exists to make that scenario impossible.
git diff → diff_analyzer.py (parse changes by language)
→ impact_mapper.py (find references, map layers, match patterns)
→ report_generator.py (bilingual report + dependency graph)
Three Python scripts, piped together. Each step is independent, testable, and deterministic — same diff, same output, every time.
| Language | Detects |
|---|---|
| Java | class, interface, enum, method, field, annotation |
| Python | class, function, decorator, property |
| TypeScript | interface, type, class, enum, method, property |
| Go | struct, interface, func, field |
| Vue (SFC) | props, emits, ref/reactive, template bindings |
| JSP | taglib, include, useBean, EL expressions |
| SQL | DDL statements |
| YAML / Properties / XML | key-level add/delete |
100+ filename patterns → business layer (API, data, business logic, frontend, config, etc.). A controller-named file is automatically tagged as "API layer (external interface contract)".
Tries system grep first (fast), falls back to Python os.walk (compatible with Windows cmd/PowerShell). Results cached per symbol to avoid redundant scans.
For P0 changes, runs git log -S <symbol> --since=6.months.ago to surface files that historically changed together with the modified symbol.
The generated conflict-report.md contains a Mermaid dependency graph, per-file impact table, and risk assessment. Internal symbols are language-agnostic; output is translated to business language:
field_del:mobile → "Field 'mobile' removed" / "删除字段:mobile"
java:+1/-2 → "Java interface changed: +1/-2 declarations"
A real report excerpt — showing how a DTO field rename ripples across a multi-language codebase:
### Change Details
| Risk | Type | File | Business Impact |
|:---:|:----:|------|----------------|
| 🔴 P0 | 🔴 Data layer | UserDTO.java | User API will no longer return mobile, replaced by phone |
| 🔴 P0 | 🟡 API layer | OrderController.java | Path changed — all callers get 404 |
| 🟡 P1 | 🟡 Config | order.yml | Timeout/retry keys removed → defaults apply |
### Reference Analysis (Multi-language)
| Impact | Lang | File | Reference |
|--------|:----:|------|-----------|
| 🔴 Compile failure | Java | PaymentService.java | `user.getMobile()` |
| 🔴 Runtime error | Python| payment_service.py | `user['mobile']` |
| 🔴 Compile failure | Go | user_handler.go | `user.Mobile` |
| 🔴 Compile failure | TS | notification.module | `userDTO.mobile` |
| 🟡 Field migration | Vue | UserProfile.vue | expects `user.mobile` |The full report is bilingual (en/zh) — same data, both languages.
Claude automatically runs this skill when it detects changes to:
- DTO/VO field add/delete/rename
- Interface/RPC/Feign method signature changes
- Database DDL (ALTER TABLE, DROP COLUMN, MODIFY COLUMN)
- Message/event schema changes
- Configuration property add/delete
- Enum value add/deprecate
- Frontend component props/emits changes
- JSP taglib/include changes
- API endpoint/route path, method, or parameter changes
No need to ask Claude to "run impact analysis" — it knows when to do it.
A PreToolUse hook that runs analysis before every git commit:
- P0 breaking changes → commit blocked, report printed, choose: Accept / Reject / Revise
- No P0 → commit proceeds
- Analysis crashes → commit allowed (fail-open)
# Register the skill
claude add skill https://github.com/GoBeyondYang/skills/raw/main/skills/business-conflict-analyzer/SKILL.md
# (Optional) install commit guard
bash ~/.claude/skills/business-conflict-analyzer/scripts/install_hook.shThe fetch field in SKILL.md auto-downloads all Python scripts on first run — no git clone needed.
Apache 2.0
