crit-cli
О программе
Навык crit-cli позволяет программно создавать и управлять комментариями и рабочими процессами для ревью кода, включая синхронизацию с GitHub PR и обработку JSON-файлов ревью. Он предназначен для мультиагентных систем и автоматизированных процессов, которым необходимо манипулировать ревью crit без интерактивных циклов. Ключевые операции включают публикацию/снятие ревью, отправку/получение данных из GitHub и программное создание inline-комментариев.
Быстрая установка
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 "crit" or "review", use the
$critskill instead — it covers the full review loop. 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.
Use read_file on the path printed by crit. Example structure:
{
"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": "Grok" }
]
}
],
"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": [ ... ]
}
]
}
}
}
Field rules:
resolved:falseor missing both mean unresolved. Onlytruemeans resolved.quote(optional): the exact text the reviewer highlighted.anchor(line comments): the full text of the commented lines at the time the comment was placed. Use the anchor to locate content after edits.drifted: true: content was removed or heavily rewritten — treat line numbers as approximate.- Unresolved comments may have
replies— read them before acting.
Use run_terminal_cmd with the following patterns. Always pass --author 'Grok'.
# Review-level (general feedback)
crit comment --author 'Grok' 'Overall feedback here'
# File-level (whole file, no line numbers)
crit comment --author 'Grok' path/to/file.md 'The whole file needs X'
# Line (single line or range)
crit comment --author 'Grok' path/to/file.go:42 'Missing null check'
crit comment --author 'Grok' path/to/file.go:50-55 'Extract to helper'
# Reply to an existing comment
crit comment --reply-to <id> --author 'Grok' 'Fixed — added the helper and tests'
Hard rules:
- Always pass
--author 'Grok'. - Always single-quote the body in the shell command (double quotes break on backticks,
$, etc.). - Line numbers are 1-indexed file lines on disk (not diff lines).
- Reply bodies support full markdown.
- Only pass
--resolvewhen the user explicitly asks you to. </important>
Use --json for atomicity and speed. Two ways to feed JSON:
# Short bodies — pipe via stdin
echo '[
{"body": "overall feedback", "scope": "review"},
{"path": "session.go", "body": "restructure the round logic", "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"}
]' | crit comment --json --author 'Grok'
Prefer --file <path> for any multi-paragraph body (shell quoting of newlines in JSON is fragile). Write the JSON with write, then point crit at it:
crit comment --json --file /tmp/replies.json --author 'Grok'
--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 → 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 |
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>
Comment IDs are unique per session, but the same ID can appear in multiple files. Disambiguate with --path:
crit comment --reply-to c_a1b2c3 --path src/auth.go --author 'Grok' 'Fixed the null check'
In --json mode, set the file field on the entry. Review-level IDs (r_…) are globally unique.
</important>
Plan reviews (via crit plan or the exit_plan_mode hook) store the review file in ~/.crit/plans/<slug>/. Always pass --plan <slug> — without it crit comment looks in the project root and will not find the comments. The slug is shown in the review feedback prompt and in the output of crit plan-hook.
crit comment --plan my-plan-2026-05-14 --reply-to c_a1b2c3 --author 'Grok' 'Updated the plan'
When you are in a Grok plan-mode session, the plan file itself lives at ~/.grok/sessions/<cwd>/<session-id>/plan.md. The --plan <slug> flag tells crit comment which Crit-managed review file to write to.
</important>
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 the gh CLI installed and authenticated. PR number is auto-detected from the current branch (or you can pass it explicitly).
--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.
--qris terminal-only — skip in web/chat UIs where block characters won't render.--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>
Review file location quick reference
- Normal git/files mode:
~/.crit/reviews/<key>.json - Plan mode (via
crit planor hook):~/.crit/plans/<slug>/review.json(thecurrent.mdsymlink points at the latest plan version) - The exact path is always printed by the
critcommand and bycrit status --json.
Use read_file on the printed path, then act on the review_comments and per-file comments arrays as described above.
This reference skill is automatically available whenever the agent needs to manipulate Crit comments or reviews programmatically. Pair it with the main crit skill when the user wants the interactive browser review experience.
GitHub репозиторий
Часто задаваемые вопросы
Что такое Skill crit-cli?
crit-cli — это Claude Skill от tomasz-tomczyk. Skills объединяют инструкции и ресурсы, которые Claude загружает по мере необходимости, чтобы выполнять задачи, связанные с crit-cli, без дополнительных запросов.
Как установить crit-cli?
Используйте команды установки на этой странице: добавьте crit-cli в Claude Code как плагин или клонируйте репозиторий в каталог skills, затем перезапустите Claude, чтобы загрузить Skill.
К какой категории относится crit-cli?
crit-cli относится к категории Мета.
Можно ли использовать crit-cli бесплатно?
Да. crit-cli размещён на AIMCP и доступен для бесплатной установки.
Похожие навыки
Этот навык предоставляет проверенную в продакшене настройку для Content Collections — TypeScript-ориентированного инструмента, который преобразует файлы Markdown/MDX в типобезопасные коллекции данных с валидацией Zod. Используйте его при создании блогов, сайтов документации или контентных приложений на Vite + React для обеспечения типобезопасности и автоматической проверки содержимого. Он охватывает всё: от настройки плагина Vite и компиляции MDX до оптимизации развертывания и валидации схем.
Этот навык позволяет разработчикам создавать приложения на платформе прогнозных рынков Polymarket, включая интеграцию с API для торговли и получения рыночных данных. Он также обеспечивает потоковую передачу данных в реальном времени через WebSocket для отслеживания текущих сделок и рыночной активности. Используйте его для реализации торговых стратегий или создания инструментов, обрабатывающих обновления рынка в реальном времени.
Этот навык помогает разработчикам создавать плагины OpenCode, которые подключаются к более чем 25 типам событий, таким как команды, файлы и операции LSP. Он предоставляет структуру плагина, спецификации API событий и шаблоны реализации для модулей на JavaScript/TypeScript. Используйте его, когда вам нужно перехватывать, отслеживать или расширять жизненный цикл ассистента OpenCode AI с помощью пользовательской событийно-ориентированной логики.
SGLang — это высокопроизводительный фреймворк для обслуживания больших языковых моделей (LLM), специализирующийся на быстрой структурированной генерации JSON, regex и рабочих процессов агентов с использованием кэширования префиксов RadixAttention. Он обеспечивает значительно более высокую скорость вывода, особенно для задач с повторяющимися префиксами, что делает его идеальным для сложных структурированных результатов и многократных диалогов. Выбирайте SGLang вместо альтернатив, таких как vLLM, когда вам требуется ограниченное декодирование или вы создаете приложения с интенсивным совместным использованием префиксов.
