agentleFS
Diego-RomeroDiego-Romero/claude-skills/submit-pr/SKILL.md

submit-pr

Skill0 starsChanged 9 months agoMITView on GitHub

Create a well-documented pull request following project conventions, including proper branch naming, conventional commits, and a complete PR description. Check for a project instruction file (stop at first match): Store as $INSTRUCTION_FILE. Detect the verification command: Store as $VERIFY_CMD. If nothing found, skip verification. If $INSTRUCTION_FILE exists, check if it defines files that trigger additional testing requirements (e.g., testing matrices, checklists). Store these patterns for Step 2.3. If $VERIFY_CMD was found, run it: If this fails, stop and ask the…

  • Commits and pushes

5 other projects use a version of this.

Adopted by

Most recently taken up by

  • Other versions5 projects use a version of this.

    Word for word · 0

    None found.

    Edited · 0

    None found.

    Wrote their own version · 5

    1. tisfeng/Easydict★ 15ksame name
    2. baidu-baige/LoongForge★ 831same name
    3. MelbourneDeveloper/dart_node★ 113same name
    4. e2bgateway/e2bgateway★ 8same name
    5. hhhyyyy99/prot-skills★ 7same name

    How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.

  • In this repository4 other files it gives its agents.

The file

Show its rules and text

We split this skill into the rules it gives an agent

18 rules. 0 are common, 16 are distinctive, and 2 are very specific to this project.

  • 0

    Common

    Most of the 4 edited versions we read keep these.

  • 16

    Distinctive

    This author's own choices. Worth a look.

  • 2

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Create a well-documented pull request following project conventions, including proper branch naming, conventional commits, and a complete …

    line 9
  2. Distinctive:

    Check for a project instruction file (stop at first match):

    line 16
  3. Very specific:

    If $INSTRUCTION_FILE exists, check if it defines files that trigger additional testing requirements (e.g., testing matrices, checklists).

    line 39
  4. Distinctive:

    No uncommitted changes (unless intentional)

    line 53
  5. Distinctive:

    All relevant files are tracked

    line 55
  6. Very specific:

    If $VERIFY_CMD was found, run it:

    line 59
  7. Distinctive:

    If this fails, stop and ask the user if they want to:

    line 65
  8. Distinctive:

    Verify it follows conventional naming:

    line 77
  9. Distinctive:

    If the branch name doesn't follow conventions, ask the user if they want to rename it.

    line 86
  10. Distinctive:

    If the instruction file defines files that trigger testing checklists, check if any changed files match.

    line 112
  11. Distinctive:

    Ask the user directly:

    line 118
  12. Distinctive:

    Reviewers: All other organization members.

    line 192
  13. Distinctive:

    If checks are failing, inform the user and suggest next steps.

    line 211
  14. Distinctive:

    Use descriptive, kebab-case names

    line 237
  15. Distinctive:

    Document breaking changes clearly

    line 251
  16. Distinctive:

    Check if branch needs rebasing:

    line 257
  17. Distinctive:

    If push is rejected after rebase, ask the user before force-pushing.

    line 265
  18. Distinctive:

    Wait for checks to re-run

    line 272

“Common” is measured: kept by at least 6 in 10 of the 4 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 a well-documented pull request following project conventions, including proper branch naming, conventional commits, and a complete PR description.

Pre-flight: Auto-detect Environment

Step 0.1: Find Instruction File

Check for a project instruction file (stop at first match):

  1. CLAUDE.md
  2. AGENTS.md
  3. CONVENTIONS.md
  4. CONTRIBUTING.md

Store as $INSTRUCTION_FILE.

Step 0.2: Find Verification Command

Detect the verification command:

  1. package.json: Scripts in order: check:ci → check → lint
  2. Makefile: Targets: check → lint → test
  3. Cargo.toml: cargo clippy && cargo test
  4. pyproject.toml: Detect ruff or flake8 → use appropriate command
  5. go.mod: go vet ./... && go test ./...

Store as $VERIFY_CMD. If nothing found, skip verification.

Step 0.3: Find Additional Testing Requirements

If $INSTRUCTION_FILE exists, check if it defines files that trigger additional testing requirements (e.g., testing matrices, checklists). Store these patterns for Step 2.3.

Phase 1: Verify Current State

Step 1.1: Check Git Status

git status

Ensure:

  • No uncommitted changes (unless intentional)
  • On the correct feature branch (not on main)
  • All relevant files are tracked

Step 1.2: Verify Checks Pass

If $VERIFY_CMD was found, run it:

$VERIFY_CMD

If this fails, stop and ask the user if they want to:

  • Fix the issues before proceeding
  • Proceed anyway (not recommended)
  • Abort the PR submission

Step 1.3: Check Branch Name

git branch --show-current

Verify it follows conventional naming:

  • feat/<name> — New features
  • fix/<name> — Bug fixes
  • docs/<name> — Documentation changes
  • refactor/<name> — Code refactoring
  • chore/<name> — Maintenance tasks
  • test/<name> — Test additions/updates

If the branch name doesn't follow conventions, ask the user if they want to rename it.

Phase 2: Review Changes and Gather Information

Step 2.1: Get Commit History

git log main..HEAD --oneline

Review the commits. Check if they follow Conventional Commits. If not, suggest cleaning up.

Step 2.2: Get Detailed Diff

git diff main...HEAD --stat
git diff main...HEAD

Analyze what files were modified, features added/changed, bugs fixed, whether tests were added, and whether documentation was updated.

Step 2.3: Check for Additional Testing Requirements

If the instruction file defines files that trigger testing checklists, check if any changed files match. If so, read the referenced testing documentation and include the checklist in the PR body.

Step 2.4: Ask User for PR Details

Ask the user directly:

Question 1: PR Type "What type of change is this PR?" Options:

  • "Feature - New functionality" (Recommended for features)
  • "Bug Fix - Fixes an issue"
  • "Documentation - Docs only"
  • "Refactor - Code improvements"
  • "Chore - Maintenance tasks"

Question 2: Breaking Changes "Does this PR introduce breaking changes?"

Question 3: Testing Status "What testing has been completed?"

Phase 3: Generate PR Description

Step 3.1: Analyze Changes

Based on the diff and commits, generate a comprehensive PR description.

Auto-fill:

  1. Description: 2-3 sentence summary
  2. Type of Change: Based on user input
  3. Changes Made: Key changes from the diff
  4. Testing: Tests run based on user input

Step 3.2: Create PR Description

Format the PR body. Use a HEREDOC when creating the PR.

Phase 4: Push and Create PR

Step 4.1: Ensure Branch is Pushed

git rev-parse --abbrev-ref --symbolic-full-name @{u} 2>/dev/null || echo "no-upstream"

If no upstream:

git push -u origin $(git branch --show-current)

If upstream exists:

git push

Step 4.2: Get Current User and Org Members

gh api user --jq '.login'
ORG=$(gh repo view --json owner --jq '.owner.login')
gh api "orgs/$ORG/members" --jq '.[].login' 2>/dev/null || echo ""

Filter out the current user to get reviewers.

Step 4.3: Create Pull Request

gh pr create --title "<title>" --body "$(cat <<'EOF'
<PR description>
EOF
)" --base main --assignee @me --reviewer <member1>

Title format: Conventional commits style (feat: ..., fix: ..., etc.)

Assignee: Always @me.

Reviewers: All other organization members. If the org API fails (personal repo), skip reviewers.

Step 4.4: Verify PR Creation

gh pr view --json number,url,title

Display the PR URL to the user.

Phase 5: Post-PR Tasks

Step 5.1: Verify CI/CD

gh pr checks

If checks are failing, inform the user and suggest next steps.

Step 5.2: Final Summary

Display:

## Pull Request Submitted

- **Branch**: <branch>
- **Title**: <title>
- **URL**: <url>
- **Type**: <type>
- **Commits**: <count>

### Next Steps

1. Wait for CI checks to complete
2. Address any review comments
3. Merge when approved

Best Practices

Branch Naming

  • Use descriptive, kebab-case names
  • Prefix with type: feat/, fix/, docs/, etc.

Commit Messages

  • Present tense, imperative mood ("Add feature" not "Added feature")
  • First line 50 characters or less
  • Separate subject from body with a blank line

PR Descriptions

  • Be thorough — reviewers need context
  • Link to related issues and PRs
  • Include screenshots/videos for UI changes
  • Document breaking changes clearly

Troubleshooting

Git push fails

Check if branch needs rebasing:

git fetch origin
git rebase origin/main
git push

If push is rejected after rebase, ask the user before force-pushing.

CI/CD checks failing

  1. Check logs: gh pr checks --watch
  2. Fix issues locally
  3. Push fixes
  4. Wait for checks to re-run

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.