Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add zsutxz/ClaudeLearning --skill code-review-loopgit clone --depth 1 https://github.com/zsutxz/ClaudeLearningWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/zsutxz/claudelearning/code-review-loop)<a href="https://agentmods.dev/skills/zsutxz/claudelearning/code-review-loop"><img src="https://agentmods.dev/badge/skills/zsutxz/claudelearning/code-review-loop/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/zsutxz/claudelearning/code-review-loop"><img src="https://agentmods.dev/badge/skills/zsutxz/claudelearning/code-review-loop.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00097 | $0.00983 |
| Opus 5 | $0.00048 | $0.00491 |
| Sonnet 5 | $0.00019 | $0.00197 |
| Haiku 4.5 | $0.00010 | $0.00098 |
Grade A, and why
code-review-loop scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 9d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
What it actually says
🔁 Code Review Loop — 定时代码审查循环
每 5 分钟审查一次当前的代码变更(git diff),在当前会话期间持续循环。
不持久化:会话结束或进程被杀,循环自动失效,不会跨会话残留。
触发时机
- 用户说“定时审查代码 / 每 5 分钟审查一次 / 开始审查循环” → 启动
- 用户说“停止审查 / 停止循环 / 结束审查” → 停止
执行流程
1. 启动循环
调用 CronCreate 创建一个 session-only 定时任务:
| 参数 | 值 | 说明 |
|---|---|---|
cron |
*/5 * * * * |
每 5 分钟触发一次 |
prompt |
见下方「每轮审查 prompt」 | 每次触发时注入对话的指令 |
recurring |
true |
周期性任务 |
durable |
false |
关键:不写入 scheduled_tasks.json,进程结束即失效 |
创建后,向用户回报:
- ✅ 循环已启动 + 返回的 job ID
- 停止方式:关闭会话/杀进程即自动停止,或说“停止审查循环”主动停止
2. 每轮审查 prompt
将以下文本原样作为 CronCreate 的 prompt 参数(cron 每次触发时注入对话):
[定时代码审查] 审查当前未提交的代码变更:
1. 先运行 `git status --short` 和 `git diff --stat` 判断是否有变更
2. 无变更 → 只回复“✅ 暂无新变更”,立即结束本轮(不空跑、不编造问题)
3. 有变更 → 运行 `git diff` 取出变更,审查 bug / 安全 / 逻辑错误,按 严重 / 中等 / 轻微 分级,每条格式:`文件:行 — 问题 — 建议`
4. 只审查、不修改代码
3. 停止循环
两种方式(都满足“用户终止即失效”):
- 被动:关闭会话 / 杀掉 Claude Code 进程 → session-only 任务随之消失(因为
durable: false) - 主动:调用
CronList找到本循环的 job ID →CronDelete删除
核心规则
- 只读:审查循环绝不修改代码,只报告问题
- 不空跑:无 diff 时必须立即结束本轮,避免浪费 token
durable必须为false:否则会落盘并跨会话残留,违反“终止即失效”要求- 7 天上限:Claude Code 的周期任务最多跑 7 天会自动过期(硬限制),需要长期运行时重新启动
注意事项
- 审查范围默认是未提交的变更(
git status+git diff,含已暂存和未暂存,不含已 commit 的) - 触发受 REPL 空闲约束:你正在对话时不会打断,当前一轮结束后才 fire
- 调整间隔改
cron字段即可(如*/10 * * * *为 10 分钟,0 * * * *为每小时)
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 9d ago First seen · 77 lines · 97 tokens per session scan A 5c33d2fb6d71
code-review-loop is a skill published in the GitHub repository zsutxz/ClaudeLearning (5 stars, last pushed 1mo ago), licensed MIT. It adds 97 tokens to every session and 983 once invoked, about $0.0005 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.
Other skills, from other repositories
review-implement-phase
Implements triaged review actions, commits focused fixes, and posts Done plus resolves threads. Use when the user wants only the implementation phase of the review-framework workflow.
github-pr-workflow
Prepare a GitHub pull request from a feature branch — branch hygiene, commit shape, title/body, verification notes, screenshots for UI work, and replies to review comments.
github-automation
GitHub workflow automation, PR management, issue tracking, and code review coordination. Integrates with GitHub Actions and repository management. Use when: PR creation, code review, issue management, release automation, workflow setup. Skip when: local-only changes, non-GitHub repositories.
review-delta
Review only changes since last commit using impact analysis. Token-efficient delta review with automatic blast-radius detection.
work-unit-commits
Plan commits as reviewable work units. Trigger: implementation, commit splitting, chained PRs, or keeping tests and docs with code.
github-contributor
End-to-end playbook for shipping high-quality pull requests to open-source projects you don't maintain — discovery, CONTRIBUTING compliance, PR-size check, minimal-diff implementation, PR description with AI-assisted disclosure, conflict resolution, and post-submission maintainer interaction. Use whenever creating…