pr-workflow
Skill4 starsChanged 9 months agoMITView on GitHub
Guide pull request creation, review process, CI gates, and merge strategies. Use when the user creates a PR, asks about PR templates, review workflows, CODEOWNERS setup, or merge strategies. Apply when running gh pr create.
- Deletes or force-pushes
- Commits and pushes
10 other projects use a version of this.
Adopted by
Most recently taken up by
- sbluemin/fleet-harnesstheir own version, first seen Oct 4, 2026
- notque/vexjoy-agenttheir own version, first seen Sep 26, 2026
- 686f6c61/alfred-devtheir own version, first seen Aug 15, 2026
- rootkit-lab/skinktheir own version, first seen Aug 12, 2026
- me-cedric/agent-compasstheir own version, first seen Jun 24, 2026
- enckequity/samebraintheir own version, first seen Jun 10, 2026
Other versions10 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 10
- Chorus-AIDLC/Chorus★ 1.2ksame name
- notque/vexjoy-agent★ 424same name
- 686f6c61/alfred-dev★ 116same name
- andreaswasita/copilot-agents-dojo★ 54same name
- sbluemin/fleet-harness★ 17same name
- Autopsias/slashagents★ 4same name
- me-cedric/agent-compass★ 3same name
- enckequity/samebrain★ 0same name
- kienbui1995/magic-powers★ 0same name
- rootkit-lab/skink★ 0same 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 repository78 other files it gives its agents.
- AGENTS.mdAGENTS.md
- rules/agents.mdAGENTS.md
- .github/copilot-instructions.mdCopilot instructions
- .cursor/rules/claude-initial-setup.mdcCursor rule
- parallel-task-executionSkill
- subagent-patternsSkill
- task-coordinationSkill
- agent-communicationSkill
- context-managementSkill
- multi-agent-orchestrationSkill
- deploy-strategiesSkill
- github-actions-guideSkill
- pipeline-patternsSkill
- anthropic-sdk-guideSkill
- prompt-engineeringSkill
- tool-use-patternsSkill
- automated-review-setupSkill
- pr-standardsSkill
- review-checklistSkill
- file-organizationSkill
- immutability-patternsSkill
- naming-conventionsSkill
- branching-strategySkill
- commit-conventionsSkill
- migration-patternsSkill
- query-optimizationSkill
- schema-design-guideSkill
- error-tracingSkill
- log-analysisSkill
- systematic-debuggingSkill
- django-admin-customizationSkill
- django-orm-masterySkill
- drf-api-patternsSkill
- docker-compose-guideSkill
- dockerfile-best-practicesSkill
- multi-stage-buildsSkill
- express-error-handlingSkill
- middleware-patternsSkill
- rest-api-nodeSkill
- async-fastapiSkill
- dependency-injection-fastapiSkill
- pydantic-validationSkill
- concurrency-patterns-goSkill
- error-handling-goSkill
- idiomatic-goSkill
- automation-triggersSkill
- hook-recipesSkill
- pre-post-hooksSkill
- junit-testingSkill
- maven-gradle-guideSkill
- spring-boot-patternsSkill
- mcp-resource-patternsSkill
- mcp-server-creationSkill
- mcp-tool-designSkill
- context-optimizationSkill
- knowledge-persistenceSkill
- memory-patternsSkill
- caching-strategiesSkill
- lazy-loading-patternsSkill
- profiling-guideSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
4 rules. 0 are common, 2 are distinctive, and 2 are very specific to this project.
0
Common
Most of the 8 edited versions we read keep these.
2
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
- Distinctive: line 25
Always analyze changes before creating a PR:
- Very specific: line 60
Create .github/pull_request_template.md in the repository:
- Very specific: line 87
Create .github/CODEOWNERS to auto-assign reviewers:
- Distinctive: line 200
Merging with failing CI: Never override CI checks to merge faster.
“Common” is measured: kept by at least 6 in 10 of the 8 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.
Files
Pull Request Workflow
Structure PRs for effective code review, automated CI validation, and clean merge history.
When to Use
- Creating a pull request with
gh pr createor GitHub UI - Setting up PR templates for a repository
- Configuring CODEOWNERS for automatic review assignment
- Choosing between squash, merge, and rebase merge strategies
- Reviewing or improving an existing PR workflow
Core Patterns
PR Creation with gh CLI
Always analyze changes before creating a PR:
# 1. Check what will be in the PR
git log main..HEAD --oneline
git diff main...HEAD --stat
# 2. Push branch with upstream tracking
git push -u origin feature/AUTH-123-add-sso
# 3. Create PR with structured body
gh pr create --title "feat(auth): add SSO login via SAML" --body "$(cat <<'EOF'
## Summary
- Add SAML-based SSO authentication flow
- Integrate with identity provider discovery endpoint
- Store SSO sessions with configurable TTL
## Changes
- `src/auth/sso.ts` — SAML assertion parsing and validation
- `src/auth/routes.ts` — New `/auth/sso/callback` endpoint
- `src/config/sso.ts` — SSO provider configuration schema
## Test Plan
- [ ] Unit tests for SAML assertion parsing
- [ ] Integration test with mock IdP
- [ ] Manual test with Okta sandbox
- [ ] Verify session expiration behavior
Closes #142
EOF
)"PR Template
Create .github/pull_request_template.md in the repository:
## Summary
<!-- 1-3 bullet points describing WHAT changed and WHY -->
## Changes
<!-- List key files changed and what was modified -->
## Test Plan
<!-- How to verify this works correctly -->
- [ ] Unit tests pass
- [ ] Integration tests pass
- [ ] Manual testing steps documented
## Screenshots
<!-- If UI changes, include before/after screenshots -->
## Checklist
- [ ] Tests added/updated
- [ ] Documentation updated (if needed)
- [ ] No breaking changes (or noted in description)
- [ ] Self-reviewed the diffCODEOWNERS Setup
Create .github/CODEOWNERS to auto-assign reviewers:
# Default owners for everything
* @org/engineering-leads
# Frontend owned by frontend team
src/components/ @org/frontend
src/pages/ @org/frontend
src/styles/ @org/frontend
# API and backend
src/api/ @org/backend
src/services/ @org/backend
src/models/ @org/backend
# Infrastructure
Dockerfile @org/devops
docker-compose.yml @org/devops
.github/workflows/ @org/devops
terraform/ @org/devops
# Security-sensitive files require security review
src/auth/ @org/security @org/backend
src/crypto/ @org/securityMerge Strategy Selection
# SQUASH MERGE: Default for feature PRs
# Produces one clean commit on main
gh pr merge 123 --squash
# MERGE COMMIT: For release branches or when history matters
# Preserves all individual commits
gh pr merge 123 --merge
# REBASE MERGE: For clean, linear history
# Replays commits on top of base branch
gh pr merge 123 --rebase| Strategy | Best For | Result |
| Squash | Feature PRs, messy history | Single commit on main |
| Merge | Release branches, audit trails | Merge commit + all commits |
| Rebase | Clean PRs with good commits | Linear history, no merge commit |
Draft PRs and Review Process
# Create draft PR for early feedback
gh pr create --draft --title "WIP: refactor auth module"
# Mark ready for review when done
gh pr ready 123
# Request specific reviewers
gh pr create --reviewer "alice,bob" --title "feat: add caching layer"
# Add reviewers to existing PR
gh pr edit 123 --add-reviewer "alice"
# Check CI status before merging
gh pr checks 123
# View review status
gh pr view 123Review workflow stages:
- Draft PR — Open early for visibility, not ready for review
- Ready for Review — All CI passing, self-reviewed, description complete
- Changes Requested — Address feedback, push new commits (do not force-push)
- Approved — Merge when CI is green and approvals are met
- Merged — Delete the source branch
CI Gates Configuration
Example GitHub Actions workflow for PR validation:
# .github/workflows/pr-checks.yml
name: PR Checks
on:
pull_request:
branches: [main, develop]
jobs:
validate:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
- run: npm ci
- run: npm run lint
- run: npm run typecheck
- run: npm test -- --coverage
- run: npm run buildConfigure branch protection to require these checks before merging.
Anti-Patterns
What NOT to Do
- Giant PRs: PRs over 400 lines are hard to review and likely to hide bugs. Split into smaller, focused PRs.
- No description: A PR with just a title gives reviewers no context. Always include summary, changes, and test plan.
- Force-pushing during review: Reviewers lose context of what changed between review rounds. Push new commits instead.
- Merging with failing CI: Never override CI checks to merge faster. Fix the failures.
- Self-approving: Even solo developers benefit from CI gates. Do not bypass required reviews.
# BAD: No description
gh pr create --title "updates"
# BAD: Force push during review
git rebase -i HEAD~5
git push --force # Reviewer comments now point to nonexistent commits
# GOOD: Push fixup commits during review
git commit -m "fix: address review feedback on input validation"
git pushQuick Reference
PR Creation Checklist:
1. git log main..HEAD — review all commits
2. git diff main...HEAD --stat — verify changed files
3. git push -u origin <branch> — push with tracking
4. gh pr create — with title, body, reviewers
PR Title Format:
<type>(<scope>): <description> (matches commit conventions)
PR Body Sections:
## Summary — WHAT and WHY (1-3 bullets)
## Changes — Key files and modifications
## Test Plan — How to verify correctness
## Screenshots — Before/after for UI changes
Merge Strategy:
Feature PRs -> squash merge
Release branches -> merge commit
Clean linear PRs -> rebase merge
Files to Set Up:
.github/pull_request_template.md — PR template
.github/CODEOWNERS — Auto-assign reviewers
.github/workflows/pr-checks.yml — CI gates
Commands:
gh pr create --draft — Early visibility
gh pr ready 123 — Mark ready for review
gh pr checks 123 — Verify CI status
gh pr merge 123 --squash — Squash mergeDoes 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
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.

