MCP HubMCP Hub
SKILL·ADEDF9

crit-cli

tomasz-tomczyk
Mis à jour 27 days ago
5 vues
979
74
979
Voir sur GitHub
Métaautomation

À propos

La compétence crit-cli permet la création et la gestion programmatique de commentaires et de flux de travail de revue de code, y compris la synchronisation avec les PR GitHub et la gestion des fichiers JSON de revue. Elle est conçue pour les systèmes multi-agents et les processus automatisés nécessitant de manipuler les revues crit sans boucles interactives. Les opérations clés incluent la publication/retrait de revues, le push/pull depuis GitHub, et la rédaction programmatique de commentaires en ligne.

Installation rapide

Claude Code

Recommandé
Principal
npx skills add tomasz-tomczyk/crit -a claude-code
Commande PluginAlternatif
/plugin add https://github.com/tomasz-tomczyk/crit
Git CloneAlternatif
git clone https://github.com/tomasz-tomczyk/crit.git ~/.claude/skills/crit-cli

Copiez et collez cette commande dans Claude Code pour installer cette compétence

Documentation

Crit CLI Reference

If a plan was just written and the user said "crit" or "review", use the $crit skill instead — it covers the full review loop. This skill covers CLI operations like crit comment, crit pull/push, and crit share.

Comments have three scopes:

  • Line comments (scope: "line") — tied to specific lines, stored in files.<path>.comments
  • File comments (scope: "file") — about a file overall, stored in files.<path>.comments with start_line: 0
  • Review comments (scope: "review") — general feedback, stored in the top-level review_comments array

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: false or missing both mean unresolved. Only true means 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.
<important if="you are authoring or replying to comments via crit comment">

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 --resolve when the user explicitly asks you to. </important>
<important if="you are leaving 3+ comments in one operation">

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:

FieldTypeRequiredNotes
file / pathstringline/file commentsRelative path. path alone → file-level.
lineint/stringline comments42 or "45-47"
end_lineintoptionalDefaults to line
bodystringalways
authorstringoptionalPer-entry override
scopestringoptional"review" / "file" — usually inferred
reply_tostringrepliesComment ID (c_… or r_…)
resolvebooloptionalOnly 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>

<important if="crit comment errored with 'comment found in multiple files'">

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>

<important if="you are responding to plan-mode comments (review file under ~/.crit/plans/)">

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>

<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 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>

<important if="the user asked to share, get a URL, get a QR code, or unpublish a review">
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.
  • --qr is terminal-only — skip in web/chat UIs where block characters won't render.
  • --org <slug> shares under an organization. Visibility defaults to organization (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 plan or hook): ~/.crit/plans/<slug>/review.json (the current.md symlink points at the latest plan version)
  • The exact path is always printed by the crit command and by crit 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.

Dépôt GitHub

tomasz-tomczyk/crit
Chemin: integrations/grok/skills/crit-cli
0
agentic-codingai-agentsai-toolsclicode-reviewdeveloper-tools
FAQ

Questions fréquentes

Qu’est-ce que le Skill crit-cli ?

crit-cli est un Skill Claude créé par tomasz-tomczyk. Un Skill regroupe des instructions et des ressources que Claude charge à la demande pour effectuer des tâches liées à crit-cli sans consigne supplémentaire.

Comment installer crit-cli ?

Utilisez les commandes d’installation de cette page : ajoutez crit-cli à Claude Code comme plugin ou clonez son dépôt dans votre dossier skills, puis redémarrez Claude pour charger le Skill.

À quelle catégorie appartient crit-cli ?

crit-cli appartient à la catégorie Méta.

crit-cli est-il gratuit ?

Oui. crit-cli est référencé sur AIMCP et son installation est gratuite.

Compétences associées

content-collections
Méta

Cette compétence propose une configuration éprouvée en production pour Content Collections, un outil axé sur TypeScript qui transforme des fichiers Markdown/MDX en collections de données typées de manière sûre avec une validation Zod. Utilisez-la lors de la création de blogs, de sites de documentation ou d'applications Vite + React riches en contenu pour garantir la sécurité de typage et la validation automatique du contenu. Elle couvre tout, de la configuration du plugin Vite et de la compilation MDX à l'optimisation des déploiements et la validation des schémas.

Voir la compétence
polymarket
Méta

Cette compétence permet aux développeurs de créer des applications avec la plateforme de marchés prédictifs Polymarket, incluant l'intégration d'API pour le trading et les données de marché. Elle fournit également une diffusion de données en temps réel via WebSocket pour surveiller les transactions en direct et l'activité du marché. Utilisez-la pour mettre en œuvre des stratégies de trading ou pour créer des outils traitant les mises à jour de marché en direct.

Voir la compétence
creating-opencode-plugins
Méta

Cette compétence aide les développeurs à créer des plugins OpenCode qui s'interconnectent avec plus de 25 types d'événements tels que les commandes, les fichiers et les opérations LSP. Elle fournit la structure du plugin, les spécifications de l'API événementielle et les modèles d'implémentation pour les modules JavaScript/TypeScript. Utilisez-la lorsque vous avez besoin d'intercepter, de surveiller ou d'étendre le cycle de vie de l'assistant IA OpenCode avec une logique personnalisée pilotée par les événements.

Voir la compétence
sglang
Méta

SGLang est un framework de service LLM haute performance spécialisé dans la génération rapide et structurée pour les workflows JSON, regex et agentiques grâce à son cache de préfixe RadixAttention. Il offre une inférence nettement plus rapide, particulièrement pour les tâches avec des préfixes répétés, ce qui le rend idéal pour les sorties complexes et structurées ainsi que les conversations multi-tours. Choisissez SGLang plutôt que des alternatives comme vLLM lorsque vous avez besoin d'un décodage contraint ou que vous construisez des applications avec un partage étendu de préfixes.

Voir la compétence