关于
The crit-cli skill enables developers to programmatically create and manage crit inline comments and reviews through CLI commands, supporting multi-agent workflows on shared artifacts. It allows publishing/unpublishing reviews, synchronizing with GitHub PRs via push/pull, and reading/writing crit review JSON files. Use this for automated review workflows, not for interactive review sessions which are handled by the `/crit` command.
快速安装
Claude Code
推荐npx skills add tomasz-tomczyk/crit -a claude-code/plugin add https://github.com/tomasz-tomczyk/critgit clone https://github.com/tomasz-tomczyk/crit.git ~/.claude/skills/crit-cli在 Claude Code 中复制并粘贴此命令以安装该技能
技能文档
Crit CLI Reference
If a plan was just written and the user said
/critorcrit, invoke the/critcommand — do not use this reference skill. This skill covers CLI operations likecrit comment,crit pull/push, andcrit share.
Comments have three scopes:
- Line comments (
scope: "line") — tied to specific lines, stored infiles.<path>.comments - File comments (
scope: "file") — about a file overall, stored infiles.<path>.commentswithstart_line: 0 - Review comments (
scope: "review") — general feedback, stored in the top-levelreview_commentsarray
The review file path is shown by crit status.
Reading comments
When crit completes a review round, read stdout and follow its instructions. Unresolved comments are often embedded in that prompt as JSON. Check stderr for approved: true or approved: false.
When you need to read comments separately:
crit comments # human-readable, unresolved only (default)
crit comments --json # flat JSON for agents
crit comments --all # include resolved comments
crit comments --plan <slug> # plan reviews
crit comments [path] # explicit review.json or .crit directory
Review-level comments are listed first — easy to miss in raw review.json. Uses the same review resolution as crit comment (--output, --plan, daemon session).
Multiple active sessions
When more than one review session matches the current directory and branch, crit comment refuses to guess. Run crit status (or crit status --json) to list every active session, then target the intended review explicitly:
crit comment --session <id> --author <name> <path>:<line> <body>
crit comment --session <id> --json --file comments.json --author <name>
The JSON status output exposes the candidates in sessions.
{
"review_comments": [
{
"id": "r_f1e2d3",
"body": "Overall the architecture looks good",
"scope": "review",
"author": "User Name",
"resolved": false,
"replies": [
{ "id": "rp_b4a5c6", "body": "Thanks, addressed the minor issues", "author": "Claude" }
]
}
],
"files": {
"path/to/file.go": {
"comments": [
{
"id": "c_a1b2c3",
"start_line": 5,
"end_line": 10,
"body": "Comment text",
"quote": "the specific words selected",
"anchor": "The sessions table needs a complete rewrite...",
"author": "User Name",
"resolved": false,
"replies": [
{ "id": "rp_c7d8e9", "body": "Fixed by extracting to helper", "author": "Claude" }
]
}
]
}
}
}
Field rules:
resolved:falseor missing — both mean unresolved. Onlytruemeans resolved.quote(optional): the specific text the reviewer selected — narrows scope within the line range. Focus changes on the quoted text rather than the entire range.anchor(line comments): full text of the commented lines when placed. When edits shift line numbers, locate content by anchor rather than trustingstart_line/end_line.drifted: true: original content was removed or heavily rewritten — line numbers are approximate at best.- Unresolved comments may have
replies— read them before acting. </important>
# Review-level (general feedback)
crit comment --author 'Claude Code' '<body>'
# File-level (whole file, no line numbers)
crit comment --author 'Claude Code' <path> '<body>'
# Line (single line or range)
crit comment --author 'Claude Code' <path>:<line> '<body>'
crit comment --author 'Claude Code' <path>:<start>-<end> '<body>'
# Reply to an existing comment
crit comment --reply-to <id> --author 'Claude Code' '<body>'
Hard rules:
- Always pass
--author 'Claude Code'(or your agent name) so comments are attributed correctly. - Always single-quote the body — double quotes break on backticks and shell metachars.
- Line numbers reference the file on disk (1-indexed), not diff line numbers.
- Reply bodies support markdown — use code fences and inline code where helpful.
- Only pass
--resolvewhen the user explicitly asks. Never resolve proactively. </important>
Use --json for atomicity (single write, no partial state) and speed (one process). Two ways to feed the JSON:
# Short, single-line bodies — pipe via stdin:
echo '[
{"body": "overall feedback", "scope": "review"},
{"path": "session.go", "body": "restructure", "scope": "file"},
{"file": "src/auth.go", "line": 42, "body": "Missing null check"},
{"file": "src/auth.go", "line": "50-55", "body": "Extract to helper"},
{"reply_to": "c_a1b2c3", "body": "Fixed — added null check"},
{"reply_to": "r_f1e2d3", "body": "Done"}
]' | crit comment --json --author 'Claude Code'
Prefer --file <path> for any multi-paragraph body. Shell-quoted JSON breaks the moment a "body" string contains a raw newline — JSON forbids them, and the shell happily passes them through. Use the Write tool to author the JSON to a temp file, then point crit at it:
# After Write-ing /tmp/replies.json:
crit comment --json --file /tmp/replies.json --author 'Claude Code'
--file - reads stdin (same as omitting the flag).
Per-entry schema:
| Field | Type | Required | Notes |
|---|---|---|---|
file / path | string | line/file comments | Relative path. path alone (no line) → file-level. |
line | int/string | line comments | 42 or "45-47" |
end_line | int | optional | Defaults to line |
body | string | always | |
author | string | optional | Per-entry override; falls back to --author |
scope | string | optional | "review" / "file" — usually inferred |
reply_to | string | replies | Comment ID (c_… or r_…) |
resolve | bool | optional | Only when user explicitly asks |
Scope inference (when scope omitted): has reply_to → reply; no file/path and no line → review-level; path but no line → file-level; file/path + line → line.
</important>
crit comment --reply-to c_a1b2c3 --path src/auth.go --author 'Claude Code' 'Fixed the null check'
In --json mode, set the file field on the entry. Review-level IDs (r_…) are globally unique and never need this.
</important>
crit comment --plan my-plan-2026-03-23 --reply-to c_a1b2c3 --author 'Claude Code' 'Updated the plan'
</important>
<important if="you are syncing with a GitHub PR (pull or push)">
crit pull [pr-number] # Fetch PR review comments into the review file
crit push [--dry-run] [--event <type>] [-m <msg>] [pr] # Post review comments as a GitHub PR review
Requires gh CLI installed and authenticated. PR number is auto-detected from the current branch.
--event values: comment (default), approve, request-changes. -m adds a review-level body message.
</important>
crit share <file> [file...] # Upload and print URL
crit share --qr <file> # Also print QR code (terminal only)
crit share --org <slug> <file> # Share under an organization
crit share --org <slug> --visibility unlisted <file> # Org share with explicit visibility
crit unpublish [file...] # Remove shared review
- No server needed — reads files directly from disk. If a review file exists, comments for the shared files are included automatically.
- Always relay the output — copy the URL (and QR if used) into your response. Don't make the user dig through tool output.
--qris terminal-only — skip in mobile apps, web chat UIs, or anywhere Unicode block characters won't render correctly.--org <slug>shares under an organization. Visibility defaults toorganization(members only). Override with--visibility(organization,unlisted,public).- Unpublish uses the persisted delete token in the review file — no extra args needed. </important>
GitHub 仓库
常见问题
什么是 crit-cli Skill?
crit-cli 是一个 Claude Skill,作者为 tomasz-tomczyk。Skill 将 Claude 按需加载的说明和资源打包,让 Claude 无需额外提示即可执行与 crit-cli 相关的任务。
如何安装 crit-cli?
使用本页的安装命令:将 crit-cli 作为插件添加到 Claude Code,或将其仓库克隆到 skills 目录,然后重启 Claude 以加载该 Skill。
crit-cli 属于哪个分类?
crit-cli 属于文档分类。
crit-cli 可以免费使用吗?
可以。crit-cli 已收录在 AIMCP,可免费安装。
相关推荐技能
Railway Docs Skill可实时获取最新的Railway官方文档,确保回答的准确性。当开发者询问Railway功能特性、工作原理或分享docs.railway.com链接时,应优先使用此技能。它通过专门的LLM优化文档源提供最新信息,避免依赖过时记忆来回答技术问题。
该Skill为在n8n平台的Python代码节点中编写代码提供专家指导,特别适用于需要使用_input/_json/_node语法、Python标准库或了解n8n中Python限制的场景。它强调JavaScript应作为首选方案,仅当需要特定Python功能或对Python语法更熟悉时才使用Python。Skill提供了快速入门模板和关键注意事项,帮助开发者在n8n中高效编写Python代码。
Archon Skill为开发者提供了基于RAG的语义搜索和项目任务管理功能,可通过REST API访问知识库。它支持文档搜索、网站爬取、文件上传和版本控制,适用于技术文档查询和项目管理场景。首次使用时需要配置Archon主机地址,建议在处理外部文档时优先使用该Skill。
这个Skill为n8n工作流中的JavaScript代码节点提供专业指导,涵盖数据处理、HTTP请求和日期操作等核心场景。它详细解释了如何正确使用n8n特有的`$input`/`$json`语法、`$helpers`工具以及DateTime对象,并包含关键的错误排查和模式选择建议。开发者通过该Skill能快速掌握Code节点的正确返回格式、数据访问方法和常见陷阱解决方案。
