[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-1984":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":8,"htmlUrl":8,"language":9,"languages":8,"totalLinesOfCode":8,"stars":10,"forks":11,"watchers":12,"openIssues":13,"contributorsCount":14,"subscribersCount":14,"size":14,"stars1d":14,"stars7d":14,"stars30d":15,"stars90d":14,"forks30d":14,"starsTrendScore":14,"compositeScore":16,"rankGlobal":8,"rankLanguage":8,"license":17,"archived":18,"fork":18,"defaultBranch":19,"hasWiki":20,"hasPages":18,"topics":21,"createdAt":8,"pushedAt":8,"updatedAt":22,"readmeContent":23,"aiSummary":24,"trendingCount":14,"starSnapshotCount":14,"syncStatus":13,"lastSyncTime":25,"discoverSource":26},1984,"auto-github-contributor","nexu-io\u002Fauto-github-contributor","nexu-io",null,"Shell",138,27,139,2,0,1,4.34,"MIT License",false,"main",true,[],"2026-06-12 02:00:35","[English](.\u002FREADME.md) · [简体中文](.\u002FREADME.zh-CN.md)\n\n# auto-github-contributor\n\n![auto-github-contributor](.\u002Fassets\u002Fcover_en.png)\n\nA Claude Code skill + slash command that takes any GitHub repo and drives a full OSS contribution pipeline end-to-end: discover a quick-win candidate (labeled issues + repo scan), run a TDD dev-loop until lint\u002Ftypecheck\u002Ftests all pass, then open a PR via `gh` and print the URL.\n\nOne slash command, full pipeline, any repo.\n\n---\n\n## Overview\n\nWhen you invoke `\u002Fauto-contribute` inside Claude Code, the skill runs an 11-step interactive playbook:\n\n1. **Prereqs** — verify `gh`, `git`, `jq` are installed and `gh auth status` is green.\n2. **Target repo** — accept `owner\u002Fname` or a GitHub URL (or ask interactively).\n3. **Discover candidates in parallel**:\n   - Labeled issues (`good first issue`, `help wanted`, `documentation`, …)\n   - Repo-scan quick wins: typos, missing tests, i18n gaps, actionable TODOs\n4. **Ranked picklist** with estimated time + LLM cost per item.\n5. **Wait for explicit user confirmation** before touching anything.\n6. **Isolate** a workdir + feature branch under `$AGC_WORK_ROOT`.\n7. **Write SPEC.md + TODO.md** from templates.\n8. **TDD dev-loop** per todo (red → green → refactor), capped at 20 iterations.\n9. **Final verification**: clean install + lint + typecheck + tests + build.\n10. **Commit, push, open PR** via `gh pr create`. Prefers `TARGET_FORK` over upstream.\n11. **Print the PR URL** on its own line.\n\nSafety rails: never force-push, never commit to `main`\u002F`master`\u002F`develop`, never `rm -rf` outside `$AGC_WORK_ROOT`, never post to external systems unasked.\n\n## Requirements\n\n- `gh` (GitHub CLI) — authenticated (`gh auth login`, `repo` scope)\n- `git`\n- `jq`\n- Claude Code\n\nOptional but nice to have:\n\n- `rg` (ripgrep) — the scanner falls back to `grep` when absent\n- `pnpm` \u002F `yarn` \u002F `npm` \u002F `bun` — autodetected from the target repo's lockfile\n- `python3` — used by `create-pr.sh` to render the PR body template\n\n## Installation\n\nThis repo ships the slash command (`commands\u002Fauto-contribute.md`) and the skill (`skills\u002Fauto-github-contributor\u002F`) as plain files — no plugin manifest, no marketplace registration. Drop them into Claude Code's user or project directory and they're live.\n\n**A. User-level (recommended — available in every project)**\n\n```bash\ngit clone https:\u002F\u002Fgithub.com\u002Fnexu-io\u002Fauto-github-contributor.git \u002Ftmp\u002Fauto-github-contributor\nmkdir -p ~\u002F.claude\u002Fcommands ~\u002F.claude\u002Fskills\ncp    \u002Ftmp\u002Fauto-github-contributor\u002Fcommands\u002Fauto-contribute.md  ~\u002F.claude\u002Fcommands\u002F\ncp -R \u002Ftmp\u002Fauto-github-contributor\u002Fskills\u002Fauto-github-contributor ~\u002F.claude\u002Fskills\u002F\n```\n\nRestart Claude Code. `\u002Fauto-contribute` appears as a slash command, and Claude can also invoke the `auto-github-contributor` skill by name.\n\n**B. Project-level (scoped to one repo)**\n\nFrom the target repo's root:\n\n```bash\ngit clone https:\u002F\u002Fgithub.com\u002Fnexu-io\u002Fauto-github-contributor.git \u002Ftmp\u002Fauto-github-contributor\nmkdir -p .claude\u002Fcommands .claude\u002Fskills\ncp    \u002Ftmp\u002Fauto-github-contributor\u002Fcommands\u002Fauto-contribute.md  .claude\u002Fcommands\u002F\ncp -R \u002Ftmp\u002Fauto-github-contributor\u002Fskills\u002Fauto-github-contributor .claude\u002Fskills\u002F\n```\n\nThe command and skill are then available only inside that project.\n\n**C. Skill-only (no slash command)**\n\nIf you don't want the `\u002Fauto-contribute` command — just the skill — drop `skills\u002Fauto-github-contributor\u002F` into `~\u002F.claude\u002Fskills\u002F` (or `.claude\u002Fskills\u002F`) alone. Invoke it by asking Claude to \"auto-contribute to `\u003Crepo>`\" or similar; the description in `SKILL.md` handles trigger words.\n\n## Usage\n\n```text\n\u002Fauto-contribute                               # skill will ask for the repo\n\u002Fauto-contribute cli\u002Fcli                       # owner\u002Fname form\n\u002Fauto-contribute https:\u002F\u002Fgithub.com\u002Fcli\u002Fcli    # URL form\n```\n\nOverride defaults via env vars before launching Claude Code (or export them in your shell profile):\n\n| Variable | Default | Purpose |\n|---|---|---|\n| `TARGET_REPO` | _(prompted)_ | `owner\u002Fname` of the upstream |\n| `TARGET_FORK` | _(empty → push to origin)_ | Where to push the feature branch |\n| `AGC_BASE_BRANCH` | `main` | Base branch for the PR |\n| `AGC_WORK_ROOT` | `$HOME\u002Fauto-gh-contrib-work` | Where workdirs get cloned |\n| `AGC_LABELS` | `good first issue,help wanted,documentation,good-first-issue` | Issue labels to search |\n| `AGC_ISSUE_LIMIT` | `30` | Max issues per label |\n| `AGC_INSTALL_CMD` \u002F `AGC_LINT_CMD` \u002F `AGC_TYPECHECK_CMD` \u002F `AGC_TEST_CMD` \u002F `AGC_BUILD_CMD` | pnpm-flavored | Fallback dev-loop commands (overridden by lockfile detection) |\n| `AGC_DEV_URL` | `http:\u002F\u002Flocalhost:5173` | URL for browser-verify stub |\n\n## How to test\n\nThe skill has three testable layers. Start with Layer 1 — it's cheap, deterministic, and covers most of the real surface area.\n\n### Layer 1 — Script smoke tests (read-only, safe)\n\nAll scripts live in `skills\u002Fauto-github-contributor\u002Fscripts\u002F` and emit `KEY=VAL` lines or JSON. You can drive each one directly.\n\n```bash\nSKILL_DIR=skills\u002Fauto-github-contributor\u002Fscripts\n\n# 1. Prerequisites\nbash \"$SKILL_DIR\u002Fcheck-prereqs.sh\"\n# expect: ✓ gh \u002F ✓ git \u002F ✓ jq \u002F ✓ gh authed as \u003Cyou>; exit 0\n\n# 2. Issue discovery against a real repo\nTARGET_REPO=cli\u002Fcli AGC_ISSUE_LIMIT=3 bash \"$SKILL_DIR\u002Ffetch-issues.sh\" \\\n  | jq '.[] | {number, title, score, labels}'\n# expect: ranked array of open issues matching the configured labels\n\n# 3. Quick-win scanner against any clone\nSCRATCH=\u002Ftmp\u002Fagc-smoke && rm -rf \"$SCRATCH\" \\\n  && git clone --depth 1 https:\u002F\u002Fgithub.com\u002Fexpressjs\u002Fexpress.git \"$SCRATCH\"\nbash \"$SKILL_DIR\u002Fscan-quick-wins.sh\" --workdir \"$SCRATCH\" --max 20 \\\n  | jq 'group_by(.kind) | map({kind: .[0].kind, count: length})'\n# expect: an array with some of {typo, missing-test, i18n, todo}\n\n# 4. Parse-check the scripts that mutate state\nbash -n \"$SKILL_DIR\u002Fsetup-workspace.sh\"\nbash -n \"$SKILL_DIR\u002Fdev-loop-check.sh\"\nbash -n \"$SKILL_DIR\u002Fcreate-pr.sh\"\nbash -n \"$SKILL_DIR\u002Fbrowser-verify.sh\"\n```\n\n### Layer 2 — Slash command + skill loading\n\nIn a Claude Code session at the repo root, type `\u002Fauto-contribute` and verify:\n\n- the slash command autocompletes (proves `commands\u002Fauto-contribute.md` is registered),\n- Claude immediately invokes the `auto-github-contributor` skill,\n- it runs `check-prereqs.sh` first,\n- it asks for the target repo via `AskUserQuestion`,\n- it fetches issues and scans quick-wins in parallel,\n- it renders a picklist with time\u002Fcost estimates and **stops for confirmation**.\n\nYou can cancel at the picklist — no workdir is created beyond a `_scratch` shallow clone.\n\n### Layer 3 — End-to-end on a sandbox repo\n\nCreate a throwaway repo you own (e.g. `your-handle\u002Fagc-sandbox`) with a known quick-win seeded — for instance, write `# Teh setup guide` (note `Teh`) in `README.md`. Then:\n\n```text\n\u002Fauto-contribute your-handle\u002Fagc-sandbox\n```\n\nPick the typo from the list, approve, and let the skill drive through to a real PR. Close the PR once you've verified the flow.\n\nTip: set `TARGET_FORK=your-handle\u002Fagc-sandbox` so it pushes to the same repo (branch) instead of prompting about origin.\n\n## How it works\n\n```\ncommands\u002Fauto-contribute.md         # \u002Fauto-contribute slash command (thin wrapper)\nskills\u002Fauto-github-contributor\u002F\n  SKILL.md                          # orchestration playbook Claude reads\n  scripts\u002F\n    config.sh                       # shared env + helpers\n    check-prereqs.sh                # gh\u002Fgit\u002Fjq + auth check\n    fetch-issues.sh                 # label-based issue discovery + ranking\n    scan-quick-wins.sh              # typo \u002F missing-test \u002F i18n \u002F TODO scanner\n    setup-workspace.sh              # clone + feature branch\n    dev-loop-check.sh               # red\u002Fgreen\u002Ffinal phases, lockfile-aware\n    browser-verify.sh               # visual-verification stub\n    create-pr.sh                    # commit, push, open PR, render body\n  templates\u002F\n    SPEC.template.md                # problem \u002F acceptance \u002F approach \u002F risk\n    TODO.template.md                # atomic todos mirrored to TaskCreate\n    PR-BODY.template.md             # rendered into .auto-pr\u002FPR-BODY.md\n```\n\nThe skill file (`SKILL.md`) is the contract Claude follows. The scripts do the real work; Claude only orchestrates, reads their output, and makes decisions at the branching points.\n\n## How to contribute\n\nContributions welcome. The most valuable additions right now:\n\n1. **New quick-win kinds** — extend `scan-quick-wins.sh`. Good targets:\n   - broken markdown links\n   - unused exports (ts-prune-style)\n   - missing JSDoc on public APIs\n   - outdated dependency pins in a package.json section\n2. **Browser-verify backend** — `browser-verify.sh` is a deliberate stub. Wire up a Playwright \u002F Puppeteer \u002F chrome-devtools MCP backend so UI changes get screenshotted before the PR.\n3. **Language\u002Fframework dev-loops** — `dev-loop-check.sh` currently detects JS package managers. Add Python (`uv`\u002F`poetry`\u002F`pip`), Go, Rust, etc.\n4. **Cost estimator** — the picklist cost numbers are hand-waved rules of thumb. A smarter estimator (token-weighted file size × action kind) would help users pick more confidently.\n\n### Guidelines\n\n- **Scripts emit machine-readable output.** Stdout is `KEY=VAL` lines or JSON. Human logs go to stderr via `agc::log` \u002F `agc::err`. Don't mix them.\n- **No silent stubs.** If a feature isn't wired up yet, print `stub: \u003Creason>` so the PR body can surface the caveat.\n- **Safety rails stay on.** Never force-push, never commit to `main`\u002F`master`\u002F`develop`, never `rm -rf` outside `$AGC_WORK_ROOT`. If you add a new mutation path, add the guard too.\n- **Config via env vars.** New tunables go into `config.sh` with a sensible default and an entry in the README table above.\n- **Shell style.** `set -euo pipefail` (relax only where explicitly justified, as in `scan-quick-wins.sh`). Prefer `$(...)` over backticks. Quote expansions.\n\n### Local dev loop\n\n```bash\n# parse-check all scripts\nfor f in skills\u002Fauto-github-contributor\u002Fscripts\u002F*.sh; do bash -n \"$f\" || exit 1; done\n\n# smoke the scanner against a local clone\nbash skills\u002Fauto-github-contributor\u002Fscripts\u002Fscan-quick-wins.sh --workdir \u002Fpath\u002Fto\u002Fsome\u002Frepo | jq .\n\n# run shellcheck if you have it installed\nshellcheck skills\u002Fauto-github-contributor\u002Fscripts\u002F*.sh\n```\n\n### Filing issues\n\n- Include the Claude Code version, OS, and `gh --version`.\n- Paste the stderr log from the failing script (the `[auto-gh]` lines are the useful ones).\n- If the issue is in discovery, include `TARGET_REPO` — different repos expose very different label sets.\n\n### PR checklist\n\n- [ ] `bash -n` passes for every touched script\n- [ ] Script output still follows the stdout-is-data \u002F stderr-is-log split\n- [ ] New env vars documented in `README.md` and defaulted in `config.sh`\n- [ ] Safety rails not weakened\n- [ ] If you touched `SKILL.md`, re-read it end-to-end — Claude follows it literally\n\n## License\n\nMIT — see [LICENSE](LICENSE).\n","auto-github-contributor 是一个基于 Shell 的自动化工具，旨在通过Claude Code平台简化开源项目的贡献流程。它能够自动发现适合初学者或急需解决的问题（如标记为“good first issue”、“help wanted”的问题），执行TDD开发循环直至代码通过所有检查，并最终提交PR。该工具使用GitHub CLI (`gh`)、`git` 和 `jq` 等命令行工具，确保了从发现问题到提交解决方案的全流程自动化。特别适用于希望快速参与开源项目但又缺乏明确指导的新手开发者，以及需要高效处理简单任务以提高生产力的团队。","2026-06-11 02:47:14","CREATED_QUERY"]