benbrastmckie/nvim/skill-pr-review-research
Claude Code and agent skill by benbrastmckie/nvim
- community
Checking that the SKILL.md file is still in the repository.
Fetch GitHub PR and Zulip thread data for pr-type review tasks. Invoke for pr research tasks.
Install
npx vskill@latest install benbrastmckie/nvim/skill-pr-review-researchSKILL.md
PR Review Research Skill
Thin wrapper that validates inputs, extracts the sources array from state.json, and delegates to pr-review-research-agent to fetch GitHub and Zulip data.
Trigger Conditions
This skill activates when:
- Task type is "pr"
/researchcommand targets a pr-type review task- The task was created by
/pr --reviewand has asourcesarray in state.json
Execution Flow
Stage 1: Input Validation
Validate that:
task_numberexists and resolves to an active project in state.jsontask_typeis"pr"- The task has a
sourcesarray with at least one entry
Stage 2: Preflight Status Update
Update status to "researching" 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 with reconciliation pattern. Use this for naming the report file (zero-padded to 2 digits, e.g., 01).
Stage 4: Prepare Delegation Context
Build the delegation JSON with PR-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-research-agent"- Prompt: the prepared delegation JSON
The subagent will:
- Write early metadata to
.return-meta.json - Fetch GitHub PR data (4 endpoints)
- Optionally fetch Zulip thread data
- Write research report to
specs/{NNN}_{SLUG}/reports/{NN}_pr-review-research.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: "researched" and include the report artifact.
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:
"researched"-> 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 (Postflight)
Stage 7a: Propagate Memory Candidates
If .return-meta.json contains memory_candidates array with entries, pass them to the memory vault:
Stage 8: Link Artifacts in state.json
Add the research report artifact to state.json and regenerate TODO.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:
- Sources fetched (GitHub PR: N reviews, N comments)
- Zulip status (fetched N messages / skipped: unconfigured)
- Report artifact path
- Key findings (open questions count, requested changes count)
Do NOT return JSON.
MUST NOT (Postflight Boundary)
After the agent returns -- whether with status researched, partial, or failed -- this skill MUST proceed immediately to postflight (Stage 6). The skill MUST NOT:
- Edit source/report files - All research work is done by agent
- Run domain analysis or calculations - Analysis is agent work
- Use MCP or WebSearch tools - Research tools are for agent use only
- Analyze or grep source - Analysis is agent work
- Write reports - Artifact creation is done by agent
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/researchto resume.
The postflight phase is LIMITED TO:
- Reading agent metadata file
- Calling
update-task-status.shfor status updates (state.json + TODO.md) - Linking artifacts in state.json
- 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-research/SKILL.md
Popularity
- Repository stars
- 444
- Repository forks
- 464
- 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-research)