基础工具与工作流 · juliusbrussee/caveman

caveman-review

Compressed code review - one line per finding with location, problem and fix. Use for /caveman-review, "review this PR", or "review the diff".

L1 基础 · 登记来源即可V1 已固定Dual-pass Audit
Author juliusbrusseeGitHub juliusbrussee/caveman ↗Stars 104500License MIT + BSL-1.1 分拆(技能本体 MIT;GitHub API spdx NOASSERTION)。Commit 15581d1400
管控等级描述 skill 的能力与建议配套的管控措施,不代表质量或安全认证,也不表示可用或不可用。是否使用由用户和管理者决定。不同 agent 宿主对权限的约束各不相同,请勿假定宿主一定会提供安全兜底。第三方 skill 版权归原作者,使用风险由使用者自行承担。

1实现原理 · 为什么它能做到

纯 prompt 的评审输出压缩器:核心是一条输出格式协议——每条 finding 一行,`L<行号>: <问题>. <修复>.`,多文件 diff 时加 `<file>:L<line>:` 前缀。

skills/caveman-review/SKILL.md
**Format:** `L<line>: <problem>. <fix>.` — or `<file>:L<line>: ...` when reviewing multi-file diffs.
格式协议取代自由行文:位置+问题+修复三段式,评审意见被压成可扫描的单行,可直接粘贴 PR。

严重度前缀可选分级:🔴 bug / 🟡 risk / 🔵 nit / ❓ q 四档,让作者能按紧急度过滤。

skills/caveman-review/SKILL.md
`🔴 bug:` — broken behavior, will cause incident
四档定义各自给出触发特征(会引发事故/脆弱但可用/风格可忽略/真问题非建议),混合严重度时才用前缀。

反模板化措辞规则:显式列出要删的废话模式('I noticed that…'、'You might want to consider…'、复述代码行、hedging),并给出对应✅替代。

skills/caveman-review/SKILL.md
**Drop:** - "I noticed that...", "It seems like...", "You might want to consider..." - "This is just a suggestion but..." — use `nit:` instead -
每个 ❌ 例子配 ✅ 单行改写(如 'I noticed that on line 42 you're not checking if the user object is null…' → 'L42: 🔴 bug: user can be null after .find(). Add guard before .email.'),用正反对照训练输出习惯。

保留清单保技术精度:行号精确、符号名反引号保留、给具体修复而不是 'consider refactoring'。

skills/caveman-review/SKILL.md
**Keep:** - Exact line numbers - Exact symbol/function/variable names in backticks - Concrete fix, not "consider refactoring this" -
压缩的是语气与铺垫,不压缩可定位性(行号/符号名)与可执行性(具体修法)。

Auto-Clarity 例外:CVE 级安全发现、架构分歧、新人教学场景退回完整段落行文,然后再恢复单行模式。

skills/caveman-review/SKILL.md
Drop terse mode for: security findings (CVE-class bugs need full explanation + reference), architectural disagreements (need rationale, not just a one-liner), and onboarding contexts where the author is new and needs the "why".
与主 caveman 技能的 Auto-Clarity 机制同构——高风险/需要上下文的理解场景不压缩。

边界纪律:只产评审意见文本,不写修复、不批准/拒绝、不跑 linter,输出可直接粘贴。

skills/caveman-review/SKILL.md
Reviews only — does not write the code fix, does not approve/request-changes, does not run linters.
技能定位是『评审表达风格』而非评审工作流:动作(approve/request-changes/跑工具)明确排除,纯输出格式指导。

2核心能力

01单行评审意见输出(`L<line>: <problem>. <fix>.`,多文件带 file 前缀)
02四档严重度分级(bug/risk/nit/q)
03削除评审套话与 hedging(必要时用 q: 表达不确定)
04保留精确定位与具体修复建议(行号/符号名/修法)
05Auto-Clarity:安全/架构/教学场景自动展开完整说明
06输出即贴即用的 PR 评论(不做审批/不跑工具)

4管控建议与判定依据

建议配套管控措施
面向 Agent
可自动加载
面向管理者
登记来源与版本
判定依据(文件路径与关键语句摘要)
  • SKILL.md: 纯提示词指令与规则文本,无脚本执行与外部影响
审计说明: 。纯指令型 skill:零脚本、零网络、零凭证、零本地写入;输出仅是按格式重排的评审文本,且 Auto-Clarity 保证安全级发现(CVE)会展开完整说明而非硬压缩。注意点仅为对话性引导,无代码级风险。

5第二遍独立确认

  • [ok] 纯 prompt、无脚本 — skills/caveman-review 目录 git ls-tree 仅 SKILL.md + README.md;无任何可执行文件。
  • [ok] 单行格式协议 — 原文 '**Format:** `L<line>: <problem>. <fix>.`' 存在;多文件变体 `<file>:L<line>:` 亦在。
  • [ok] 四档严重度 — 🔴 bug / 🟡 risk / 🔵 nit / ❓ q 四行定义逐字存在。
  • [ok] Drop/Keep 清单 — 'Drop:' 下列出 I noticed that… 等套话与复述代码行;'Keep:' 下列出精确行号/符号名/具体修法。
  • [ok] Auto-Clarity 例外 — 原文含 security findings (CVE-class…)/architectural disagreements/onboarding contexts 三类展开条件。
  • [ok] 边界声明与源码一致 — 'does not write the code fix, does not approve/request-changes, does not run linters' 逐字在——无任何工具调用指令。
  • [ok] 外部依赖为空 — 文件级扫描 URL/CLI/API 零命中;无 linter/CI/评审平台依赖。
  • [ok] meta 元数据 — 与 caveman 同仓库:stars 104500、pushed_at 2026-09-09、本地 HEAD==origin/main==pin 15581d1;技能 MIT 面。

6结论

  • 输出协议高度可执行:单行『位置/问题/修复』让评审意见可扫描、可过滤、可直接粘贴。
  • 严重度分级减少噪音:作者可只看 🔴 bug,忽略 🔵 nit。
  • 反套话规则具体到例句,模型容易对齐。
  • 安全级发现不压缩:CVE 类给完整说明+参考。
  • 职责边界干净:不越权改码/审批/跑工具,纯输出风格。
  • 适合: 适合想要『短、可扫描、可直接贴 PR』评审风格的开发者在代码评审会话中使用(/caveman-review、'review this PR'、'review the diff');适合已熟悉代码库、只需定位与修法提示的 reviewer 与 author。
    不适合: 不适合需要完整论证的安全审计/架构评审(Auto-Clarity 虽会展开但整体输出仍偏单行);不适合面向新人的教学式评审(onboarding 场景逐条展开成本高);不适合期望技能自动跑 linter/发 approve/提交修改的评审工作流——它明确只输出文本。
    Install Agent-Ready
    ① Verified Mirror 2026-09-09
    Option A · Direct DownloadDownload caveman-review.tar.gz
    sha256: 94f8129bf1ddbecf…
    Option B · Copy Guide for Agent
    install.json
    agent 读 JSON 指南后会自动从本站下载安装,无需更多说明。
    ② Upstream GitHub
    GitHub Repo ↗
    Pinned to commit 15581d1400.