benbrastmckie/nvim/skill-pr-implementation
Claude Code and agent skill by benbrastmckie/nvim
- community
Checking that the SKILL.md file is still in the repository.
PR description preparation for CSLib tasks. Analyzes task description and git diff to produce pr-description.md. Delegates to cslib-implementation-agent and transitions task to [PR READY]. Branch creation and CI are handled by the /pr command. Invoke for pr implementation tasks.
Install
npx vskill@latest install benbrastmckie/nvim/skill-pr-implementationSKILL.md
PR Implementation Skill
Thin wrapper that delegates PR preparation work to cslib-implementation-agent subagent with PR-specific delegation context. The critical difference from skill-cslib-implementation is the postflight status transition: this skill calls pr_ready (not implement), setting the task to [PR READY] to direct the user to run /pr {task_number}.
Trigger Conditions
This skill activates when:
- Task type is "pr"
- /implement command targets a PR preparation task
- A pr-description.md needs to be composed based on the task description and git diff
Execution Flow
Stage 1: Input Validation
Validate task_number exists, task_type is "pr", and an implementation plan is present.
Stage 2: Preflight Status Update
Update status to "implementing" BEFORE invoking subagent.
Stage 3: Prepare Delegation Context
PR-specific context for the cslib-implementation-agent:
- Target output:
specs/{NNN}_{SLUG}/pr-description.md(canonical PR description file) - Diff analysis: Run
git diffto analyze what changes are present on the current branch - Standards:
pr-description-format.mdandpr-conventions.md(loaded via index-entries.jsonlanguages: ["pr"]) - Note: Branch creation and CI verification are handled by the
/prcommand
Important: The subagent's task is PR description composition only -- NOT branch creation, CI verification, or Lean proof implementation. The agent should:
- Read the task description and plan to understand what was implemented
- Run
git diff(orgit diff upstream/main...HEAD) to analyze changes on the current branch - Compose
pr-description.mdfollowing the canonical format frompr-description-format.md - Determine
base_branch(typically"main") and include it in the return metadata - Write
.return-meta.jsonwith statusimplementedwhen done
Stage 4: Invoke Subagent
Use Agent tool with subagent_type: "cslib-implementation-agent".
Stage 4b: 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 the appropriate status value for this operation.
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 4b). Do NOT skip these stages for any reason.
Stage 5: Parse Subagent Return
Read the metadata file from specs/{N}_{SLUG}/.return-meta.json.
Stage 6: Update Task Status (Postflight — PR READY)
CRITICAL DIFFERENCE: This skill calls pr_ready as the status target, NOT implement. This sets the task to [PR READY] instead of [COMPLETED], directing the user to run /merge.
Do NOT call postflight implement -- that would incorrectly mark the task as [COMPLETED] before the PR has been submitted.
Stage 7: Link Artifacts
Add pr-description.md artifact to state.json with summary. Update TODO.md per @.claude/context/patterns/artifact-linking-todo.md with field_name=**Summary**, next_field=**Description**.
Artifact type: pr_description, path: specs/{NNN}_{SLUG}/pr-description.md.
base_branch: Also record the base branch in the state.json task entry. This field is read by the /pr command to set --base when creating the PR. Use the branch name the PR will target (e.g., "main" for direct upstream PRs, or "feat/parent-branch" for stacked PRs).
The subagent should determine and report the base branch used (typically "main" unless this task is stacked on top of another unmerged PR).
Stage 8: Git Commit
Commit changes with session ID.
Stage 9: Return Brief Summary
Include a message directing the user to run /pr {task_number} now that the task is [PR READY]:
PR description complete. Task is now [PR READY].Run/pr {task_number}to create the branch, run CI, and submit the pull request.
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-description.md - Artifact creation is agent work
- Create feature branches - Branch creation is handled by the
/prcommand, not this skill - Run CI pipeline - CI verification (lake test, lint, shake) is handled by the
/prcommand, not this skill - Call `postflight implement` - This skill MUST use
postflight pr_readyto set [PR READY]
PROHIBITION: If the subagent returned partial or failed status, the lead skill MUST NOT attempt to continue, complete, or "fill in" the subagent's work. Report the partial/failed status and let the user re-run/implementto resume.
The postflight phase is LIMITED TO:
- Reading agent metadata file
- Updating state.json via jq (using
pr_readystatus target) - Updating TODO.md status marker via Edit
- Linking artifacts in state.json
- Git commit
- 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-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-implementation)