← Back to Skills Marketplace
ai-code-migration-risk-assessor
by
zlszhonglongshen
· GitHub ↗
· v1.0.0
· MIT-0
62
Downloads
0
Stars
0
Active Installs
1
Versions
Install in OpenClaw
/install ai-code-migration-risk-assessor
Description
深度分析代码变更风险,评估影响范围并生成可靠重构方案
README (SKILL.md)
AI 代码变更风险评估器 (Code Migration Risk Assessor)
从代码变更出发,深度分析影响范围、关联模块与迁移风险,并生成可落地的重构方案与执行计划。
核心价值
- 精准风险识别:基于 GitHub API 分析变更文件、提交历史与依赖关系,量化风险等级
- 影响范围评估:智能识别受影响的模块、接口与调用方,降低遗漏风险
- 重构方案生成:结合代码审查最佳实践,生成分步骤可执行的重构方案
- 一键执行辅助:通过 agentic-devops 生成变更 diff,验证重构正确性
适用场景
- 团队进行大规模代码重构,不确定改动范围
- 合并外部开源项目代码,担心引入未知风险
- 大型 API 协议升级,需要评估波及范围
- Code Review 时需要快速定位高风险改动区域
工作流程(4步)
Step 1 → 获取变更(github: list-commits / compare / search-code)
↓
Step 2 → 深度代码审查(code-review-skill: analyze-diff)
↓
Step 3 → 风险量化评估(agentic-devops: audit-logs)
↓
Step 4 → 生成重构方案 + 行动计划
使用方法
方式一:完整工作流(推荐)
触发词:
- "帮我分析这个 PR 的风险"
- "评估这次重构的影响范围"
- "分析代码变更风险并生成方案"
方式二:指定仓库分析
触发词:
- "分析 /path/to/repo 的变更风险"
环境变量
GITHUB_TOKEN=your_github_pat_token # GitHub 个人访问令牌
技术架构
GitHub API (变更数据)
↓
code-review-skill (Diff 解析 + 模式识别)
↓
agentic-devops (依赖关系图谱 + 风险建模)
↓
输出: 风险报告 + 重构方案
风险等级说明
| 等级 | 标识 | 说明 |
|---|---|---|
| P0 | 🔴 严重 | 破坏性变更,影响生产环境核心功能 |
| P1 | 🟠 高危 | 涉及 API 兼容性变更或数据迁移 |
| P2 | 🟡 中危 | 逻辑重构,存在潜在 Bug 风险 |
| P3 | 🟢 低危 | 纯代码格式优化,无运行时影响 |
依赖 Skill 说明
github
提供变更数据获取能力:提交历史、文件差异、代码搜索、仓库信息。
code-review-skill
对 diff 进行深度审查,识别:潜在 Bug、安全漏洞、性能问题、代码风格问题。
agentic-devops
提供依赖关系分析、变更审计日志、进程健康监控,辅助风险量化。
Usage Guidance
Before installing, confirm you are comfortable letting the workflow and its dependent GitHub, code-review, and DevOps skills inspect repository diffs, commit history, code search results, and possibly audit-style operational data. Use least-privilege tokens, avoid exposing secrets in diffs, and run it only on repositories and logs the reviewing agent is allowed to see.
Capability Assessment
Purpose & Capability
The GitHub diff, commit, code-review, dependency-graph, and risk-modeling capabilities fit the stated purpose of migration and refactoring risk assessment; audit-log use is sensitive but disclosed as part of risk quantification.
Instruction Scope
The trigger phrases are somewhat broad within software-engineering contexts, but they are centered on code-change, PR, migration, and refactoring risk and the examples require a repository or PR input.
Install Mechanism
The artifact contains only README.md, SKILL.md, and workflow.json; no executable scripts, install hooks, package downloads, or obfuscated setup behavior were present.
Credentials
Use of a GitHub token and repository contents is proportionate for PR and migration analysis, but users should treat private code, diffs, commit history, and operational logs as sensitive data.
Persistence & Privilege
No background worker, long-running persistence, privilege escalation, destructive action, or automatic mutation authority was found in the reviewed artifacts.
How to Use
- Make sure OpenClaw is installed (local or Docker)
- Run the install command in chat:
/install ai-code-migration-risk-assessor - After installation, invoke the skill by name or use
/ai-code-migration-risk-assessor - Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.0
- Initial release of ai-code-migration-risk-assessor.
- Provides in-depth analysis of code migration risks, scope impact, and refactoring plans.
- Leverages GitHub, code-review-skill, and agentic-devops for automated risk assessment.
- Supports complete workflow from change detection to actionable refactoring suggestions.
- Offers clear risk levels and practical usage scenarios for teams managing complex code changes.
Metadata
Frequently Asked Questions
What is ai-code-migration-risk-assessor?
深度分析代码变更风险,评估影响范围并生成可靠重构方案. It is an AI Agent Skill for Claude Code / OpenClaw, with 62 downloads so far.
How do I install ai-code-migration-risk-assessor?
Run "/install ai-code-migration-risk-assessor" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.
Is ai-code-migration-risk-assessor free?
Yes, ai-code-migration-risk-assessor is completely free, licensed under MIT-0. You can download, install and use it at no cost.
Which platforms does ai-code-migration-risk-assessor support?
ai-code-migration-risk-assessor is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).
Who created ai-code-migration-risk-assessor?
It is built and maintained by zlszhonglongshen (@zlszhonglongshen); the current version is v1.0.0.
More Skills