{"id":"24f8e5d2-8152-407a-abfe-1496aec0f488","shortId":"SgKc9V","kind":"skill","title":"contributor","tagline":"End-to-end open source contribution workflow: from scanning issues to submitting PRs. Use this skill whenever the user wants to contribute to an open source project, find issues to fix, submit a pull request, fork a repo to contribute, fix a GitHub issue, or mentions 'open source","description":"# Contributor\n\nAutomated open source contribution workflow that takes you from a GitHub repo URL to merged PRs, with built-in safeguards against common contribution failures.\n\n## Why this skill exists\n\nOpen source contributions fail for predictable reasons: fixing in the wrong layer (your PR gets closed because the maintainer preferred an upstream fix), colliding with other contributors, not following project conventions, or over-engineering a simple fix. This workflow prevents each of those failures through systematic pre-checks.\n\n## Phase 1: Reconnaissance\n\nBefore writing any code, gather intelligence about the project and its contribution landscape.\n\n### 1.1 Identify the target\n\nAsk the user for:\n- The GitHub repo URL (e.g., `pydantic/pydantic-ai`)\n- Their GitHub username and email for commits\n- Any specific issue they want to work on (or ask to scan for available ones)\n\n### 1.2 Scan for available issues\n\nUse `gh` CLI to find issues worth contributing to:\n\n```bash\n# Get open issues with metadata\ngh issue list -R <owner>/<repo> --state open --limit 50 \\\n  --json number,title,labels,assignees,comments\n\n# Check for competing PRs on each candidate\ngh pr list -R <owner>/<repo> --state open \\\n  --search \"<issue_number> in:title,body\"\n```\n\n**Filter criteria** (apply in order):\n1. No assignee\n2. No open PR already fixing it (check both linked PRs and title/body search)\n3. Fewer than 5 competing PRs\n4. Prefer labels: `bug`, `good first issue`, `help wanted`\n5. Prefer issues with maintainer comments suggesting a fix direction\n\n### 1.3 Deep-read issue comments\n\nFor each candidate issue, read the full comment thread:\n\n```bash\ngh issue view <number> -R <owner>/<repo> --json body,comments\n```\n\nExtract:\n- **Maintainer fix direction**: Do they prefer fixing here or in an upstream dependency?\n- **Suggested approach**: Any code pointers, file references, or architectural guidance?\n- **Blockers**: Is this waiting on another PR or release?\n- **Who's working on it**: Even without assignment, someone might have commented \"I'll take this\"\n\n### 1.4 Check for upstream redirection\n\nThis is the single most common failure mode. Before committing to any fix:\n\n```bash\n# Check if maintainers reference another repo\ngh issue view <number> -R <owner>/<repo> --json comments \\\n  | grep -i \"upstream\\|genai-prices\\|separate repo\\|other repo\"\n\n# Check related repos for recent PRs mentioning this issue\ngh pr list -R <owner>/<related-repo> --state open --limit 10 \\\n  --json title,body | grep -i \"<issue_number>\\|<issue_keywords>\"\n```\n\nIf there's any signal the fix belongs elsewhere, stop and ask the user before proceeding.\n\n## Phase 2: Pre-communication\n\nNever submit a PR cold. Always communicate your intent first.\n\n### 2.1 Post a solution outline on the issue\n\nBefore writing code, leave a comment on the issue with your proposed approach. This serves two purposes: it claims the work (politely), and it gives maintainers a chance to redirect you before you waste effort.\n\n**Template:**\n```\nHi, I've been looking into this and traced the root cause to <X>.\n\nBefore I open a PR, I wanted to confirm the preferred approach:\nA) <approach A — e.g., fix in this repo by modifying X>\nB) <approach B — e.g., upstream fix in related-repo>\n\nI can implement either direction. Happy to adjust based on your preference.\n```\n\nWait for maintainer response before proceeding to code. If no response after 24-48 hours on an active project, proceed with the most conservative approach (smallest scope fix in the current repo).\n\n### 2.2 Draft PR strategy\n\nPlan to open as a Draft PR first. Convert to ready-for-review only after:\n- CI passes\n- Maintainer acknowledges the approach (via issue comment or PR review)\n\n## Phase 3: Repository Setup\n\n### 3.1 Fork and clone\n\n```bash\ngh repo fork <owner>/<repo> --clone --remote\ncd <repo>\n```\n\n### 3.2 Determine the development branch\n\nDon't assume `main`. Check what recent merged PRs target:\n\n```bash\ngh pr list -R <owner>/<repo> --state merged --limit 10 \\\n  --json baseRefName,mergedAt\n```\n\nUse the most common `baseRefName` from recent merges.\n\n### 3.3 Read contribution guidelines\n\nCheck these files in order (read whichever exist):\n\n```\nCONTRIBUTING.md\n.github/CONTRIBUTING.md\n.github/PULL_REQUEST_TEMPLATE.md\n.github/PULL_REQUEST_TEMPLATE/\n```\n\nExtract:\n- Required commit message format\n- Test requirements\n- Pre-commit hooks or linting requirements\n- DCO/CLA requirements\n- Branch naming conventions\n\n### 3.4 Understand CI\n\n```bash\nls .github/workflows/\n```\n\nRead the CI config to know what checks will run on your PR. Identify the commands for:\n- Linting / formatting\n- Type checking\n- Unit tests\n- Integration tests\n- Pre-commit hooks\n\n### 3.5 Set up the environment\n\nFollow the project's documented setup process. Run the full test suite once to establish a passing baseline before making any changes.\n\n## Phase 4: Code Fix\n\n### 4.1 Branch per issue\n\n```bash\ngit checkout -b fix/issue-<number>-<short-desc> <base-branch>\n```\n\n### 4.2 Implementation principles\n\n- **Adopt the maintainer's suggested approach** if one exists in the issue comments\n- **Minimal fix**: change only what's necessary to fix the issue. Don't refactor surrounding code, add features, or \"improve\" things along the way\n- **Match project style**: follow the existing code patterns, naming conventions, and architecture\n- **No hardcoding**: avoid hardcoded values unless the project already uses them in the same context\n- **Add tests**: every fix needs a corresponding test that would have caught the bug. Follow the project's existing test patterns\n\n### 4.3 Test your changes\n\nRun the project's test suite. All existing tests must pass. Your new test must also pass. If the project has type checking or linting, run those too.\n\nLanguage-specific verification:\n- **Python**: `pytest`, `mypy`, `ruff` (or whatever the project uses)\n- **TypeScript**: `npx tsc --noEmit`, project test command\n- **Rust**: `cargo check && cargo test`\n- **Go**: `go build ./... && go test ./...`\n\n## Phase 5: Commit and Submit\n\n### 5.1 Pre-commit checks\n\nIf the project uses pre-commit hooks:\n```bash\npre-commit run --all-files\n```\n\nFix any issues before committing.\n\n### 5.2 Commit conventions\n\n```bash\n# Configure author\ngit config user.name \"<user's name>\"\ngit config user.email \"<user's email>\"\n\n# Commit with DCO sign-off\ngit commit -s -m \"<type>: <description>\n\nFixes #<issue-number>\"\n```\n\nRules:\n- Follow the project's commit message format (check recent commits for examples)\n- Include `Fixes #<number>` or `Closes #<number>` to auto-link\n- No `Generated by Claude`, `Co-Authored-By: claude`, or any AI attribution\n- Use rebase to keep history clean, never force push\n\n### 5.3 Push and create PR\n\n```bash\ngit push -u origin fix/issue-<number>-<short-desc>\n```\n\nCreate a Draft PR following the project's template:\n\n```bash\ngh pr create --draft --title \"<type>: <short description>\" \\\n  --body \"$(cat <<'EOF'\n## Summary\n<1-2 sentences describing the fix>\n\nFixes #<issue-number>\n\n## Changes\n- <bullet points of what changed>\n\n## Test plan\n- <how this was tested>\nEOF\n)\"\n```\n\n### 5.4 Handle CI results\n\n- **CI passes**: Comment on PR that it's ready for review, convert from draft\n- **CI fails due to your code**: Fix it, push new commit, don't amend\n- **CI fails due to infrastructure** (network timeouts, flaky tests, service outages): Comment explaining the failure is unrelated to your changes and request a rerun\n\n## Phase 6: After Submission\n\n### 6.1 If PR is closed without merge\n\nDon't panic. Common reasons and responses:\n\n| Reason | Response |\n|--------|----------|\n| Fix moved upstream | Ask to contribute to the upstream repo instead |\n| Approach rejected | Ask what approach they'd prefer, offer to redo |\n| Duplicate | Acknowledge, offer to help review the other PR |\n| Scope too large | Offer to split into smaller PRs |\n\n**Template for closed PRs:**\n```\nThanks for the feedback. I understand the fix direction has shifted to <X>.\nWould it be helpful if I submitted a PR to <upstream-repo> instead?\nHappy to contribute wherever it's most useful.\n```\n\n### 6.2 If changes are requested\n\nAddress review feedback promptly. Make each revision a new commit (don't squash during review — the maintainer may want to see the evolution). Only squash if the maintainer asks.\n\n## Anti-patterns to avoid\n\nThese are real failure modes from production contributions:\n\n1. **Fixing in the wrong layer**: You fix in repo A, but the maintainer creates a PR in repo B minutes before closing yours. Prevention: Phase 1.4 upstream check + Phase 2 pre-communication.\n\n2. **PR pile-up**: 5 people submit PRs for the same issue. Prevention: Phase 1.2 competing PR check + Phase 2 claiming the work.\n\n3. **Over-engineering**: Adding error handling, type annotations, refactoring, or \"improvements\" beyond the fix. Prevention: Phase 4.2 minimal fix principle.\n\n4. **CI infrastructure confusion**: A flaky test or network timeout in CI gets mistaken for a code problem. Prevention: Phase 5.4 explicit CI failure triage.\n\n5. **Silent submission**: Submitting a PR without any prior communication on the issue. Prevention: Phase 2 pre-communication is mandatory.\n\n6. **Wrong base branch**: PRing against `main` when the project develops on `dev`. Prevention: Phase 3.2 branch detection.","tags":["contributor","claude","arsenal","majiayu000","agent-skills","ai-agents","ai-coding-assistant","automation","claude-code","code-review","developer-tools","devops"],"capabilities":["skill","source-majiayu000","skill-contributor","topic-agent-skills","topic-ai-agents","topic-ai-coding-assistant","topic-automation","topic-claude","topic-claude-code","topic-code-review","topic-developer-tools","topic-devops","topic-productivity","topic-prompt-engineering","topic-python"],"categories":["claude-arsenal"],"synonyms":[],"warnings":[],"endpointUrl":"https://skills.sh/majiayu000/claude-arsenal/contributor","protocol":"skill","transport":"skills-sh","auth":{"type":"none","details":{"cli":"npx skills add majiayu000/claude-arsenal","source_repo":"https://github.com/majiayu000/claude-arsenal","install_from":"skills.sh"}},"qualityScore":"0.464","qualityRationale":"deterministic score 0.46 from registry signals: · indexed on github topic:agent-skills · 29 github stars · SKILL.md body (9,274 chars)","verified":false,"liveness":"unknown","lastLivenessCheck":null,"agentReviews":{"count":0,"score_avg":null,"cost_usd_avg":null,"success_rate":null,"latency_p50_ms":null,"narrative_summary":null,"summary_updated_at":null},"enrichmentModel":"deterministic:skill-github:v1","enrichmentVersion":1,"enrichedAt":"2026-05-01T07:01:13.242Z","embedding":null,"createdAt":"2026-04-18T22:24:05.570Z","updatedAt":"2026-05-01T07:01:13.242Z","lastSeenAt":"2026-05-01T07:01:13.242Z","tsv":"'-2':1057 '-48':562 '1':132,239,1056,1265 '1.1':147 '1.2':183,1314 '1.3':281 '1.4':353,1291 '10':410,651 '2':242,433,1295,1299,1319,1384 '2.1':447 '2.2':581 '24':561 '3':256,614,1323 '3.1':617 '3.2':628,1405 '3.3':663 '3.4':698 '3.5':733 '4':262,761,1344 '4.1':764 '4.2':773,1340 '4.3':861 '5':259,271,924,1304,1369 '5.1':928 '5.2':954 '5.3':1026 '5.4':1067,1364 '50':210 '6':1124,1390 '6.1':1127 '6.2':1218 'acknowledg':604,1166 'activ':566 'ad':1327 'add':805,840 'address':1223 'adjust':544 'adopt':776 'ai':1015 'all-fil':946 'along':810 'alreadi':246,833 'also':880 'alway':442 'amend':1098 'annot':1331 'anoth':333,376 'anti':1253 'anti-pattern':1252 'appli':236 'approach':319,467,515,517,528,573,606,781,1154,1158 'architectur':326,824 'ask':151,177,427,1146,1156,1251 'assign':344 'assigne':215,241 'assum':635 'attribut':1016 'author':959,1010 'auto':1002 'auto-link':1001 'autom':52 'avail':181,186 'avoid':827,1256 'b':527,529,771,1284 'base':545,1392 'baselin':755 'baserefnam':653,659 'bash':197,296,371,621,643,701,768,941,957,1031,1046 'belong':423 'beyond':1335 'blocker':328 'bodi':233,302,413,1052 'branch':632,695,765,1393,1406 'bug':265,853 'build':920 'built':70 'built-in':69 'candid':223,289 'cargo':914,916 'cat':1053 'caught':851 'caus':502 'cd':627 'chanc':482 'chang':759,791,864,1063,1118,1220 'check':130,217,249,354,372,394,637,667,711,724,887,915,932,991,1293,1317 'checkout':770 'ci':601,700,706,1069,1071,1085,1099,1345,1355,1366 'claim':473,1320 'claud':1007,1012 'clean':1022 'cli':190 'clone':620,625 'close':96,999,1131,1185,1287 'co':1009 'co-authored-bi':1008 'code':137,321,457,556,762,804,819,1090,1360 'cold':441 'collid':104 'command':719,912 'comment':216,276,286,294,303,348,383,460,609,788,1073,1110 'commit':167,367,681,688,731,925,931,939,944,953,955,972,979,988,993,1095,1232 'common':74,363,658,1137 'communic':436,443,1298,1378,1387 'compet':219,260,1315 'config':707,961,967 'configur':958 'confirm':512 'confus':1347 'conserv':572 'context':839 'contribut':8,24,42,55,75,83,145,195,665,1148,1212,1264 'contributing.md':675 'contributor':1,51,107 'convent':111,697,822,956 'convert':593,1082 'correspond':846 'creat':1029,1037,1049,1279 'criteria':235 'current':579 'd':1160 'dco':974 'dco/cla':693 'deep':283 'deep-read':282 'depend':317 'describ':1059 'detect':1407 'determin':629 'dev':1402 'develop':631,1400 'direct':280,307,541,1195 'document':742 'draft':582,590,1039,1050,1084 'due':1087,1101 'duplic':1165 'e.g':159,519,530 'effort':489 'either':540 'elsewher':424 'email':165,971 'end':3,5 'end-to-end':2 'engin':115,1326 'environ':737 'eof':1054,1066 'error':1328 'establish':752 'even':342 'everi':842 'evolut':1245 'exampl':995 'exist':80,674,784,818,858,872 'explain':1111 'explicit':1365 'extract':304,679 'fail':84,1086,1100 'failur':76,125,364,1113,1260,1367 'featur':806 'feedback':1190,1225 'fewer':257 'file':323,669,948 'filter':234 'find':30,192 'first':267,446,592 'fix':33,43,88,103,118,247,279,306,311,370,422,520,532,576,763,790,797,843,949,982,997,1061,1062,1091,1143,1194,1266,1272,1337,1342 'fix/issue-':772,1036 'flaki':1106,1349 'follow':109,738,816,854,984,1041 'forc':1024 'fork':38,618,624 'format':683,722,990 'full':293,747 'gather':138 'genai':388 'genai-pric':387 'generat':1005 'get':95,198,1356 'gh':189,203,224,297,378,403,622,644,1047 'git':769,960,966,978,1032 'github':45,62,156,162 'github/contributing.md':676 'github/pull_request_template':678 'github/pull_request_template.md':677 'github/workflows':703 'give':479 'go':918,919,921 'good':266 'grep':384,414 'guidanc':327 'guidelin':666 'handl':1068,1329 'happi':542,1210 'hardcod':826,828 'help':269,1169,1202 'hi':491 'histori':1021 'hook':689,732,940 'hour':563 'identifi':148,717 'implement':539,774 'improv':808,1334 'includ':996 'infrastructur':1103,1346 'instead':1153,1209 'integr':727 'intellig':139 'intent':445 'issu':12,31,46,170,187,193,200,204,268,273,285,290,298,379,402,454,463,608,767,787,799,951,1311,1381 'json':211,301,382,411,652 'keep':1020 'know':709 'label':214,264 'landscap':146 'languag':894 'language-specif':893 'larg':1176 'layer':92,1270 'leav':458 'limit':209,409,650 'link':251,1003 'lint':691,721,889 'list':205,226,405,646 'll':350 'look':495 'ls':702 'm':981 'main':636,1396 'maintain':99,275,305,374,480,551,603,778,1239,1250,1278 'make':757,1227 'mandatori':1389 'match':813 'may':1240 'mention':48,400 'merg':66,640,649,662,1133 'mergedat':654 'messag':682,989 'metadata':202 'might':346 'minim':789,1341 'minut':1285 'mistaken':1357 'mode':365,1261 'modifi':525 'move':1144 'must':874,879 'mypi':899 'name':696,821,965 'necessari':795 'need':844 'network':1104,1352 'never':437,1023 'new':877,1094,1231 'noemit':909 'npx':907 'number':212 'offer':1162,1167,1177 'one':182,783 'open':6,27,49,53,81,199,208,229,244,408,506,587 'order':238,671 'origin':1035 'outag':1109 'outlin':451 'over-engin':113,1324 'panic':1136 'pass':602,754,875,881,1072 'pattern':820,860,1254 'peopl':1305 'per':766 'phase':131,432,613,760,923,1123,1290,1294,1313,1318,1339,1363,1383,1404 'pile':1302 'pile-up':1301 'plan':585,1065 'pointer':322 'polit':476 'post':448 'pr':94,225,245,334,404,440,508,583,591,611,645,716,1030,1040,1048,1075,1129,1173,1207,1281,1300,1316,1374 'pre':129,435,687,730,930,938,943,1297,1386 'pre-check':128 'pre-commit':686,729,929,937,942 'pre-commun':434,1296,1385 'predict':86 'prefer':100,263,272,310,514,548,1161 'prevent':121,1289,1312,1338,1362,1382,1403 'price':389 'principl':775,1343 'pring':1394 'prior':1377 'problem':1361 'proceed':431,554,568 'process':744 'product':1263 'project':29,110,142,567,740,814,832,856,867,884,904,910,935,986,1043,1399 'prompt':1226 'propos':466 'prs':15,67,220,252,261,399,641,1182,1186,1307 'pull':36 'purpos':471 'push':1025,1027,1033,1093 'pydantic/pydantic-ai':160 'pytest':898 'python':897 'r':206,227,300,381,406,647 'read':284,291,664,672,704 'readi':596,1079 'ready-for-review':595 'real':1259 'reason':87,1138,1141 'rebas':1018 'recent':398,639,661,992 'reconnaiss':133 'redirect':357,484 'redo':1164 'refactor':802,1332 'refer':324,375 'reject':1155 'relat':395,535 'related-repo':534 'releas':336 'remot':626 'repo':40,63,157,377,391,393,396,523,536,580,623,1152,1274,1283 'repositori':615 'request':37,1120,1222 'requir':680,685,692,694 'rerun':1122 'respons':552,559,1140,1142 'result':1070 'review':598,612,1081,1170,1224,1237 'revis':1229 'root':501 'ruff':900 'rule':983 'run':713,745,865,890,945 'rust':913 'safeguard':72 'scan':11,179,184 'scope':575,1174 'search':230,255 'see':1243 'sentenc':1058 'separ':390 'serv':469 'servic':1108 'set':734 'setup':616,743 'shift':1197 'sign':976 'sign-off':975 'signal':420 'silent':1370 'simpl':117 'singl':361 'skill':18,79 'skill-contributor' 'smaller':1181 'smallest':574 'solut':450 'someon':345 'sourc':7,28,50,54,82 'source-majiayu000' 'specif':169,895 'split':1179 'squash':1235,1247 'state':207,228,407,648 'stop':425 'strategi':584 'style':815 'submiss':1126,1371 'submit':14,34,438,927,1205,1306,1372 'suggest':277,318,780 'suit':749,870 'summari':1055 'surround':803 'systemat':127 'take':58,351 'target':150,642 'templat':490,1045,1183 'test':684,726,728,748,841,847,859,862,869,873,878,911,917,922,1064,1107,1350 'thank':1187 'thing':809 'thread':295 'timeout':1105,1353 'titl':213,232,412,1051 'title/body':254 'topic-agent-skills' 'topic-ai-agents' 'topic-ai-coding-assistant' 'topic-automation' 'topic-claude' 'topic-claude-code' 'topic-code-review' 'topic-developer-tools' 'topic-devops' 'topic-productivity' 'topic-prompt-engineering' 'topic-python' 'trace':499 'triag':1368 'tsc':908 'two':470 'type':723,886,1330 'typescript':906 'u':1034 'understand':699,1192 'unit':725 'unless':830 'unrel':1115 'upstream':102,316,356,386,531,1145,1151,1292 'url':64,158 'use':16,188,655,834,905,936,1017,1217 'user':21,153,429,963,969 'user.email':968 'user.name':962 'usernam':163 'valu':829 've':493 'verif':896 'via':607 'view':299,380 'wait':331,549 'want':22,172,270,510,1241 'wast':488 'way':812 'whatev':902 'whenev':19 'wherev':1213 'whichev':673 'without':343,1132,1375 'work':174,339,475,1322 'workflow':9,56,120 'worth':194 'would':849,1199 'write':135,456 'wrong':91,1269,1391 'x':526","prices":[{"id":"aab56e95-ed2d-4e21-8208-096da6c17627","listingId":"24f8e5d2-8152-407a-abfe-1496aec0f488","amountUsd":"0","unit":"free","nativeCurrency":null,"nativeAmount":null,"chain":null,"payTo":null,"paymentMethod":"skill-free","isPrimary":true,"details":{"org":"majiayu000","category":"claude-arsenal","install_from":"skills.sh"},"createdAt":"2026-04-18T22:24:05.570Z"}],"sources":[{"listingId":"24f8e5d2-8152-407a-abfe-1496aec0f488","source":"github","sourceId":"majiayu000/claude-arsenal/contributor","sourceUrl":"https://github.com/majiayu000/claude-arsenal/tree/main/skills/contributor","isPrimary":false,"firstSeenAt":"2026-04-18T22:24:05.570Z","lastSeenAt":"2026-05-01T07:01:13.242Z"}],"details":{"listingId":"24f8e5d2-8152-407a-abfe-1496aec0f488","quickStartSnippet":null,"exampleRequest":null,"exampleResponse":null,"schema":null,"openapiUrl":null,"agentsTxtUrl":null,"citations":[],"useCases":[],"bestFor":[],"notFor":[],"kindDetails":{"org":"majiayu000","slug":"contributor","github":{"repo":"majiayu000/claude-arsenal","stars":29,"topics":["agent-skills","ai-agents","ai-coding-assistant","automation","claude","claude-code","code-review","developer-tools","devops","productivity","prompt-engineering","python","software-development","typescript","workflows"],"license":"mit","html_url":"https://github.com/majiayu000/claude-arsenal","pushed_at":"2026-04-29T04:12:22Z","description":"52 production-ready Claude Code skills and 7 specialized agents for software development, DevOps, product workflows, and automation.","skill_md_sha":"a7fa26b5eab47d1b60c10746d805f56c5c826ed9","skill_md_path":"skills/contributor/SKILL.md","default_branch":"main","skill_tree_url":"https://github.com/majiayu000/claude-arsenal/tree/main/skills/contributor"},"layout":"multi","source":"github","category":"claude-arsenal","frontmatter":{"name":"contributor","description":"End-to-end open source contribution workflow: from scanning issues to submitting PRs. Use this skill whenever the user wants to contribute to an open source project, find issues to fix, submit a pull request, fork a repo to contribute, fix a GitHub issue, or mentions 'open source contribution'. Also trigger when they provide a GitHub repo URL and ask about contributing, say things like 'help me submit a PR', 'find good first issues', 'I want to contribute to X', or mention fixing bugs in someone else's project."},"skills_sh_url":"https://skills.sh/majiayu000/claude-arsenal/contributor"},"updatedAt":"2026-05-01T07:01:13.242Z"}}