benbrastmckie/nvim/skill-pr-review-implementation
Claude Code and agent skill by benbrastmckie/nvim
- community
Checking that the SKILL.md file is still in the repository.
Compose PR review response files (pr-response.md, zulip-response.md) for pr-type review tasks. Delegates to pr-review-implementation-agent when sources are present; falls back to cslib-implementation-agent for legacy PR prep tasks. Transitions task to [PR READY]. Invoke for pr implementation tasks.
Install
npx vskill@latest install benbrastmckie/nvim/skill-pr-review-implementationSKILL.md
PR Review Implementation Skill
Thin wrapper that validates inputs, determines whether this is a PR review response task (sources present) or a legacy PR description task (sources absent), and delegates to the appropriate agent. The critical difference from skill-pr-implementation is the status transition: this skill uses preflight pr_ready (not postflight pr_ready) to set the task to [PR READY], directing the user to manually post the response files.
Trigger Conditions
This skill activates when:
- Task type is "pr"
/implementcommand targets a pr-type task- The routing entry for
implement.prresolves toskill-pr-review-implementation
Dispatch Decision
After input validation, inspect the sources array in the task's state.json entry:
- Sources present and non-empty → PR review response workflow
- Delegate to
pr-review-implementation-agent - Agent composes
pr-response.mdand/orzulip-response.md - Sources absent or empty → Legacy PR description workflow
- Delegate to
cslib-implementation-agent(same asskill-pr-implementation) - Agent composes
pr-description.mdfrom git diff
Execution Flow
Stage 1: Input Validation
Validate that:
task_numberexists and resolves to an active project in state.jsontask_typeis"pr"
Stage 1a: Dispatch Decision
Check for sources array in the task entry:
workflow="review_response"→ proceed with Stages 2-10 belowworkflow="pr_description"→ delegate tocslib-implementation-agent(legacy path)
Legacy path: If workflow="pr_description", use the same delegation context and postflight as skill-pr-implementation. The agent should compose pr-description.md from the task description and git diff, and the skill should call postflight pr_ready at Stage 7.
Stage 2: Preflight Status Update
Update status to "implementing" BEFORE invoking subagent:
Stage 3: Create Postflight Marker
This skill previously wrote a bare, metadata-free marker via touch. Source skill-base.sh and derive padded_num/project_name (not previously derived anywhere in this skill), then follow @.claude/context/patterns/skill-preflight-flow.md's Stage 3 (marker creation) so this skill's marker carries the full Shape A payload, matching every other lifecycle skill:
Stage 3a: Read Artifact Number
Read next_artifact_number from state.json for naming summary files:
Stage 4: Prepare Delegation Context
Find the latest research report and plan files:
Build the delegation JSON with PR-review-specific fields:
Extract sources from state.json:
Note: Use jq -c (compact output) for inline JSON in delegation context. Use the safe select(.project_number == $num) pattern (not !=) per jq-escaping-workarounds.md.
Stage 4a: Memory Retrieval (Optional)
If --clean flag is NOT set, retrieve relevant memories:
Include memory_context in the delegation context if non-empty.
Stage 5: Invoke Subagent
Use the Agent tool with:
subagent_type: "pr-review-implementation-agent"- Prompt: the prepared delegation JSON
The subagent will:
- Write early metadata to
.return-meta.json - Read the research report and extract reviewer feedback
- Apply minor code changes if any are requested
- Compose
pr-response.mdand/orzulip-response.md - Write final metadata to
.return-meta.json - Return brief text summary
Stage 5b: Self-Execution Fallback
CRITICAL: If you performed the work above WITHOUT using the Agent tool (i.e., you read files, wrote artifacts, or updated metadata directly instead of spawning a subagent), you MUST write a .return-meta.json file now before proceeding to postflight. Use the schema from return-metadata-file.md with status: "implemented" and include the response file artifacts.
If you DID use the Agent tool, skip this stage -- the subagent already wrote the metadata.
Postflight (ALWAYS EXECUTE)
The following stages MUST execute after work is complete, whether the work was done by a subagent or inline (Stage 5b). Do NOT skip these stages for any reason.
Stage 6: Parse Subagent Return
Read the metadata file:
Check status field:
"implemented"→ success, proceed normally"partial"→ partial success, note in status update"failed"→ failure, update status accordingly
Stage 6a: Validate Artifact Content (Non-Blocking)
Stage 7: Update Task Status (PR READY)
CRITICAL: Use preflight pr_ready to transition the task to [PR READY].
Why `preflight pr_ready` and NOT `postflight pr_ready`:
postflight pr_readywould mark the task[COMPLETED](the postflight for pr_ready is "completed")preflight pr_readysets the task to[PR READY]without advancing to completed- The task stays
[PR READY]until the user manually posts the response files and runs/pr
Do NOT use postflight implement (that would set [COMPLETED]), and do NOT use postflight pr_ready.
Stage 7a: Propagate Memory Candidates
If .return-meta.json contains memory_candidates array with entries, log them for later harvest by /learn --task N:
Stage 8: Link Artifacts in state.json
Add response file artifacts to state.json and regenerate TODO.md.
For each response file created, add an artifact entry. Use pr_response for pr-response.md and zulip_response for zulip-response.md:
Stage 8a: TTS Lifecycle Notification
Stage 9: Cleanup Marker Files
Follow @.claude/context/patterns/skill-postflight-flow.md's Stage 9 (cleanup), reusing the padded_num/project_name derived at Stage 3:
Stage 10: Return Brief Text Summary
Return 3-6 bullet points summarizing:
- Research report used (if any)
- Code changes applied (count)
- Response files created (pr-response.md, zulip-response.md)
- Task status transition (now [PR READY])
- Guidance to manually post response files
Example:
Do NOT return JSON.
MUST NOT (Postflight Boundary)
After the agent returns, this skill MUST NOT:
- Edit .lean files - All CSLib proof work is done by agent
- Run lake build/test/lint - Verification is done by agent
- Use lean-lsp MCP tools - Domain tools are for agent use only
- Grep for sorries - Debt analysis is agent work
- Write pr-response.md or zulip-response.md - Artifact creation is agent work
- Create feature branches or push to remote - Never in this skill
- Post to GitHub or Zulip - User handles this manually
- Call `postflight pr_ready` - This skill MUST use
preflight pr_readyto set [PR READY] - Call `postflight implement` - That would incorrectly set [COMPLETED]
PROHIBITION: If the subagent returned partial or failed status, the lead skill MUST NOTattempt to continue, complete, or "fill in" the subagent's work. Report the partial/failedstatus and let the user re-run/implementto resume.
The postflight phase is LIMITED TO:
- Reading agent metadata file
- Updating state.json via jq (using
preflight pr_readystatus target) - Linking artifacts in state.json
- Regenerating TODO.md
- Lifecycle notification
- Cleanup of temp/marker files
Reference: @.claude/context/standards/postflight-tool-restrictions.md
Return Format
Brief text summary (NOT JSON).
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingagent-system/extensions/cslib/skills/skill-pr-review-implementation/SKILL.md
Popularity
- Repository stars
- 445
- Repository forks
- 454
- 7-day trend score
- 30
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/benbrastmckie/nvim/skill-pr-review-implementation)