agentleFS
CodeWithBehnamCodeWithBehnam/cc-docs/skills/pr/SKILL.md

pr

Skill2 starsChanged 9 months agoMITView on GitHub

Create a pull request. Summarizes changes since the base branch, generates a PR title and description, pushes the branch, and opens a PR via the gh CLI. Use when opening a PR, submitting work for review, or when the user says "open a PR", "create a pull request", or "submit for review".

  • Commits and pushes

The file

We split this skill into the rules it gives an agent

11 rules. About 0 are common, 7 are distinctive, and 4 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈7

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 4

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Create a pull request for the current branch:

    line 13
  2. Distinctive:

    If $ARGUMENTS is provided, use it as the base branch

    line 16
  3. Distinctive:

    Check the current branch name: git branch --show-current

    line 18
  4. Distinctive:

    If already on the default branch, stop and ask the user to switch to a feature branch

    line 19
  5. Very specific:

    If the push fails due to no upstream, use git push --set-upstream origin <branch>

    line 24
  6. Very specific:

    Create the PR: gh pr create --base <base> --title "<title>" --body "<description>"

    line 32
  7. Distinctive:

    Must be on a feature branch (not the default branch)

    line 38
  8. Very specific:

    If gh is not installed: provide the PR URL to create manually via the web

    line 43
  9. Distinctive:

    If push is rejected (non-fast-forward): suggest git pull --rebase first

    line 44
  10. Very specific:

    If PR already exists for this branch: show the existing PR URL with gh pr view

    line 45
  11. Distinctive:

    If no commits ahead of base: report and stop

    line 46

≈ “Common” is an estimate: at least 1 in 5 of the 213,895 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Create a pull request for the current branch:

  1. Determine the base branch:
    • If $ARGUMENTS is provided, use it as the base branch
    • Otherwise, detect the default branch: git remote show origin | grep 'HEAD branch'
  2. Check the current branch name: git branch --show-current
    • If already on the default branch, stop and ask the user to switch to a feature branch
  3. Summarize changes compared to the base:
    • git log origin/<base>..HEAD --oneline for commit history
    • git diff origin/<base>..HEAD --stat for changed files
  4. Push the current branch to origin: git push -u origin HEAD
    • If the push fails due to no upstream, use git push --set-upstream origin <branch>
  5. Generate a PR title and description:
    • Title: concise, imperative mood, max 72 chars (e.g., "Add user authentication via OAuth2")
    • Description sections:
      • Summary: what this PR does and why (2-4 sentences)
      • Changes: bullet list of key changes
      • Testing: how to verify the changes
      • Related issues: mention any linked issue numbers if inferable from branch name or commits
  6. Create the PR: gh pr create --base <base> --title "<title>" --body "<description>"
  7. Print the PR URL

Requirements

  • gh CLI must be installed and authenticated (gh auth status)
  • Must be on a feature branch (not the default branch)
  • At least one commit must exist ahead of the base branch

Error Handling

  • If gh is not installed: provide the PR URL to create manually via the web
  • If push is rejected (non-fast-forward): suggest git pull --rebase first
  • If PR already exists for this branch: show the existing PR URL with gh pr view
  • If no commits ahead of base: report and stop

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.