agentleFS
tovrleaftovrleaf/openkata/skills/github-create-pr/SKILL.md

github-create-pr

Skill1 starsChanged 13 days agoMITView on GitHub

Creates a pull request using GitHub CLI by following every numbered step in order. Do not skip steps. Do not improvise — execute the workflow literally. Activate when the user says "create PR", "open PR", "push and PR", "submit for review", or work is ready for review.

  • Deletes or force-pushes
  • Commits and pushes

1 other project uses a version of this.

Adopted by

Most recently taken up by

The file

Show its rules and text

We split this skill into the rules it gives an agent

14 rules. About 0 are common, 13 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈13

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  • could be automatic: a setting could enforce it
  1. Distinctive:

    If on main or master, stop and warn: "You are on the default branch.

    line 27
  2. Distinctive:

    If rebase conflicts, stop and let the user resolve.

    line 36
  3. Distinctive:

    If a PR already exists, show its URL and ask: "A PR already exists for this branch.

    line 42
  4. Distinctive:

    If any fail, stop and fix before pushing.

    line 47
  5. Distinctive:

    If push fails, report the error and suggest fixes (force push not allowed without explicit permission).

    line 55
  6. Distinctive:

    Use this to understand the scope and write an accurate PR description.

    line 63
  7. Very specific:

    If yes, run gh pr view --web.

    line 77
  8. Distinctive:

    No section headers unless there are multiple distinct sections.

    line 94
  9. Distinctive:

    Do not force push without explicit user permission.

    line 96
  10. Distinctive:

    Do not push to main/master directly.

    line 97
  11. Distinctive:

    If the branch has a single commit, use its message as the PR title.

    line 98
  12. Distinctive:

    Does NOT modify code or commit

    line 107
  13. Distinctive:

    Does NOT force push without explicit permission

    line 108
  14. Distinctive:

    Does NOT push to main/master directly

    line 109

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 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 Pull Request

Open a pull request for the current branch using gh.

Steps

  1. Check for uncommitted changes — Run git status --short. If output is non-empty, show the list and ask: "There are uncommitted changes. Commit and include them, or create the PR without them?" Do not proceed without an answer.
  2. Verify branch — Run git branch --show-current. If on main or master, stop and warn: "You are on the default branch. Create a feature branch first."
  3. Rebase on main — Always fetch and rebase before pushing:
    git fetch origin main
    git rebase origin/main
    If rebase conflicts, stop and let the user resolve.
  4. Check for existing PR — Run:
    gh pr list --head $(git branch --show-current)
    If a PR already exists, show its URL and ask: "A PR already exists for this branch. Open it instead?"
  5. Run verification — Check AGENTS.md or the project's build/test configuration for pre-push steps. Run them. If any fail, stop and fix before pushing.
  6. Push the branch — Run:
    git push --force-with-lease -u origin $(git branch --show-current)
    Uses --force-with-lease for safety after rebase. Falls back to plain push if no upstream exists yet. If push fails, report the error and suggest fixes (force push not allowed without explicit permission).
  7. Analyze changes — Run:
    git log main..HEAD --oneline
    git diff main --stat
    Use this to understand the scope and write an accurate PR description. Do not guess — base the description on actual changes.
  8. Create the PR — Run:
    gh pr create --title "<title>" --body "<body>"
    Show the generated title and description to the user for approval before submitting. If gh is not installed, provide the manual URL: https://github.com/{owner}/{repo}/compare/{branch}
  9. Ask about browser — "Open the PR in your browser?" If yes, run gh pr view --web.

Conventions

  • Title: under 70 characters, plain language summary.
  • Description format:
    Summary paragraph explaining what and why.
    
    - Concise bullet per logical change
    - No sub-bullets
    - Focus on outcomes, not file paths
    
    ## Testing (optional, only when changes affect behavior)
    
    ## Deployment (optional, only when post-merge steps exist)
  • No section headers unless there are multiple distinct sections. The default is summary + bullets, flat.
  • Do not force push without explicit user permission.
  • Do not push to main/master directly.
  • If the branch has a single commit, use its message as the PR title. If multiple commits, summarize.

Boundaries

  • DOES check for uncommitted changes
  • DOES push the current branch
  • DOES create a GitHub pull request
  • DOES run pre-push verification steps
  • Does NOT modify code or commit
  • Does NOT force push without explicit permission
  • Does NOT push to main/master directly

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.