agentleFS
Hey-DigaHey-Diga/dotclaude/skills/create-pr/SKILL.md

create-pr

Skill17 starsChanged 9 months agoMITView on GitHub

Create a pull request from the current branch with quality checks. Use when changes are ready for review, after committing.

  • Reads credentials
  • Commits and pushes

91 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use update-pr, create-issue and 9 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • MicrosoftSkill

    update-pr

    Update the pull request for the current session. Use when the user wants to push new changes to an existing PR.

    Also in 5 projects that use this

  • sahinSkill

    create-issue

    Also in 9 projects that use this

  • anderson-c-santosSkill

    merge-pr

    Merge a GitHub PR after all checks pass. Trigger for: /merge-pr, merge PR, approve and merge, squash merge, ship PR. Verifies CI, draft state, and approvals, then merges with the correct strategy based on branch type.

    Also in 3 projects that use this

  • Microsoft AzureSkill

    review-pr

    Review a pull request for functional issues, coding guideline adherence, and best practices. Use this when asked to review, inspect, or provide feedback on a pull request (Azure DevOps or GitHub). Proposes comments for user approval before posting.

    Also in 21 projects that use this

  • 32103210Skill

    create-rule

    Create Cursor rules for persistent AI guidance. Use when you want to create a rule, add coding standards, set up project conventions, configure file-specific patterns, create RULE.md files, or asks about .cursor/rules/ or AGENTS.md.

    Also in 3 projects that use this

  • MicrosoftSkill

    update-skills

    Check for and apply updates to installed skill branches from upstream.

    Also in 3 projects that use this

  • +2 more from microsoft

The file

Show its rules and text

We split this skill into the rules it gives an agent

24 rules. 0 are common, 20 are distinctive, and 4 are very specific to this project.

  • 0

    Common

    Most of the 82 edited versions we read keep these.

  • 20

    Distinctive

    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:

    Run git status to check for uncommitted changes

    line 14
  2. Distinctive:

    If there are uncommitted changes:

    line 15
  3. Distinctive:

    Wait for user's decision

    line 21
  4. Distinctive:

    Run git branch --show-current to get the current branch name

    line 22
  5. Distinctive:

    Verify we're not on main/master branch

    line 23
  6. Distinctive:

    Run the following checks in parallel:

    line 26
  7. Distinctive:

    If any checks fail:

    line 31
  8. Distinctive:

    Ask if I want to fix them before creating the PR

    line 33
  9. Distinctive:

    If yes, help fix the issues and re-run the checks

    line 34
  10. Very specific:

    Run git log origin/main..HEAD --oneline to see commits that will be in the PR

    line 37
  11. Very specific:

    Run git diff origin/main...HEAD --stat to see changed files summary

    line 38
  12. Very specific:

    Run git diff origin/main...HEAD to understand the full changes

    line 39
  13. Distinctive:

    If branch name contains an issue number (e.g., "123-feature-name"), extract it

    line 43
  14. Distinctive:

    Look for related issue by checking recent commits for issue references

    line 44
  15. Distinctive:

    Create a comprehensive PR description with:

    line 48
  16. Distinctive:

    Ask: "Does this look good?

    line 82
  17. Distinctive:

    Wait for approval or make requested changes

    line 83
  18. Distinctive:

    Run git push -u origin HEAD to push the branch to remote

    line 86
  19. Distinctive:

    After approval, create the PR using:

    line 90
  20. Very specific:

    Run gh pr view --web to open the PR in browser (optional)

    line 103
  21. Distinctive:

    Add labels if needed

    line 106
  22. Distinctive:

    Always ensure all tests pass before creating PR

    line 110
  23. Distinctive:

    Use conventional commit style for PR titles when possible

    line 111
  24. Distinctive:

    Check for any .env or sensitive data in the diff

    line 114

“Common” is measured: kept by at least 6 in 10 of the 82 edited versions of this file we could read. “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

You are tasked with creating a pull request from the current branch.

Process:

1. Pre-flight Checks

  • Run git status to check for uncommitted changes
  • If there are uncommitted changes:
    • Show the uncommitted changes clearly
    • Tell the user: "You have uncommitted changes. Please either:"
      • "1. Exit and run /commit to commit your changes first (recommended)"
      • "2. Stash the changes temporarily with git stash"
      • "3. Continue anyway if these changes aren't meant for this PR"
    • Wait for user's decision
  • Run git branch --show-current to get the current branch name
  • Verify we're not on main/master branch

2. Code Quality Verification

Run the following checks in parallel:

  • npm run lint - Check for linting issues
  • npm run typecheck - Check for TypeScript errors
  • npm test - Run the test suite

If any checks fail:

  • Show me the errors
  • Ask if I want to fix them before creating the PR
  • If yes, help fix the issues and re-run the checks

3. Analyze Changes

  • Run git log origin/main..HEAD --oneline to see commits that will be in the PR
  • Run git diff origin/main...HEAD --stat to see changed files summary
  • Run git diff origin/main...HEAD to understand the full changes
  • Identify the type of changes (feature, bugfix, refactor, chore, etc.)

4. Extract Context

  • If branch name contains an issue number (e.g., "123-feature-name"), extract it
  • Look for related issue by checking recent commits for issue references
  • Understand the purpose and scope of the changes

5. Draft PR Description

Create a comprehensive PR description with:

## Summary
[2-3 bullet points describing what this PR does]

## Related Issue
Closes #[issue-number] (if applicable)

## Changes Made
- [Detailed list of changes]
- [Include technical decisions if relevant]
- [Mention any breaking changes]

## Testing
- [ ] Unit tests pass
- [ ] Integration tests pass
- [ ] Manual testing completed
- [ ] Linting and type checking pass

## Screenshots
[If UI changes, include before/after screenshots]

## Checklist
- [ ] Code follows project style guidelines
- [ ] Self-review completed
- [ ] Tests added/updated for changes
- [ ] Documentation updated if needed
- [ ] No console.log or debug code left
- [ ] Translations added for new text (if applicable)

6. Review with User

  • Show me the draft PR title and description
  • Ask: "Does this look good? Any changes needed?"
  • Wait for approval or make requested changes

7. Push Changes

  • Run git push -u origin HEAD to push the branch to remote
  • This ensures the branch exists on GitHub before creating the PR

8. Create the PR

After approval, create the PR using:

gh pr create \
  --title "[Type] Clear, descriptive title" \
  --body "Full PR description from step 5" \
  --base main \
  --draft

Note: PRs are created as drafts by default to allow for final review before requesting feedback.

9. Post-Creation

  • Show me the PR URL
  • Run gh pr view --web to open the PR in browser (optional)
  • Suggest next steps:
    • Request reviews from team members
    • Add labels if needed
    • Link to project board if applicable

Important Notes:

  • Always ensure all tests pass before creating PR
  • Use conventional commit style for PR titles when possible
  • Include issue numbers for automatic linking
  • Be thorough in the description - it helps reviewers
  • Check for any .env or sensitive data in the diff

PR Title Format Examples:

  • feat: Add user authentication system
  • fix: Resolve date parsing issue in calendar
  • refactor: Improve appointment service performance
  • chore: Update dependencies to latest versions
  • docs: Add API documentation for new endpoints

Remember: A good PR description saves review time and provides context for future reference.

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.