From rules-for-ai
Creates/edits GitHub PRs by detecting repo templates, applying locale rules, and defaulting to a four-section structure.
How this skill is triggered — by the user, by Claude, or both
Slash command
/rules-for-ai:hashiiiii-pull-requestThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
The pull request body structure comes from the repository. Do not impose a fixed format when the repo already defines one.
The pull request body structure comes from the repository. Do not impose a fixed format when the repo already defines one.
Before drafting a pull request:
CLAUDE.md / AGENTS.md) override resolved locale keys; follow them when they state a language for pull requests~/.config/rules-for-ai/LOCALE.mdLOCALE.default.mdpull-requests keyUse section headings exactly as they appear in the template you follow. When using the default fallback below, headings stay English — only the prose changes with locale. When pull-requests is ja_JP, keep those English headings and write the prose under each heading in Japanese.
gh pr creategh pr edit --body)Before drafting, look for a pull request template in the target repository:
.github/pull_request_template.md.github/PULL_REQUEST_TEMPLATE.mdpull_request_template.md at the repository root.md file under .github/PULL_REQUEST_TEMPLATE/When one exists, read it and follow its headings, order, and subsections verbatim. Fill in every markdown ATX heading the template defines (# through ######). If the repository has multiple templates under .github/PULL_REQUEST_TEMPLATE/, follow whichever template the user or repository conventions point to.
Use this structure only when the repository has no pull request template:
## Summary
## Motivation
## Changes
## Testing
| Section | Purpose |
|---|---|
| Summary | What this PR does, in one or two sentences |
| Motivation | Why the change is needed; link the issue with Closes #NNN |
| Changes | Notable changes, as a bullet list |
| Testing | Commands you ran and their result — real output, no mocks or stubs |
Open as a draft while work is in progress.
When the repository has a template, base the body on that file. When it does not, use the default fallback:
gh pr create --draft --title "<type>: <subject>" --body "$(cat <<'EOF'
## Summary
## Motivation
## Changes
## Testing
EOF
)"
The <type>: <subject> title follows the same type vocabulary as the branch and commit (see the hashiiiii-git skill).
| Mistake | Fix |
|---|---|
| Ignoring the repo template | Read the repository template first; only use the default fallback when none exists |
| Empty or vague Testing | Paste the actual commands and their output |
| Motivation folded into Summary | Summary is what changed; Motivation is why, with the issue link |
| Missing a template section | Include every markdown ATX heading from the template you are following |
| Reordering or renaming headings | Keep the template's headings verbatim and in order |
npx claudepluginhub hashiiiii/rules-for-ai --plugin rules-for-aiCreates, updates descriptions, and adds comments to GitHub pull requests using file-based drafts for safety, emphasizing material impact and reviewer-friendly communication.
Analyzes git diffs and commit history to fill PR templates and create pull requests via gh CLI. Useful for automating PR creation and descriptions.
Guides completion of development work by verifying tests, detecting environment, and presenting structured options for merge, PR, or cleanup.