← 返回 Skills 市场
zlszhonglongshen

ai-code-migration-risk-assessor

作者 zlszhonglongshen · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ✓ 安全检测通过
62
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install ai-code-migration-risk-assessor
功能描述
深度分析代码变更风险,评估影响范围并生成可靠重构方案
使用说明 (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

提供依赖关系分析、变更审计日志、进程健康监控,辅助风险量化。

安全使用建议
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.
能力评估
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.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install ai-code-migration-risk-assessor
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /ai-code-migration-risk-assessor 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
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.
元数据
Slug ai-code-migration-risk-assessor
版本 1.0.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 1
常见问题

ai-code-migration-risk-assessor 是什么?

深度分析代码变更风险,评估影响范围并生成可靠重构方案. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 62 次。

如何安装 ai-code-migration-risk-assessor?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install ai-code-migration-risk-assessor」即可一键安装,无需额外配置。

ai-code-migration-risk-assessor 是免费的吗?

是的,ai-code-migration-risk-assessor 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

ai-code-migration-risk-assessor 支持哪些平台?

ai-code-migration-risk-assessor 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 ai-code-migration-risk-assessor?

由 zlszhonglongshen(@zlszhonglongshen)开发并维护,当前版本 v1.0.0。

💬 留言讨论