Agent skill

pull-request

Analyzes branch diffs, drafts PR titles and bodies following Conventional Commits, and creates or updates pull requests via GitHub CLI. Use when user asks to "create a PR", "open a pull request", "update PR description", "draft a PR", or "submit changes for review".

Stars 1
Forks 1

Install this agent skill to your Project

npx add-skill https://github.com/jiyeol-lee/dotfiles/tree/main/.opencode/skills/pull-request

SKILL.md

Workflow

  1. Preflight
    • Confirm git repo, branch, and commits exist
    • Ensure current branch is NOT main or master — abort if so
    • Check for unpushed commits
  2. Analyze
    • Use tool__git--retrieve-current-branch-diff to analyze commits since diverging from target branch
    • Scan commit messages for issue references (e.g., LINEAR-123, JIRA-456, #123)
    • Check for PR template: try to read .github/pull_request_template.md or pull_request_template.md
  3. Draft
    • If existing PR:
      • Fetch context (reviews, comments) using tool__gh--retrieve-pull-request-info
      • If a template was found, validate the existing body against it and draft updates conforming to the template
      • Draft content updates based on reviews/comments
    • If new PR:
      • If template found: fill it out with the summary of changes (do not change template structure or headers)
      • If no template: draft a standard title and body
      • Use tool__gh--retrieve-repository-collaborators to list available reviewers
      • Ask the user: "Who should be the reviewer?"
    • Present the draft (title, body) and wait for approval
  4. Publish (only after explicit approval)
    • Push commits if needed: use tool__git--push
    • Use tool__gh--create-pull-request (new) or tool__gh--edit-pull-request (existing)
    • Use user-provided reviewers
    • Report the final PR URL

PR Title Format

Follow Conventional Commits for the PR title:

Prefix When to Use
feat: New feature
fix: Bug fix
refactor: Code refactoring
docs: Documentation only
chore: Maintenance, deps, CI
test: Adding or updating tests

PR Body Guidelines

  • If a PR template exists, conform to its structure and headers exactly
  • Summarize changes clearly — explain why, not just what or how
  • Use markdown formatting for readability
  • Include issue references if found in commits

Example Output

For a branch with 3 commits adding a new caching layer:

Title: feat: add Redis caching for user session lookups

Body:

markdown
## Summary

- Add Redis-based caching for user session lookups to reduce DB load
- Cache TTL is 15 minutes with automatic invalidation on session update
- Add `RedisCacheService` with connection pooling and retry logic

Constraints

  • NEVER create or update a PR without explicit user approval
  • NEVER auto-select or recommend reviewers — list collaborators and let the user choose
  • NEVER push without explicit approval
  • NEVER force-push to main/master

Expand your agent's capabilities with these related and highly-rated skills.

jiyeol-lee/dotfiles

commit

Analyzes repository state, proposes commit messages following Conventional Commits, and applies commits after user approval. Use when asked to "commit", "commit changes", "save my work", "create a commit", or "stage and commit".

1 1
Explore
jiyeol-lee/dotfiles

review

Performs code review analysis across Quality, Regression, Documentation, and Performance focus areas with severity-classified findings. Use when user asks to "review code", "review this PR", "check code quality", "review changes", or "do a code review".

1 1
Explore
jiyeol-lee/dotfiles

check

Verifies code quality through linting, type-checking, formatting, and testing. Use when asked to "run checks", "validate code", "lint this", "check for errors", "run tests", or "verify code quality" before or after changes.

1 1
Explore
jiyeol-lee/dotfiles

task-breakdown

Decomposes complex goals into atomic, dependency-aware work items with execution plans. Use when asked to "break down this task", "create a task plan", "decompose this goal", "split this work", "plan the implementation", "what are the steps", or "create an execution plan".

1 1
Explore
jiyeol-lee/dotfiles

code

Implements features, fixes bugs, refactors code, and writes unit and integration tests. Use when asked to "implement", "fix a bug", "refactor", "add a feature", "write tests", "add test coverage", or "update code".

1 1
Explore
jiyeol-lee/dotfiles

grill-me

Conducts thorough interviews to deeply understand user needs, requirements, and context before any implementation begins. Use when requirements are unclear, assumptions need validation, edge cases need exploration, when the user says "grill me", "ask me questions", "help me think through this", or when the underlying problem isn't fully understood.

1 1
Explore

Didn't find tool you were looking for?

Be as detailed as possible for better results