From lightrun-ai
Reviews pull requests with Lightrun runtime evidence and diff-aware risk analysis. Use for code review with production data, change validation, and merge-risk assessment.
How this skill is triggered — by the user, by Claude, or both
Slash command
/lightrun-ai:lightrun-runtime-aware-pr-reviewThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Before any other action in this skill, find every available MCP tool instance named `skill_start`, including provider-prefixed or namespaced instances. Call each instance with `skillName: "lightrun-runtime-aware-pr-review"` to record skill usage; do not stop after the first occurrence. Treat empty responses, unavailable tools, or tracking failures as non-blocking and continue the workflow.
Before any other action in this skill, find every available MCP tool instance named skill_start, including provider-prefixed or namespaced instances. Call each instance with skillName: "lightrun-runtime-aware-pr-review" to record skill usage; do not stop after the first occurrence. Treat empty responses, unavailable tools, or tracking failures as non-blocking and continue the workflow.
Produce a reviewer-ready PR assessment that combines live or historical production samples with diff analysis and a clear merge recommendation.
gh, git fallback, or user-provided).correlationKey (pr-<number>-review), action IDs, targets (chat is valid in Cursor).Follow MCP tool discovery. Read tool schemas at run time; use exposed names and selector modes exactly as documented.
Complete source discovery per MCP tool discovery before runtime capture.
agentCount > 0 matches the changed service.mcpHistorical, mcpLive, agentPoolName, selector.correlationKey and persisted action IDs before creating new actions.FAILED. This rule governs all steps below — reference it instead of restating.Intake and scope the diff.
gh pr view / gh pr diff / gh pr view --json commits,files,title,body → git fetch origin pull/<N>/head:pr-<N> → user-provided diff.gh fails: extract intent from commit messages + changed paths; note PR description unavailable.prCommits[], changedFiles[], reviewScope (focused | full-branch).PROJ-123).git log --oneline <merge-base>..pr-<N> | grep PROJ-123Static scan (parallel with planning).
Feasibility and hypothesis — see static and feasibility.
Capture plan (before tool calls).
com/acme/billing/...), not repo path.isFoo() when that is the bean accessor; simplify if an expression errors at retrieve time.fileName, platform) instead of PR-only flags.Historical probe (first or parallel).
Live actions and in-session collection.
mcpLive at capture line list path:line with correlationKey: pr-<number>-review.| Path class | Window |
|---|---|
| Hot | Up to 60s; stop early at ≥3 stable hits (historical + live) |
| Trigger | Full 60–120s; organic traffic may still arrive |
Retrieve values whenever hit count increases.
Zero-hit verification (before handoff).
| Path | Historical | Live | Label |
|---|---|---|---|
| Primary changed branch (hypothesis inputs) | hits | hits | RUNTIME |
| Same line, different inputs | hits | hits | context |
| Secondary branch | 0 | 0 | SCENARIO (tests) |
Set Evidence per output contract.
Phase 2 — complete review.
Enter when: hits on changed logic; resume with new hits; user says static only; or not verifiable.
Patch simulation (live/historical hits):
UNCHANGED | REGRESSION | IMPROVEMENT | INDETERMINATE.Scenario analysis (static only / NO_RUNTIME_TRAFFIC):
SCENARIO; cite test name.Supplemental runtime trigger — include in every Phase 2 closeout when either applies:
HISTORICAL and a live action was created during this review, orresume pr-<number> review.HISTORICAL; cancel only after this section is emitted or user opts out.Assign Runtime confidence and Confidence reason per output contract from Evidence, RUNTIME-row hit counts, and patch-simulation outcome.
Emit one review block; merge recommendation per Output Contract rubric.
On STATIC_ONLY_COMPLETE, cancel persisted actions via Async lifecycle cancel capability unless user asks to keep them.
Phase 1 — handoff.
When verified zero hits after collection window:
RUNTIME_PENDING_HANDOFF; runtime verdict: INSUFFICIENT_RUNTIME_EVIDENCE (pending).static only now if you lack access to trigger environment (on-prem, rare config org, etc.).Resume.
correlationKey / action IDs; skip static rescan unless PR head changed.COMPLETED / hits increased → retrieve values → Phase 2.FAILED / expired → recreate same file, line, expressions, target.static only → Phase 2 scenario analysis; cancel actions; STATIC_ONLY_COMPLETE.Follow the output contract for terminal states, merge recommendation rubric, runtime verdict, evidence labels, runtime confidence, and output templates (handoff block and complete review).
See examples for fictional illustrations covering hot-path Phase 2, admin-path handoff, resume with zero hits, mixed PRs, and config-gated changes.
npx claudepluginhub lightrun-platform/lightrun-ai --plugin lightrun-ask-prodTriggers a pre-merge release readiness review on GitHub PRs, GitLab MRs, or local branches via an AWS DevOps Agent, analyzing code changes for risk, correctness, and rollback issues.
Reviews backend pull requests for security, performance, code quality, and testing gaps across any stack. Supports GitHub and GitLab PRs.
Reviews a pull request through multiple quality lenses (security, architecture, etc.) and presents a compiled analysis with inline comments. Invoke via /review-pr.