pr-lifecycle

Validate worktrees, branch names, issue links, and commit messages for PRs.

3|Updated Oct 25, 2025
One-click install
npx skills add https://github.com/codekiln/langstar --skill pr-lifecycle
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: pr-lifecycle
Source: https://github.com/codekiln/langstar/tree/main/.claude/skills/pr-lifecycle
Command: npx skills add https://github.com/codekiln/langstar --skill pr-lifecycle

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Enforce project hygiene throughout the PR lifecycle. Use before creating PRs to validate worktrees, branch naming, and issue linking. Use when creating PRs to ensure proper "Fixes #XYZ" keywords, conventional commit titles, and complete PR bodies. Use after PR merge for cleanup guidance and issue closure verification.

Core Features & Use Cases

  • Pre-PR Validation: Ensure you are in a proper worktree, branch naming follows conventions, and the targeted issue is open.
  • PR Body & Commits: Enforce "Fixes #XYZ" keywords and Conventional Emoji Commit conventions in PR titles and bodies.
  • Lifecycle Guidance: Provide templates and checklists to support PR creation, review, and post-merge cleanup.

Quick Start

Before creating a PR, run the hygiene checks to validate:

  • You are in a worktree (not main) and on a properly named branch containing i<num>.
  • The issue number is valid and open.
  • The PR body includes a Fixes #<issue> reference.
  • Your commits reference the issue with a closing keyword (fixes, closes, resolves).

Example guidance:

  • Verify you’re in a worktree (wip/ path)
  • Confirm branch name contains i<number> (e.g., m8-p123-i234-feature)
  • Ensure the linked issue is OPEN
  • Ensure commits include a "Fixes #<num>" keyword

Frequently Asked Questions about pr-lifecycle

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I enforce branch naming conventions and issue linking in my PR workflow?

Branch naming conventions and issue linking are enforced through automated hygiene checks that validate your branch contains an issue number (i<num>), verify the linked issue is open, and require 'Fixes #<issue>' keywords in commits. These checks run before PR creation to catch problems early.

What's the best way to validate PR hygiene across the entire PR lifecycle?

PR hygiene validation spans three stages: pre-PR checks ensure you're in a proper worktree with a correctly named branch, PR creation checks enforce Conventional Emoji Commit titles and complete PR bodies with Fixes keywords, and post-merge checks guide cleanup and issue closure. Templates and checklists support each stage.

Can I automate checks for conventional commits and proper issue references in pull requests?

Yes. Automation enforces Conventional Emoji Commit conventions in PR titles, requires 'Fixes #<num>' or similar closing keywords in commit messages and PR bodies, and validates that referenced issues are open. Checks integrate with Git and gh CLI to run stateless across the PR lifecycle.

How do I ensure I'm working in the correct worktree before creating a PR?

Pre-PR validation checks confirm you're in a worktree (not on main) and on a branch following naming conventions that include an issue number. These checks prevent accidental commits to main and catch branch naming problems before PR creation.

What happens if my PR body or commit message doesn't reference the issue correctly?

Validation fails if PR bodies lack 'Fixes #<issue>' references or commits omit closing keywords (fixes, closes, resolves). The Skill requires these references as a precondition for PR creation, preventing PRs that can't automatically close linked issues.

Do I need tmux or specific Git configurations to use PR hygiene checks?

The Skill requires Git and gh CLI access, stateless session support, and provides tmux window naming guidance. No special Git configurations are mandatory, but tmux naming conventions help organize workflow windows during PR preparation and review.