pr-contribution
Open-source pull request creation: PR descriptions, titles, fork workflows, and contribution compliance. Invoke whenever task involves any interaction with pull requests for external repositories — contributing code, opening PRs from forks, writing PR descriptions, or preparing changes for upstream submission.
What this skill does
# PR Contribution
**Every PR is a proposal to a stranger's codebase. Respect their time, follow their rules, prove your change deserves to
exist.**
Agent-generated PRs are rejected more often than human PRs — not because the code is wrong, but because they lack
context, violate implicit norms, and burden maintainers with unnecessary review work.
## References
- **PR descriptions** — `${CLAUDE_SKILL_DIR}/references/pr-descriptions.md` Full description anatomy:
summary/body/metadata structure, templates, anti-patterns, scaling description depth to change size
- **Agent PR quality** — `${CLAUDE_SKILL_DIR}/references/agent-pr-quality.md` Why agent PRs get rejected: seven
agent-only failure modes, measurable quality gaps, implicit knowledge problem, trust-building signals
- **Fork workflow** — `${CLAUDE_SKILL_DIR}/references/fork-workflow.md` Fork setup, branch discipline, upstream sync,
pre-submission cleanup, gh CLI submission, review response protocol
- **Contribution compliance** — `${CLAUDE_SKILL_DIR}/references/contribution-compliance.md` CLAs, DCOs, project
guideline discovery, AI contribution transparency
## Preparation Pipeline
Before writing any code or opening any PR, complete these checks. Skipping preparation is the primary cause of
rejection.
### Read the Project
- Read `CONTRIBUTING.md` — it is authoritative. Follow every instruction it contains.
- Read `README.md` for project vision, scope, and setup
- Read `CODE_OF_CONDUCT.md` if present
- Check for a PR template (`.github/pull_request_template.md`) — you must use it
### Check for Duplicates
- Search open AND closed issues for the problem you are solving
- Search open AND closed PRs for similar changes
- If a related issue exists, comment on it before starting work
- If a related PR was rejected, understand why before attempting the same change
### Understand Project Norms
- Read 3-5 recent merged PRs to learn:
- Title conventions (imperative mood? conventional commits? ticket references?)
- Description depth and structure
- Commit message style
- Review turnaround expectations
- Identify the project's code style: linter configs, `.editorconfig`, formatting tools
- Check CI configuration to understand what automated checks will run
### Verify Legal Requirements
- Determine if the project requires a CLA or DCO sign-off
- If CLA: sign it before submitting (check for CLA bot on existing PRs)
- If DCO: add `Signed-off-by` trailer to every commit (`git commit -s`)
- If contributing on behalf of an employer, verify corporate CLA coverage
### Scope the Change
- For non-trivial changes, open an issue first to discuss the approach with maintainers
- Do not solve issues labeled "good first issue" — these are reserved for humans learning the project
- One logical change per PR — never bundle unrelated fixes
- Separate refactoring from behavioral changes into distinct PRs
- Keep PRs small: 100 lines is reasonable, 1000 lines is almost always too large. Reviewers can reject a change solely
for being too large.
- When splitting large work, use concrete strategies: split by layer (model/API/client), split by feature (vertical
slices), or stack dependent changes as a series of PRs
- If work requires multiple PRs, state the plan in the first one
- Include related test code in the same PR as the code change — do not submit tests separately unless they are
independent validations of pre-existing code
## PR Titles
The title is the first thing a reviewer reads — it determines whether they engage now, later, or never.
**Rules:**
- Use imperative mood: "Fix", "Add", "Remove" — not "Fixed", "Adding", "Removed"
- Describe **what** the change does, not what area it touches
- Be specific enough to distinguish from other PRs in the same project
- Keep under ~70 characters when possible
- Match the project's title convention (check recent merged PRs)
- Include ticket/issue references if the project convention expects them in titles
**Calibration examples:**
<examples>
- Bad: "Fix bug"
- Good: "Fix login button unresponsive on Safari"
<!-- -->
- Bad: "Update CSS"
- Good: "Refine grid layout for mobile responsiveness"
<!-- -->
- Bad: "Changes for tax calculation"
- Good: "Add Swiss tax calculation for new regulation"
<!-- -->
- Bad: "Phase 1" / "Add patch" / "Various improvements"
- Good: "Add rate limiting to authentication endpoint"
</examples>
If the project uses conventional commits for PR titles:
```
fix(auth): resolve session expiry race condition
feat(api): add rate limiting to public endpoints
docs(readme): update installation instructions for v3
```
## PR Descriptions
The description is a permanent record. It must communicate **what** changed and **why** — not just repeat the diff.
### Required Elements
- **Summary** — one sentence stating what the PR does (imperative mood)
- **Problem** — what was wrong, missing, or needed; link to the issue
- **Approach** — why this solution; mention alternatives if the choice is non-obvious
- **Testing** — how changes were verified
### Conditional Elements
- **Trade-offs** — known limitations or deferred work (include when applicable)
- **Visual evidence** — before/after screenshots for UI changes (always include for visual changes)
- **Migration notes** — if the change requires action from others
- **Scope boundaries** — what was explicitly not addressed
### Anti-Patterns
- Do not narrate the diff — "Changed X to Y on line 42" adds nothing
- Do not leave descriptions empty — ever
- Do not use filler language: "This comprehensive PR improves...", "I've made the following enhancements..."
- Do not over-explain trivial changes — a typo fix needs one line
- If a PR template exists, fill every section. Do not delete sections; write "N/A" if genuinely not applicable.
For detailed description structure, templates, and scaling guidance, read
`${CLAUDE_SKILL_DIR}/references/pr-descriptions.md`.
## Fork Workflow
When contributing to a repository you do not have write access to:
- Fork the repository, clone your fork, add `upstream` remote pointing to the original
- Never commit to your fork's default branch — create a feature branch for each contribution
- Sync with upstream before starting work and before submitting
- Rebase onto latest upstream before opening the PR to minimize merge conflicts
- Enable "Allow maintainer edits" so maintainers can push small fixes to your branch
For complete fork mechanics and gh CLI commands, read `${CLAUDE_SKILL_DIR}/references/fork-workflow.md`.
## User Approval Gate
**Do not create the pull request until the user explicitly approves it.** After completing the pre-submission checklist,
present the full draft to the user — title, description, target repository, base branch, and any labels. Wait for
explicit approval before executing `gh pr create` or any equivalent action. The user may request changes; iterate until
approved.
## GitHub / gh CLI
When the target project is on GitHub, use `gh` for PR creation:
```bash
# Check for existing PRs and issues first
gh search prs --repo OWNER/REPO "keywords" --state all
gh search issues --repo OWNER/REPO "keywords" --state all
# Create PR from fork
gh pr create \
--title "Fix login timeout on slow connections" \
--body "$(cat pr-description.md)" \
--base main
# Create draft PR for early feedback
gh pr create --draft --title "[WIP] Add rate limiting" --body "..."
# Check CI status after submission
gh pr checks
```
For non-trivial changes, open a draft PR early — before the work is complete. This gets feedback on approach before
heavy investment, and signals to maintainers that you're working on the problem.
## Agent-Specific Discipline
AI agents producing PRs must apply extra rigor to avoid the failure patterns that cause maintainer distrust.
- **Prove the change was requested** — link to an issue, discussion, or maintainer request. PRs that appear from nowhere
with no connected issue trigger suspicion.
- **Demonstrate Related in Productivity
gitea-workflow
IncludedOrchestrate agile development workflows for Gitea repositories using the tea CLI. Use when working with Gitea-hosted repos and asking to 'run the workflow', 'continue working', 'what's next', 'complete the task cycle', 'start my day', 'end the sprint', 'implement the next task', or wanting guided step-by-step development assistance. Keywords: workflow, orchestrate, agile, task cycle, sprint, daily, implement, review, PR, standup, retrospective, gitea, tea.
microsoft-graph-gateway
IncludedRoute Microsoft Graph work in this workspace. Use when users want to read or write Outlook mail, calendar events, contacts, OneDrive or SharePoint files, Teams, Planner, To Do, users, groups, directory data, or arbitrary Microsoft Graph endpoints from VS Code. Prefer WorkIQ for common read scenarios. Use Microsoft Graph for write actions and gap-read scenarios that need exact Graph properties, filters, permissions, or endpoints.
copilotkit
IncludedUse when building with CopilotKit — setup, development, integrations, debugging, upgrading, or contributing. Routes to the appropriate specialized skill based on the task.
wordly-wisdom
IncludedProvides calibrated decision analysis using Charlie Munger-style multiple mental models, inversion, incentive mapping, circle-of-competence checks, misjudgment audits, second-order effects, and forecast updates. Use when the user asks for an oracle take, a hard call, a decision memo, a premortem, an outside view, a red-team, a sanity-check, what am I missing, think this through, or wants a strategy, hire, investment, plan, product, partnership, or major life choice analysed. Avoid for simple factual lookups or time-sensitive legal, medical, or market questions without fresh evidence.
swain-session
IncludedSession management and project status dashboard. Owns the full session lifecycle (start/work/close/resume), focus lane, bookmarks, worktree detection, and tab naming. Also serves as the project status dashboard — shows active epics, progress, actionable next steps, blocked items, tasks, GitHub issues, and recommendations. Worktree creation is deferred to swain-do task dispatch (SPEC-195). Triggers on: 'session', 'status', 'what's next', 'dashboard', 'overview', 'where are we', 'what should I work on', 'show me priorities', 'bookmark', 'focus on', 'session info'.
gandi
IncludedComprehensive Gandi domain registrar integration for domain and DNS management. Register and manage domains, create/update/delete DNS records (A, AAAA, CNAME, MX, TXT, SRV, and more), configure email forwarding and aliases, check SSL certificate status, create DNS snapshots for safe rollback, bulk update zone files, and monitor domain expiration. Supports multi-domain management, zone file import/export, and automated DNS backups. Includes both read-only and destructive operations with safety controls.