aladin-code-pilot
Installation
Review the source and dependencies with a prompt. A package is available to download.
Install with an AI assistant
Copy the prompt so your assistant can review the pinned revision and dependencies first.
View promptHide prompt
Check whether SkillPI Skill Finder is installed for your current agent. If it is missing, install and enable it using the official instructions at https://github.com/Findskills/skillpi. Then use Skill Finder to locate and install "aladin-code-pilot" from this exact SkillPI detail page: https://skillpi.com/skills/deepskill-bf035fece0b594b4549a6b4c03e6e5256d5b680391efc6f512316e9eba5cde23. Verify the upstream source and version against https://skillhub.cn/skills/user_d18c97ea/aladin-code-pilot before installing. If they do not match, stop and report the mismatch. Report the installed path and source version.
Source and setup
skillhub.cn
Setup guidance pending
See the original source for supported tools, dependencies, and permissions.
Installation test pending
Aladin Code Delivery Pipeline: Executes a single local command to perform five-dimensional review, generate automatic repair patches, produce unit tests, normalize commits, and create quality gate reports, forming a complete code-quality delivery chain.
Introduction source: third_party · user_d18c97ea · 1.0.0 Reference
SkillPi interpretation
- Tasks
- Translation pending; see source documentation.
- Inputs and outputs
- Translation pending; see source documentation.
- Testing
- Not tested
Browse files
Frontmatter
name: aladin-code-pilot
slug: aladin-code-pilot
version: 1.0.0
displayName: 阿拉丁·代码质量领航员|审查·修复·单测·提交一体
summary: 阿拉丁出品的代码质量流水线:一条本地命令完成五维审查、自动修复补丁、单元测试生成、规范化提交与质量门禁报告,比单点 code-reviewer/gen-test/commit 工具多做一整条交付链。
description: 阿拉丁·代码质量领航员把代码审查(code review)、自动修复补丁、单元测试生成、Conventional 提交与 CHANGELOG、质量门禁报告串成一条纯本地流水线;相比 skillhub 飙升的 code-reviewer(只审)、code-simplification(只重构)、gen-test(只测)、commit-message-writer(只写提交),本技能一次产出全部交付物,支持 Python/JS/TS/Java/Go/C++ 等 18+ 语言、git diff 聚焦变更、零脚本依赖;适合开发者做提交前体检、PR 合并门禁、补单测与降技术债。触发词:代码审查、code review、代码体检、查 bug、找漏洞、补单测、生成测试、规范化提交、质量门禁、code quality、review my code。
category: 开发者工具
license: MIT
platforms:
- WorkBuddy
- QClaw
- ima
homepage: https://skillhub.cn
author: adam
company: 阿拉丁
tags:
- 代码审查
- code review
- 代码体检
- 代码质量
- 自动修复
- 单元测试
- 生成测试
- 补单测
- 规范化提交
- 质量门禁
- 静态分析
- bug检测
- 安全审查
- 重构建议
- 开发者工具
- code quality
- PR预检
- 技术债
agent_created: true阿拉丁·代码质量领航员(aladin-code-pilot)
阿拉丁出品。你已经会写代码,但「写完→审坑→修→补测→提交」每一步都在切换工具:code-reviewer 只审不修、code-simplification 只重构、gen-test 只测、commit-message-writer 只写提交。这个技能把这一整条交付链收口成一条本地流水线——一次产出审查结论、可应用补丁、单测、提交信息与门禁报告。
它解决什么痛点
开发者在 skillhub 上能找到一堆单点代码工具,但没有一个把它们串起来:
| 现有单点技能 | 只做 | 不做 |
|---|---|---|
| code-reviewer / code-review-and-quality | 报告规范/Bug/性能 | 不生成修复、不补测、不写提交 |
| code-simplification / Code Simplifier | 重构简化 | 不审安全/Bug、不补测 |
| code-run-auto-fix | 跑通+修(Python/C/汇编) | 不审、不补单测、不写提交 |
| gen-test / jest-unittest | 生成单测 | 不审、不修、不写提交 |
| commit-message-writer | 写提交信息 | 不审、不修、不补测 |
本技能 = 审查 + 修复 + 单测 + 提交 + 门禁报告,一次交付,且脚本零依赖、纯本地。
与 skillhub 现有代码技能的差异化
| 能力 | code-reviewer | gen-test | commit-message-writer | 阿拉丁·代码质量领航员(本款) |
|---|---|---|---|---|
| 五维审查(规范/Bug/安全/性能/可维护) | ✅ 仅报告 | ❌ | ❌ | ✅ 审查+给出可执行修复 |
| 自动修复补丁(unified diff) | ❌ | ❌ | ❌ | ✅ 产出可 git apply 的补丁 |
| 单元测试生成(覆盖边界) | ❌ | ✅ 仅测 | ❌ | ✅ 审→测联动,专补高风险函数 |
| 规范化提交 + CHANGELOG | ❌ | ❌ | ✅ 仅提交 | ✅ 与审查结论同源生成 |
| 质量门禁报告(HTML+MD+评分) | ❌ | ❌ | ❌ | ✅ 评分环+严重度+清单 |
| git diff 聚焦变更 | ❌ | ❌ | ❌ | ✅ 只审改动,省 token |
| 多语言(18+) | 部分 | 部分 | 通用 | ✅ 统一五维口径 |
| 脚本依赖 | 各异 | 各异 | 各异 | ✅ 零依赖(纯标准库) |
何时触发
- "帮我 review 一下这段代码 / 审一下我刚写的代码" / "code review my code"
- "给这个项目做个代码体检 / 查 bug / 找漏洞 / 安全检查"
- "把最容易出错的几个函数补上单测 / 生成测试 / 补单测"
- "提交前跑一下质量门禁 / PR 合并前预检 / 低于 70 分打回"
- "帮我写个规范化提交信息和 CHANGELOG" / "conventional commit"
- 用户贴出 git diff / 报错栈 / 一段待测代码,希望一次性拿到「审查+修复+测试+提交」
何时不触发
- 用户要从零写新功能代码——这是编码任务,本技能只做"写完之后的质量收口"。
- 用户要深度架构设计 / 选型决策——超出单文件审查范畴,给建议但不替代设计评审。
- 用户要运行并调试某段代码直到通过——用 code-run-auto-fix 类运行型工具更合适。
- 用户只想要一句提交信息而不需要审查——直接用 commit-message-writer 即可,不必走全流水线。
- 用户在做性能压测 / 安全渗透测试——本技能是静态审查,不是运行时压测/渗透。
- 用户代码涉及强合规涉密环境且禁止本地留痕——虽本技能纯本地,仍需先确认合规策略。
核心能力(统一流水线 + 本地增值)
- 代码扫描清点:
code_scan.py按语言归类、统计行数,输出清单,帮助智能体决定优先审查对象。 - 变更聚焦:
code_diff.py提取 git 未提交+已暂存 diff(或两目录对比),只审改动,省 token。 - 五维审查:规范 / Bug / 安全 / 性能 / 可维护性,跨 18+ 语言统一口径(详见
references/review-dimensions.md)。 - 自动修复补丁:为高风险问题生成标准 unified diff,用户确认后可
git apply(规范见references/fix-patterns.md)。 - 单元测试生成:为被标记函数生成独立可跑的单测(pytest/jest/JUnit/go test…),优先覆盖边界与异常路径。
- 规范化提交 + CHANGELOG:基于审查结论生成 Conventional Commits 信息与变更说明。
- 质量门禁报告:
code_report.py把结论渲染为评分环 + 严重度分布 + 问题清单 + 补丁 + 单测 + 提交的 HTML/MD 看板。 - 零依赖本地运行:脚本仅用 Python 标准库,不联网、不上传、不装包即可产出报告。
工作流(3 步)
① 聚焦 code_diff.py / code_scan.py → diff.txt / files.json(机械清点,本地)
② 审查 智能体(Hy3) 读代码/diff → 按五维产出 review.json(含 fixes/tests/commit)
③ 收口 code_report.py --in review.json → report.html + report.md(质量门禁看板)
使用方式
脚本零依赖,直接用托管 Python 运行即可(无需 pip install):
PY="C:/Users/adam/.workbuddy/binaries/python/versions/3.13.12/python.exe"
# ① 聚焦变更(git 未提交+已暂存)或扫描全量
"$PY" scripts/code_diff.py --repo . --out diff.txt --json changed.json
"$PY" scripts/code_scan.py --root ./src --out files.json
# ② 智能体读取 diff.txt/files.json → 五维审查 → 写入 review.json
# (review.json 结构见 references/report-schema.md,assets/sample_review.json 为样例)
# ③ 渲染质量门禁报告
"$PY" scripts/code_report.py --in review.json --html report.html --md report.md
评审结论 JSON 速查
{
"summary": {"files_scanned":3,"issues_total":7,
"by_severity":{"critical":1,"high":2,"medium":3,"low":1},"quality_score":72},
"files":[{"path":"src/calc.py","language":"python","lines":42,
"issues":[{"line":18,"severity":"high","dimension":"bug",
"title":"除零未保护","detail":"…","suggestion":"…"}]}],
"fixes":[{"path":"src/calc.py","patch":"<unified diff>"}],
"tests":[{"path":"tests/test_calc.py","framework":"pytest","code":"<源码>"}],
"commit":{"message":"fix(calc): …","changelog":"- …"}
}
输入输出规范
输入:
- 代码目录(
./src等)或 git 仓库(首选,用于聚焦 diff) - 或用户直接粘贴的代码片段 / git diff / 报错栈
- 可选:审查范围(
--base基准分支)、语言偏好、门禁阈值(如 score<70 打回)
输出:
review.json:结构化评审结论(中间产物)report.html:可视化质量门禁看板(评分环+清单+补丁+单测+提交)report.md:同一内容 Markdown 版(贴 PR / 读屏)*.patch/tests/*.py/*.js:可选,由智能体按用户要求落盘
输出位置: 由 --html / --md 参数指定,默认当前目录。
能力边界
能做:
- 对 18+ 语言做规范/Bug/安全/性能/可维护性五维静态审查。
- 生成可
git apply的修复补丁与独立可跑的单元测试。 - 生成 Conventional 提交信息与 CHANGELOG。
- 渲染带质量评分与严重度分布的可视化门禁报告。
- 聚焦 git 变更,只审改动、省 token。
不能做:
- 不做运行时压测、渗透测试或动态污点分析(纯静态审查)。
- 不自动
git apply/git push/ 自动提交(补丁与提交需用户确认)。 - 不替代人工架构评审与最终技术决策。
- 不保证发现所有缺陷(覆盖率受上下文与可见代码范围限制)。
- 不联网抓取外部规则库(规则内置在 references,离线可用)。
重要约束
- 不外发、不上传:脚本全部本地运行,代码与报告留在本机,应用/提交由你确认(→ Trust)。
- 补丁不自动应用:审查阶段只产出修复与单测,落地需用户手动确认,避免误改(→ Reliability)。
- 降级可用:无 git 时自动退化为两目录对比;无被测框架时仍输出审查与报告(→ Reliability)。
- 零依赖透明:脚本仅用 Python 标准库,SKILL.md 已写明运行方式,无需安装任何包(→ Adaptability)。
- 口径一致:跨语言统一五维维度与严重度,报告可比、可追溯(→ Convention)。
- 不篡改业务语义:修复只解决质量缺陷,不改变函数既定行为与业务意图(→ Convention)。
安全说明
- 全部脚本仅用 Python 标准库,不发起任何网络请求、不上传任何代码或报告。
- 修复补丁与单测写入本地文件,是否
git apply/提交完全由你掌控。 - 不接管账号、不自动推送,产出与动作分离,适合含内部代码的私有仓库。
参考文档(渐进式披露)
| 文件 | 用途 | 加载时机 |
|---|---|---|
references/review-dimensions.md |
五维审查清单 + 各语言重点 | 审查前/中,确定维度与语言惯例 |
references/fix-patterns.md |
unified diff 与单测生成规范、安全原则 | 生成修复/单测时 |
references/report-schema.md |
review.json 完整 schema + 评分算法 | 写 review.json / 渲染报告前 |
references/usage-examples.md |
3 个完整场景 + 最佳实践 + FAQ | 首次使用 / 排错时 |
Current listing version
1.0.0
Quality assessment
Out of 100 · Assessment report from SkillPi LAB.
Highlights
- 提供完整的代码质量流水线(审查+修复+单测+提交+门禁报告),显著提升开发者提交前体检和PR合并门禁效率
- 覆盖18+语言,零依赖本地运行,解决skillhub上单点工具无法串联的痛点
Highlights
- 触发词覆盖全面且精准,包括代码审查、code review、代码体检、查bug、补单测、规范化提交、质量门禁等常见表达
Areas to improve
-
缺少显式When to Use章节标题 Reported severity: Minor
文档中'何时触发'内容实质存在,但未使用标准'When to Use'章节标题
Recommendation: 建议将'何时触发'改为标准'When to Use'章节标题以符合规范
Highlights
- 文档结构完整,包含核心能力、工作流、使用方式、输入输出规范、能力边界等重要章节
- 提供评审结论JSON速查和端到端使用示例,便于用户理解
Highlights
- 工具来源明确(Python标准库),参数说明清晰,覆盖主要异常场景
- 不可逆操作需用户确认,安全说明充分,支持降级使用
The arithmetic mean of the first four original scores, rounded to a whole number.
Static text checks
100 / 100 · skillpi-20261123-no-r3-v1
No current rules matched the text.
This score reflects rule matches in the text and is provided for reference before use. It excludes attachments and runtime behavior.
Permissions and checks before use
Automatically summarized from this main document. Matches may be examples or defensive advice; they are not actual permission declarations. Attachments, external dependencies and runtime behavior are not covered.
-
Install or fetch external dependencies
Use official sources and pin versions. Check install scripts in an isolated environment. This document check does not cover code downloaded later.
Mentioned in main document · lines 109
Domains or addresses referenced in the document
These addresses may be documentation links or examples, not an approved network allowlist. Verify actual destinations and outgoing data before use.
- skillhub.cn
Security rating and access scope
safe · Static evidence review; not a runtime safety guarantee.
Before use, confirm and authorize actual file access, external services and network destinations in your host. This review grants no runtime permissions.
User discussion
No verified reviews yet.