# 变更影响分析 (change-impact)

> 改动前基于真实依赖梳理影响面，实现后再把实际 diff 与计划对照。

- 分类: [架构调优](https://www.myskills.tools/zh/categories/architecture-tuning/)
- 来源: 社区 · Affaan Mustafa
- 代码仓库: https://github.com/affaan-m/ECC/tree/main/skills/change-impact (commit 4f08958)
- SKILL.md: https://github.com/affaan-m/ECC/blob/main/skills/change-impact/SKILL.md
- 安装命令: `npx skills add affaan-m/ECC --skill change-impact`
- 许可证: MIT
- 兼容工具: Claude Code, Codex, Cursor, Copilot, OpenCode
- 权限: read-repo ✓, write-files ✗, shell ✓, network ✗
- 状态: 扫描通过
- 规则扫描无法覆盖所有风险，安装前请阅读此技能的 SKILL.md，确认权限后再使用。

## 核心规则

依赖关系必须有真实调用和导入作为证据，不凭目录名推断；未知项标为 unverified。

## 执行阶段

1. **确立事实来源** — 以需求、仓库文档和可执行的依赖证据为准，用 git grep、git diff 和测试取证。
2. **改动前梳理** — 依次回答代码、数据、接口、测试、文档和发布六类影响，含部署顺序、兼容窗口和回滚步骤。
3. **路由到专门技能** — 长期决策交给 ADR，跨端接口交给契约优先流程，回归交给模块回归检查；缺少回滚信息视为阻塞。
4. **实现后对齐** — 检查实际 diff 是否超出范围、证据是否覆盖成功标准、文档是否同步，以及遗留的临时代码。

## 权限说明（据 SKILL.md 整理）

| 能力 | 是否需要 | 说明 |
|---|---|---|
| 文件写入 | 部分需要 | 默认只读；报告默认留在回复中，写入仓库前需先确认位置。 |
| 命令执行 | 部分需要 | 以 git grep、git diff 和已有测试取证；其他命令需宿主策略允许且用户明确同意。 |
| 网络外发 | 不需要 | 未经宿主策略允许和用户明确同意，不访问网络。 |

## SKILL.md 头部信息（YAML）

```yaml
---
name: change-impact
description: >-
  Perform evidence-backed impact analysis before changing code, data, interfaces, or governance documents, then compare the planned impact with the actual diff after implementation. Covers call paths, data and schema, API contracts, tests, documentation, ADRs, deployment, migration, and rollback. Use for cross-module or high-risk changes, database migrations, authentication, public interfaces, blast-radius questions, pre-change checks, and post-implementation alignment.
---
```

首页: https://www.myskills.tools/zh/ · URL: https://www.myskills.tools/zh/skills/change-impact/
