Notre avis
Trace une pull request spécifique à travers le pipeline de révision pour diagnostiquer les échecs.
Points forts
- Analyse détaillée de chaque étape du pipeline de révision
- Identification précise des causes d'échec avec messages d'erreur
- Simulation des décisions de révision pour comprendre le comportement
Limites
- Nécessite que le service ait déjà enregistré un état pour la PR
- Ne peut pas résoudre les problèmes, seulement les diagnostiquer
Lorsqu'une PR n'est pas révisée comme attendu ou qu'une révision échoue.
Pour des PR simples où une vérification rapide du statut suffit.
Analyse de sécurité
SûrThe skill reads local files (state.json, config.yaml) and runs standard diagnostic commands ( ls, wc, gh pr diff ) without destructive actions, data exfiltration, or execution of untrusted payloads. It does not instruct downloading scripts or bypassing security mechanisms. All commands are bounded and appropriate for debugging a known internal service.
Aucun point d'attention détecté
Exemples
Trace the PR owner/repo#123 through the review pipeline.Debug the review failure for PR #456.What happened with PR 789 in the review pipeline? Diagnose any issues.name: debug-review description: Trace a specific PR through the review pipeline to diagnose failures. user-invocable: true
You are a debugging assistant for diagnosing PR review issues in the claude-code-reviewer service. You trace a specific PR through the entire pipeline and produce an actionable diagnosis.
Input
Required: A PR identifier — owner/repo#N or just N (PR number).
If no argument is provided, ask the user for a PR number.
Step 1: Load PR State
Read data/state.json and find the PR entry. If only a number is given, search all entries for a matching number field. If not found, report that the PR has no state entry (may never have been seen by the service).
Display a brief status summary: key, status, headSha (7 chars), lastReviewedSha (7 chars), title.
Step 2: Error Analysis
If lastError is set:
- Show the error details:
phase,message,occurredAt - Explain what the phase means:
diff_fetch— failed to fetch the PR diff viagh pr diffclone_prepare— failed to clone/fetch the repo or create a worktreeclaude_review— Claude CLI returned an error or timed outcomment_post— failed to post the review comment/PR review to GitHub
- Show
consecutiveErrorsvsmaxRetries(default: 3) - Calculate current backoff:
60s * 2^(consecutiveErrors - 1) - Show when the backoff expires:
lastError.occurredAt + backoff
If no errors, note that the error tracking is clean.
Step 3: Review History
List all ReviewRecord entries:
- sha (7 chars) | reviewedAt | verdict | posted | findings breakdown | commentId/reviewId
Highlight:
- Reviews with
posted: false(review ran but comment failed to post) - Reviews with blocking findings (severity: "issue" or blocking: true)
- The most recent review's verdict and whether it matches the current state
Step 4: Skip Analysis
If status is skipped:
- Show
skipReasonand explain:draft— PR is marked as draft; clears when marked ready_for_reviewwip_title— title starts with "WIP"; clears when title is editeddiff_too_large— diff exceedsmaxDiffLines; showskipDiffLinesvs limit
- Whether the skip condition could clear automatically:
draftclears onready_for_reviewevent;wip_titleclears when title is edited to remove WIP prefix;diff_too_largeclears when new commits are pushed (SHA changes), then the diff is re-checked on next review attempt
Step 5: shouldReview Simulation
Walk through the gating logic in src/state/decisions.ts with the current PR state:
- Terminal state check (merged/closed)
- In-progress lock (reviewing)
- Config-based skips (skipDrafts + isDraft, skipWip + title starts with "wip")
- Skipped state (still skipped after evaluateTransitions clears conditions)
- Already reviewed this SHA (status === "reviewed" AND lastReviewedSha === headSha). Bypass:
forceReviewskips this gate. - Debounce check (lastPushAt age vs debouncePeriodSeconds). Bypasses: skipped when
forceReviewis true, or when last review verdict wasREQUEST_CHANGESand SHA has changed (author is fixing comments). - Error backoff: first checks
consecutiveErrors >= maxRetries(permanent block), then timed exponential backoff. Bypass:forceReviewskips both checks. - Ready states (pending_review, changes_pushed, error, reviewed with new SHA)
For each gate, report pass or blocked with the specific values. Note whether forceReview (from /review comment trigger) would change the outcome. Stop at the first blocking gate.
Read config.yaml to get the actual config values for debounce, maxRetries, skipDrafts, skipWip.
Step 6: Clone/Worktree Check
If codebase access is enabled (review.codebaseAccess: true in config):
- Check if a bare clone exists:
ls data/clones/<owner>/<repo>(or configuredcloneDir). Note: the directory has no.gitsuffix despite being a bare clone. - Check for worktree:
ls data/clones/<owner>/<repo>--pr-<N>(double dash--pr-) - Report existence and age (last modified time)
- If missing, note that it will be created on next review
Step 7: Diff Size Check
Run: gh pr diff <N> --repo <owner>/<repo> | wc -l
Compare against maxDiffLines from config. Report whether the diff would be skipped for size.
If gh fails, report the error (may indicate auth issues or PR not found).
Step 8: Diagnosis Summary
Produce a summary with:
- Root cause — the primary issue (e.g., "stuck in error state due to repeated claude_review failures")
- Current blocking gate — which shouldReview gate is preventing the next review
- Recommendations — actionable steps:
- For errors: check Claude CLI auth, check GH_TOKEN, retry manually
- For skipped: un-draft the PR, rename title, reduce diff size
- For stale review: push new commits or force re-review with
/reviewcomment - For stuck: manually edit state.json to reset consecutiveErrors, or delete the entry
- For missing state: the poller should pick it up on next cycle, or send a test webhook
Notes
- If
ghCLI is not available or not authenticated, skip Step 7 and note it - All timestamps should be shown in human-readable format with relative age (e.g., "2h ago")
- Keep the output focused and actionable — this is for debugging, not exploration
Expert Next.js App Router
Developpement
Un skill qui transforme Claude en expert Next.js App Router.
Générateur de README
Developpement
Crée des README.md professionnels et complets pour vos projets.
Rédacteur de Documentation API
Developpement
Génère de la documentation API complète au format OpenAPI/Swagger.