Automates the Git and GitHub workflow for submitting code changes.

Install

mkdir -p .claude/skills/pr-alamenai && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/13174" && unzip -o skill.zip -d .claude/skills/pr-alamenai && rm skill.zip

Installs to .claude/skills/pr-alamenai

Activation

This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.

Commit, push, and open a pull request on GitHub
47 charsno explicit “when” trigger
Beginner

Key capabilities

  • Commit changes following conventional commit format
  • Push the current branch to remote
  • Open a pull request on GitHub
  • Assign labels to pull requests based on type and scope
  • Include a structured description in the pull request body
  • Verify and report the PR URL

How it works

The skill stages specific files, commits them using a conventional format, pushes the branch to the remote, and then opens a GitHub pull request with dynamically assigned labels and a structured body.

Inputs & outputs

You give it
Uncommitted changes, branch name, commit message details
You get back
Committed changes, pushed branch, and a GitHub pull request with labels and a structured description

When to use pr

  • Open PR
  • Push branch
  • Automate conventional commits

About this skill

Pull Request Skill

Commit changes, push the branch, and open a pull request on GitHub.

Instructions

  1. Check Current State

    • Run git status to see changed files
    • Run git diff --staged and git diff to see all changes
    • Run git log --oneline -5 to see recent commits
  2. Stage and Commit

    • Stage specific files by name (avoid git add -A or git add .)
    • Never stage sensitive files (.env, credentials, etc.)
    • Follow conventional commit format: type(scope): description
    • Keep commit messages concise (under 72 characters)
  3. Create or Use Branch

    • If on main, create a new branch: git checkout -b <branch-name>
    • Branch name format: type/short-description (e.g., feat/code-comparison, fix/marker-cleanup)
    • If already on a feature branch, use it
  4. Push to Remote

    • Push with upstream tracking: git push -u origin <branch-name>
  5. Assign Labels Add --label flags to gh pr create based on the PR type and scope.

    Type labels — pick based on the commit type:

    Commit typeLabel
    fixbug
    featenhancement
    docsdocumentation
    test(no type label)
    refactor(no type label)
    chore(no type label)

    Component labels — if the scope matches a component label in the repo, add it:

    ScopeLabel
    compassCompass
    interactionInteraction

    Run gh label list to check available labels if unsure. Multiple labels can be combined:

    gh pr create --label "bug" --label "Compass" ...
    
  6. Open Pull Request

    • Use gh pr create to open the PR
    • Write a clear title (under 70 characters)
    • Write a description that follows the structure below based on PR type
    • Start with a Type checklist — check the one that applies:
    gh pr create --title "type(scope): description" --label "label" --body "$(cat <<'EOF'
    ## Type
    
    - [ ] Feature
    - [ ] Bug fix
    - [ ] Refactor
    - [ ] Test
    - [ ] Docs
    - [ ] Chore
    
    ## Summary
    - bullet points describing what changed and why
    
    ## Bug Details (only for bug fixes)
    **What was the bug?**
    Describe the incorrect behavior.
    
    **Why did it happen?**
    Explain the root cause.
    
    **How was it fixed?**
    Describe the solution.
    
    ## Test Coverage
    If tests were added or updated, link to the file on the branch (permalink):
    - [`src/registry/map/__tests__/component.test.tsx`](https://github.com/alamenai/terrae/blob/<branch-name>/src/registry/map/__tests__/component.test.tsx)
    EOF
    )"
    
  7. Verify and Report

    • Show the PR URL to the user
    • Run git status to confirm clean state

Important Rules

  • Do NOT push to main directly — always use a feature branch
  • Do NOT force push unless explicitly requested
  • Ask user before proceeding with each step

When not to use it

  • When pushing directly to `main` is required
  • When force pushing is needed without explicit request
  • When sensitive files like `.env` or credentials are to be staged

Limitations

  • Does not allow pushing directly to `main`
  • Does not allow force pushing without explicit request
  • Does not stage sensitive files

How it compares

This skill automates the GitHub pull request process by enforcing conventional commit messages, intelligent label assignment, and a structured PR body, which is more consistent and efficient than manual PR creation.

Compared to similar skills

pr side by side with the closest alternatives in the catalog.

SkillInstallsUpdatedSafetyDifficulty
pr (this skill)06moReviewBeginner
github-workflow-automation112moReviewAdvanced
testing-workflow169moReviewIntermediate
github-actions-templates73moNo flagsIntermediate

Try saying

Example prompts that trigger this skill in your AI assistant.

You might also like

Search skills

Search the agent skills registry