/collaboration-skills:github-contribution-workflowfrom collaboration-skills
Drives GitHub contributions via gh CLI: PRs, issues, file edits, repo secrets, submodule bumps. Activates when opening/merging PRs, creating issues, or setting secrets.
Ships in collaboration-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
The gh-CLI contribution loop for an agent acting on a GitHub repo: branch →
commit → PR → CI → merge, plus issues, GitHub-side file ops, repo secrets, and
contribution-flow repo settings. Encodes conventions that keep an agent's
contributions reviewable and consistent. Tool-agnostic in spirit; concrete
commands are gh + git.
Claude Code's Hooks can intercept and block a tool call before it runs — e.g. a PreToolUse hook matching Bash can deny a git push --force or a bare rm -rf. Hooks enforce a hard gate at the tool layer; the --no-verify rule and CLEAN-before-merge convention below are conventions this skill asks the agent to follow voluntarily where no hook exists to enforce them.
references/official-docs.md.pr-diff-verification..gitignore baseline) → apple-dev-skills:apple-public-repo-security.subagent-conflict-detection.claude-skill-plugin-packaging.| Intent | Command |
|---|---|
| Open a PR | gh pr create --title "<conventional title>" --body "<body + 🤖 footer>" |
| Check CI before merge | gh pr checks <n> --repo <o/r> --watch ; gh pr view <n> --json mergeStateStatus |
| Merge a PR | gh pr merge <n> --squash --delete-branch (only when mergeStateStatus is CLEAN, or HAS_HOOKS on GHES) |
| Open an issue | gh issue create --title "<title>" --body "<body>" |
| Comment on an issue | gh issue comment <n> --body "<text>" |
| Create a new file via GitHub | gh api -X PUT repos/<o/r>/contents/<path> -f message=… -f content=$(base64) … (no local clone needed) |
| Edit an existing file via GitHub | Same, plus -f sha=<current-blob-sha> (from a prior GET on the same path) — omitting it on an update fails with 422 |
| Set a repo secret | gh secret set <NAME> --repo <o/r> (interactive paste; see Conventions) |
| List secrets | gh secret list --repo <o/r> (names only; values are write-only) |
| Configure merge / branch protection | gh api -X PATCH repos/<o/r> -F allow_squash_merge=true -F delete_branch_on_merge=true ; gh api -X PUT repos/<o/r>/branches/<b>/protection … |
feat/ fix/ chore/ docs/ ci/ refactor/ test/.Co-Authored-By: trailer (Claude Code adds it by default). PR body: end with the 🤖 footer.--squash --delete-branch. Never merge unless mergeStateStatus is CLEAN (or HAS_HOOKS on a GHES instance with pre-receive hooks) and pr-diff-verification has passed — gh pr checks itself never prints CLEAN; that's a gh pr view --json mergeStateStatus value, not a gh pr checks state. Use gh pr checks <n> --watch [--fail-fast] to wait for checks — it blocks until nothing is pending: exit 0 = all pass, any other non-zero = a check failed (fail-fast returns before pending clears). Exit 8 ("still pending") is a plain, non-watch gh pr checks <n> result, not a --watch outcome. BLOCKED covers more than pending checks — it also covers a failed required check, a missing review, or an unresolved conversation — so don't poll it indefinitely assuming it will clear on its own; also watch for UNSTABLE (a non-required check failing) and BEHIND (branch needs updating against base).--squash / --delete-branch.pull_request workflow while the PR has a merge conflict, so check gh pr view <n> --json mergeable first. A stacked PR that GitHub auto-retargets after its base merges gets no opened / synchronize / reopened event either (the default trigger types); push a commit or close and reopen it to get CI.BLOCKED; resolve each thread after answering it: gh api graphql -f query='mutation{resolveReviewThread(input:{threadId:"<id>"}){thread{isResolved}}}', with thread ids from pullRequest.reviewThreads.gh secret set <NAME> without --body — a literal --body "$TOKEN" exposes the value in process args (ps) and in this harness's Bash-tool transcript, and if typed literally (not as $TOKEN) also lands in shell history. Use the interactive prompt or gh secret set NAME < file. Verify presence (not value) with gh secret list.git update-index --cacheinfo 160000,<commit-sha>,<submodule-path> — no submodule checkout needed (works in a fresh worktree). Confirm the target SHA is pushed/tag-reachable on the submodule's remote first (git ls-remote --tags <url> <tag>).--no-verify: allowed ONLY for a commit with no code and no secrets (a submodule-pin bump, a .gitmodules/config-only change) when the repo's pre-commit gate is heavy and times out. git commit --no-verify skips both the pre-commit and commit-msg hooks (a commitlint-style message check is bypassed too — double-check the message format by hand); git push --no-verify separately skips pre-push. Never use either for code or content commits — those must pass the hooks.origin/main + PR, never in place — see subagent-conflict-detection.This skill owns the contribution-flow repo config: merge-button policy
(allow_squash_merge, delete_branch_on_merge), branch protection requiring CI,
required status checks, and labels. Security settings (Secret Scanning, push
protection) are owned by apple-dev-skills:apple-public-repo-security — set them there, not here.
mergeStateStatus other than CLEAN/HAS_HOOKS, or without pr-diff-verification — assuming BLOCKED only ever means pending checks and polling it forever, or force-merging past a real red check. Use gh pr checks <n> --watch plus mergeStateStatus; merge only on CLEAN (or HAS_HOOKS on GHES) and after pr-diff-verification has confirmed the diff matches the commits' claims.gh secret set --body "$TOKEN" — exposes the value in process args and the tool transcript (and, if typed literally, shell history too). Use the interactive prompt or gh secret set NAME < file.--no-verify on a code/content commit — bypasses the gate that protects the repo. Reserve it for no-code/no-secret commits only.git update-index --cacheinfo), and land the submodule's own change via its own PR.Co-Authored-By: trailer; PR body ends with the 🤖 footer.mergeStateStatus is CLEAN (or HAS_HOOKS on GHES) before merge (via gh pr checks <n> --watch + gh pr view <n> --json mergeStateStatus) and pr-diff-verification passed; merged with --squash --delete-branch unless the repo requires another merge method.gh secret set (no --body); verified with gh secret list.git update-index --cacheinfo against a remote-reachable SHA.--no-verify used only on a no-code/no-secret commit, with the reason stated.pr-diff-verification — verify git show --stat --summary HEAD matches the commit's claims before push/PR.apple-dev-skills:apple-public-repo-security — security repo settings + secret-leak prevention.subagent-conflict-detection — worktree + PR flow for parallel sessions / submodules.claude-skill-plugin-packaging — distributing/installing skill plugins.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
github-cli, pull-requests, issues, repo-secrets, contribution-workflow
npx claudepluginhub wei18/apple-dev-skills --plugin collaboration-skills12 skills in this plugin
/agent-impl-notes-logKeep a running impl-notes file next to the phase meeting log while a subagent executes a task, recording design decisions, intentional deviations from spec, tradeoffs, and open questions as they happen rather than after the fact. Use at the start of any non-trivial subagent dispatch (multi-file change, ambiguous spec, new dependency or module, refactor), when ambiguity is hit mid-task, or before deviating from spec. Not the post-hoc meeting log (session-to-meeting-log); the two coexist./backlog-routing-by-topicRoute a stray idea that surfaces mid-task to the §Backlog of the right living doc in a spec-phase-orchestration repo (design.md, foundations.md, plan.md, methodology.md, or today's meeting log) as a single line, without derailing the current work. Use when a not-now-but-don't-forget idea comes up, when tidying a meeting log's parking-lot items, or when asked where an idea should go. Not for decisions that must be acted on now (those belong in the body of plan.md)./claude-skill-plugin-packagingPackage Claude Code skills as a plugin plus marketplace and install them into other repos — globally, pinned per project via committed settings, or as a skills-dir plugin. Use when sharing skills across repos, wiring an existing skill plugin into a project, choosing flat project skills versus a plugin, aggregating other people's skill repos by reference, or when a submodule or nested folder of skills is not being discovered. Does not cover PR/issue mechanics (github-contribution-workflow) or how to write the skill itself (skill-authoring-patterns)./leader-developer-handoff-contractShape the prompt a Leader sends when dispatching a sub-agent (Developer, Designer, Code Reviewer, drafting agent) so the result comes back verifiable and integrable. Use when about to call the Agent tool, writing or reviewing a dispatch prompt, deciding what a sub-agent must read or which skills it must invoke, or when asked "what should the sub-agent prompt include" / "which element am I missing". Does NOT own how many review rounds to run or how findings are adjudicated (subagent-review-cycles), nor the impl-notes file format (agent-impl-notes-log)./methodology-pattern-extractorExtract recurring collaboration patterns from accumulated meeting logs (optionally session JSONL) and record them in docs/methodology.md with evidence of where each was sighted. Use when the user asks to update methodology, extract recurring patterns across the meeting logs, or consolidate recurring collaboration flows; or when five or more meeting logs have accumulated while §Patterns is still empty. Not for writing the meeting logs themselves (session-to-meeting-log) or for parking one-off ideas (backlog-routing-by-topic). Takes no arguments — the fork scans all of `meetings/*.md`./pr-diff-verificationCheck that a branch's actual diff matches what its commit messages and any subagent report claim, before the commits leave the machine. Use before `git push` of a feature branch, before `gh pr create` or `gh pr merge`, after a subagent reports "committed N files", after an amend / rebase / force-push, or when a verification report's headline count looks off. Catches "commit log wrote but code didn't make it" accidents. Does NOT read the diff for correctness (that is a Code Reviewer's job) nor own gh / PR mechanics (github-contribution-workflow).Other plugins' skills for the same job