daymade/claude-code-skills13 files

Github Contributor

End-to-end playbook for shipping high-quality pull requests to open-source projects you don't maintain — discovery, CONTRIBUTING compliance, PR-size check, minimal-diff implementation, PR description with AI-assisted disclosure, conflict resolution, and post-submission maintainer interaction. Use whenever creating, editing, or pushing a PR to a third-party GitHub repo — "submit a PR", "open a PR", "fix this upstream", "rebase against main", "respond to the bot review", an `owner/repo` target, or 提 PR / 上游 PR / 贡献代码 / rebase 冲突 / 回应维护者.

Specification
Skill ID
daymade/claude-code-skills/github-contributor
Publisher
daymade
Repository
claude-code-skills
Installs
0
Files
13
Synced
Sep 23, 2026
How to use it

Open any RiverX project, open the Skills panel in the chat, and search for this identifier. The files are fetched from the source repository at install time.

daymade/claude-code-skills/github-contributorInstalls these files
  • SKILL.md
  • references/case_study_cc-switch_pr_1624.md
  • references/case_study_cc-switch_pr_2634.md
  • references/communication_templates.md
  • references/high_quality_pr_case_study.md
  • references/phase1_discovery.md
  • references/phase2_implementation.md
  • references/phase3_quality_gates_and_e2e.md
  • references/phase4_pr_description.md
  • references/phase5_post_submission.md
  • references/pr_checklist.md
  • references/project_evaluation.md
  • references/push_time_gotchas.md

What this skill tells the agent

GitHub Contributor

A phase-based playbook for shipping pull requests that maintainers actually want to merge. The skill is structured around the real PR lifecycle — discovery → implementation → quality gates → description → post-submission — because each phase has its own failure modes and the most common mistake is doing the right thing at the wrong phase (e.g., writing the perfect description for a PR that's 10× too large).

Phase 0 — When to use this skill

Use this skill when all of these are true:

  • You are contributing to a repo you do not maintain (the maintainer can close your PR without explanation).
  • The work touches one or more of: source code, tests, docs, build config.
  • You want the PR merged, not just submitted.

Do not use this for: your own repos, internal team PRs with shared context, hot-fix branches where a maintainer is waiting on you, or trivial single-line changes (one comment is enough).

Phase 1 — Pre-PR Discovery

The most common reason PRs get closed is a mismatch between what the contributor assumes is acceptable and what the maintainer has already written down. Solve this before writing code.

Step 1.1 — Read CONTRIBUTING.md as a hard contract

CONTRIBUTING.md is not style advice. Treat every numbered rule as a precondition for merge. Pay special attention to:

  • AI-assisted contribution clauses. Many projects added these in 2024-2026 after the AI PR wave. Typical phrasing: "AI-generated PRs without prior discussion may be closed", "you must be able to explain every line", "one issue, one PR". If this clause exists, you owe the project explicit disclosure (see Phase 4) and you must keep the PR small.
  • Issue-first rules. Some projects require a feature-request issue to exist before any feature PR is opened.
  • Per-language test commands. If CONTRIBUTING.md says pnpm test:unit && cargo test, those are the commands you run, not whatever your IDE prefers.

If CONTRIBUTING.md is missing, that itself is a red flag — see `references/project_evaluation.md`.

Step 1.2 — Sanity-check your PR size against the project's baseline

A "small PR" is relative. Before opening a PR, run:

gh pr list --repo <owner>/<repo> --state merged --limit 10 \
  --json number,title,author,additions,deletions \
  --jq '.[] | "#\(.number) +\(.additions)/-\(.deletions): \(.title)"'

This tells you the project's actual merged-PR size distribution. If your PR is 5–10× larger than the biggest recent merge, that is a red signal — split before submitting. See `references/phase1_discovery.md` for the baseline rubric and split heuristics.

Step 1.3 — Write a one-paragraph scope contract before coding

A scope contract is a single paragraph you write to yourself before opening your editor:

Goal: <one sentence>. In scope: <bullet list, 3–5 items>. Explicitly out of scope: <bullet list — be specific about what you will resist adding when it's tempting>.

Then, every time you make an edit, ask: "Is this in scope?" If you find yourself "while I'm in here…"-ing, stop and revisit the contract. Scope creep is the single biggest source of close-without-merge — see `references/phase2_implementation.md` for the scope-discipline section.

Phase 2 — Implementation

Step 2.1 — Branch off main immediately after fetching upstream

git fetch origin
git switch -c feat/short-descriptive-name origin/main

Always branch from upstream main (or the project's default branch), never from your fork's main, which may be stale.

Step 2.2 — Make the smallest diff that solves the problem

Resist any change that is not directly required by your scope contract. In particular:

  • Do not "while I'm here" refactor surrounding code.
  • Do not reformat lines you didn't touch (your formatter may differ from the project's, even if both say "Prettier").
  • Do not rename variables for clarity unless the renaming is the fix.

If a follow-up improvement is genuinely valuable, file a separate issue or open a separate PR after this one is merged.

Step 2.3 — Conventional Commits, one logical change per commit

Use Conventional Commits: <type>(<scope>): <description> where type is feat | fix | docs | refactor | test | chore | ci | perf. Each commit should be reviewable on its own.

When a review prompts a fix, use git commit --fixup=<sha> and squash with git -c sequence.editor=: rebase -i --autosquash origin/main before pushing — see `references/phase2_implementation.md` for the full fixup workflow.

Phase 3 — Quality Gates

Maintainers' trust is built by evidence, not by claims. The point of this phase is to produce evidence you can paste into the PR.

Step 3.1 — Run the project's full lint + test suite locally

Read the exact commands from CONTRIBUTING.md. Typical examples (use what your project specifies):

pnpm typecheck && pnpm format:check && pnpm test:unit
cargo fmt --check && cargo clippy --all-targets && cargo test

If any check fails, fix it before continuing. Do not push a PR with red local checks expecting CI to clarify — that wastes maintainer time.

Step 3.2 — For GUI / desktop apps: run real end-to-end with isolation

For Tauri/Electron/Cocoa apps you almost certainly cannot use pnpm dev directly without contaminating your real installation. The pattern is isolate the data directory first, then run the real binary:

  1. Find the project's test-isolation hook (often XXX_TEST_HOME, XXX_DATA_DIR, or a config flag in config.rs / paths.go).
  2. Point it at /tmp/<app-name>-e2e/ before launching.
  3. Trigger the feature through whatever real surface the user would (URL scheme, CLI arg, deeplink).
  4. Verify by reading the actual persisted state (SQLite, JSON files), not just by visual inspection.
  5. Capture screenshots of the GUI for the PR description.

The full isolation recipe, including how to trigger deeplinks via Tauri's single-instance forward without touching macOS LaunchServices, is in `references/phase3_quality_gates_and_e2e.md`.

Step 3.3 — Self-audit: did you actually do what you're about to claim?

Before writing the PR description, list every "I tested…" / "I verified…" / "I ran…" statement you intend to make. For each one, ask: "What's my evidence?" If the answer is "I think I did" or "it should work", you have not actually done it. Write only what you can defend.

This rule prevents the most damaging trust failure: a maintainer running your "tested" command and finding it doesn't work.

Step 3.4 — Push-time verification

Local tests passing is not the finish line. Before you call the PR merge-ready, run the push-time checklist:

  1. Visibility check — confirm the target repo is actually public/private as you assume: ``bash gh repo view <owner>/<repo> --json visibility,isPrivate,defaultBranchRef ``
  2. Security hooks — if pre-push fails, fix the rule or the content; do not --no-verify.
  3. Push succeeds — if it fails with 503/auth errors, check git config --global --get-regexp url for stale URL rewrites.
  4. Mergeability check — git push succeeding does not mean GitHub can merge: ``bash gh pr view <pr-number> --repo <owner>/<repo> --json mergeable,mergeStateStatus ``

Full details (URL rewrites, PII-hook false positives, --force-with-lease caveats) are in `references/push_time_gotchas.md`.

Phase 4 — PR Description Writing

A great PR description does three jobs: (1) lets the maintainer decide in 30 seconds whether to merge, (2) gives reviewers everything they need to verify without DM'ing you, (3) creates a written record that survives team turnover.

Step 4.1 — Structure

Use this skill in a project

Open any RiverX project, search the Skills panel for daymade/claude-code-skills/github-contributor, and install it in one click.

Use this skill