contributor-magnet 0.0.0-stage → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (65) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +211 -2
  3. package/bin/cli.mjs +70 -0
  4. package/package.json +20 -4
  5. package/skills/magnet/SKILL.md +50 -0
  6. package/skills/magnet/agents/openai.yaml +4 -0
  7. package/skills/magnet-audit/SKILL.md +45 -0
  8. package/skills/magnet-audit/agents/openai.yaml +4 -0
  9. package/skills/magnet-audit/references/scoring.md +82 -0
  10. package/skills/magnet-audit/scripts/audit.mjs +216 -0
  11. package/skills/magnet-audit/scripts/card.mjs +69 -0
  12. package/skills/magnet-audit/scripts/checks.mjs +455 -0
  13. package/skills/magnet-audit/scripts/files.mjs +103 -0
  14. package/skills/magnet-audit/scripts/github.mjs +69 -0
  15. package/skills/magnet-bots/SKILL.md +56 -0
  16. package/skills/magnet-bots/agents/openai.yaml +4 -0
  17. package/skills/magnet-bots/references/bots.md +82 -0
  18. package/skills/magnet-bots/scripts/install.mjs +107 -0
  19. package/skills/magnet-bots/templates/workflows/magnet-claim.yml +132 -0
  20. package/skills/magnet-bots/templates/workflows/magnet-duplicates.yml +62 -0
  21. package/skills/magnet-bots/templates/workflows/magnet-issue-level.yml +33 -0
  22. package/skills/magnet-bots/templates/workflows/magnet-merged-thanks.yml +63 -0
  23. package/skills/magnet-bots/templates/workflows/magnet-pr-hygiene.yml +60 -0
  24. package/skills/magnet-bots/templates/workflows/magnet-pr-labels.yml +85 -0
  25. package/skills/magnet-bots/templates/workflows/magnet-program.yml +139 -0
  26. package/skills/magnet-bots/templates/workflows/magnet-shoutout.yml +96 -0
  27. package/skills/magnet-bots/templates/workflows/magnet-stale.yml +44 -0
  28. package/skills/magnet-bots/templates/workflows/magnet-unassign-idle.yml +122 -0
  29. package/skills/magnet-bots/templates/workflows/magnet-welcome.yml +68 -0
  30. package/skills/magnet-issues/SKILL.md +44 -0
  31. package/skills/magnet-issues/agents/openai.yaml +4 -0
  32. package/skills/magnet-issues/references/issue-recipes.md +76 -0
  33. package/skills/magnet-issues/scripts/file-issues.mjs +82 -0
  34. package/skills/magnet-issues/scripts/scan.mjs +104 -0
  35. package/skills/magnet-launch/SKILL.md +31 -0
  36. package/skills/magnet-launch/agents/openai.yaml +4 -0
  37. package/skills/magnet-launch/references/launch.md +92 -0
  38. package/skills/magnet-programs/SKILL.md +37 -0
  39. package/skills/magnet-programs/agents/openai.yaml +4 -0
  40. package/skills/magnet-programs/references/playbook.md +71 -0
  41. package/skills/magnet-programs/references/programs.md +204 -0
  42. package/skills/magnet-readme/SKILL.md +28 -0
  43. package/skills/magnet-readme/agents/openai.yaml +4 -0
  44. package/skills/magnet-readme/references/readme-blocks.md +138 -0
  45. package/skills/magnet-retain/SKILL.md +33 -0
  46. package/skills/magnet-retain/agents/openai.yaml +4 -0
  47. package/skills/magnet-retain/references/retention.md +60 -0
  48. package/skills/magnet-review/SKILL.md +49 -0
  49. package/skills/magnet-review/agents/openai.yaml +4 -0
  50. package/skills/magnet-review/references/review-playbook.md +72 -0
  51. package/skills/magnet-review/scripts/merge-chain.mjs +126 -0
  52. package/skills/magnet-review/scripts/pr-queue.mjs +120 -0
  53. package/skills/magnet-setup/SKILL.md +46 -0
  54. package/skills/magnet-setup/agents/openai.yaml +4 -0
  55. package/skills/magnet-setup/scripts/labels.mjs +111 -0
  56. package/skills/magnet-setup/scripts/scaffold.mjs +118 -0
  57. package/skills/magnet-setup/templates/CONTRIBUTING.md +77 -0
  58. package/skills/magnet-setup/templates/SECURITY.md +13 -0
  59. package/skills/magnet-setup/templates/devcontainer/devcontainer.json +11 -0
  60. package/skills/magnet-setup/templates/github/ISSUE_TEMPLATE/bug_report.yml +62 -0
  61. package/skills/magnet-setup/templates/github/ISSUE_TEMPLATE/config.yml +11 -0
  62. package/skills/magnet-setup/templates/github/ISSUE_TEMPLATE/feature_request.yml +38 -0
  63. package/skills/magnet-setup/templates/github/ISSUE_TEMPLATE/task.yml +60 -0
  64. package/skills/magnet-setup/templates/github/pull_request_template.md +29 -0
  65. package/skills/magnet-setup/templates/labels.json +37 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Priyanshu Doshi
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,212 @@
1
- # Temporary Holding Version
1
+ <h1 align="center">
2
+ <picture>
3
+ <source media="(prefers-color-scheme: dark)" srcset="assets/brand/wordmark-dark.svg" />
4
+ <img src="assets/brand/wordmark-light.svg" alt="contributor-magnet" width="460" />
5
+ </picture>
6
+ </h1>
2
7
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
8
+ <p align="center"><b>Turn a quiet repo into one people contribute to.</b></p>
9
+
10
+ <p align="center">Ten agent skills that score your repo, write the docs and good first issues from your actual code, install the bots that do the maintainer chores, and find the open source programs that send contributors your way.</p>
11
+
12
+ <p align="center">
13
+
14
+ [![Tests](https://github.com/Priyanshu-byte-coder/contributor-magnet/actions/workflows/ci.yml/badge.svg)](https://github.com/Priyanshu-byte-coder/contributor-magnet/actions/workflows/ci.yml)
15
+ [![License: MIT](https://img.shields.io/badge/license-MIT-blue)](LICENSE)
16
+ [![Good first issues](https://img.shields.io/github/issues/Priyanshu-byte-coder/contributor-magnet/good%20first%20issue?label=good%20first%20issues&color=7057ff)](https://github.com/Priyanshu-byte-coder/contributor-magnet/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22+no%3Aassignee)
17
+
18
+ </p>
19
+
20
+ <p align="center">Works with Claude Code, Codex, claude.ai and any agent that reads <code>SKILL.md</code>. Zero dependencies.</p>
21
+
22
+ <p align="center">
23
+ <img src="assets/demo.svg" alt="Demo: /magnet audits acme/tinyurl-cli at 6 out of 100, asks the maintainer two questions, adds docs, labels, bots, issues and a README section, and re-audits at 100 out of 100." width="820" />
24
+ </p>
25
+
26
+ <table>
27
+ <tr>
28
+ <td><img src="assets/card-before.svg" alt="Before: Contributor-Readiness score 6 out of 100, file checks only" /></td>
29
+ <td><img src="assets/card-after.svg" alt="After: Contributor-Readiness score 100 out of 100, file checks only" /></td>
30
+ </tr>
31
+ <tr>
32
+ <td align="center">Before: a working CLI with a two-line README</td>
33
+ <td align="center">After one <code>/magnet</code> run (<a href="examples/">see both</a>)</td>
34
+ </tr>
35
+ </table>
36
+
37
+ <sub>Both cards are file checks only. Issue supply and response times need a live repo with history, so the example repos can't score them.</sub>
38
+
39
+ <p align="center">
40
+ <img src="assets/how-it-works.svg" alt="What one /magnet run does: Audit (score out of 100, biggest fixes first), Setup (docs, forms, labels from your real setup), Bots (/assign, unassign idle, welcome, thanks), Issues (good first issues written from your code), Programs (50+ programs that send contributors), Review (PR queue, merge bar, shoutouts)." width="100%" />
41
+ </p>
42
+
43
+ ## Score any repo in 10 seconds
44
+
45
+ No install and no agent. Node 18+:
46
+
47
+ ```bash
48
+ git clone --depth 1 https://github.com/Priyanshu-byte-coder/contributor-magnet
49
+ node contributor-magnet/skills/magnet-audit/scripts/audit.mjs --repo owner/name
50
+ ```
51
+
52
+ You get a score out of 100 across 7 categories, the five fixes worth the most points, and a `magnet-report/` folder with the full report, a report card image and a README badge. It uses `GITHUB_TOKEN` or your `gh` login when there is one; without a token, GitHub's anonymous rate limit allows only a few audits an hour.
53
+
54
+ Even famous projects leave points on the table:
55
+
56
+ <p align="center">
57
+ <img src="assets/famous-repos.svg" alt="Contributor-Readiness scores on 4 Dec 2026: microsoft/vscode 67 (good first issues all assigned), facebook/react 63 (setup steps live outside the repo), freeCodeCamp 60 (no open good first issue), rust-lang/rust 58 (E-easy is invisible to GitHub discovery), excalidraw 56 (no issue forms, PR template or code of conduct), fastapi 42 (no open good first issue)." width="100%" />
58
+ </p>
59
+
60
+ <sub>One run each on 4 December 2026. The audit scores what a newcomer meets on GitHub itself. Big projects often keep setup guides on their own sites and run GitHub Apps the audit can't see, so read this as "what a stranger finds", not a ranking.</sub>
61
+
62
+ ## Install
63
+
64
+ **Claude Code** (plugin, every project):
65
+
66
+ ```bash
67
+ claude plugin marketplace add Priyanshu-byte-coder/contributor-magnet
68
+ claude plugin install contributor-magnet@contributor-magnet
69
+ ```
70
+
71
+ Then start a new session (or `/reload-plugins`). The skills show up as `/contributor-magnet:magnet`, `/contributor-magnet:magnet-audit` and so on, or just ask in your own words.
72
+
73
+ **Codex:** ask it to install the skills you want, one folder each:
74
+
75
+ ```text
76
+ $skill-installer install https://github.com/Priyanshu-byte-coder/contributor-magnet/tree/main/skills/magnet
77
+ $skill-installer install https://github.com/Priyanshu-byte-coder/contributor-magnet/tree/main/skills/magnet-audit
78
+ ```
79
+
80
+ **claude.ai:** zip a folder from `skills/` (start with `magnet-audit`) and upload it in claude.ai's Skills settings. The scripts need a code environment; the playbooks work anywhere.
81
+
82
+ **Any other agent:** copy the folders in `skills/` into the agent's skills directory (for example `~/.claude/skills/` or a project's `.claude/skills/`).
83
+
84
+ Scripts that write to GitHub use the [GitHub CLI](https://cli.github.com/) (`gh auth login`) and have a dry-run mode the skills always run first.
85
+
86
+ ## Use
87
+
88
+ ```text
89
+ /magnet full run: audit, plan, set up, re-audit
90
+ score this repo for contributors → magnet-audit
91
+ write 20 good first issues → magnet-issues
92
+ which open source programs can we join? → magnet-programs
93
+ go through the open PRs → magnet-review
94
+ ```
95
+
96
+ Installed as a plugin, `/magnet` is `/contributor-magnet:magnet`. Plain sentences work either way.
97
+
98
+ ## What a run looks like
99
+
100
+ On the [`quiet-repo` example](examples/quiet-repo), with the real audit numbers:
101
+
102
+ > **You:** /magnet
103
+ >
104
+ > **Agent:** Ran the audit: **6/100 (Quiet)**, file checks only since this repo isn't on GitHub yet. Biggest wins: a CONTRIBUTING guide with setup steps (+5), issue forms (+4), copy-paste setup commands (+4), a license (+3). Before I change anything: how many PRs a week can you review? Is AI-assisted code allowed?
105
+ >
106
+ > **You:** About 10 a week. AI is fine if they can explain it.
107
+ >
108
+ > **Agent:** Plan, on a branch: CONTRIBUTING and templates filled from your actual setup (commands checked from a clean clone), a LICENSE file to match the MIT in `package.json`, the standard labels (dry run below), the claim, idle-claim, welcome and thanks bots, 12 issues across three levels written from the code (dry run below), and a contributor section in the README. Three programs taking projects right now fit 10 PRs a week. Want me to draft an application?
109
+
110
+ Nothing touches GitHub (labels, issues, comments, merges) until you've seen the dry run and said yes. The finished result is [`magnet-repo`](examples/magnet-repo).
111
+
112
+ ## The ten skills
113
+
114
+ | Skill | What it does |
115
+ |---|---|
116
+ | **`magnet`** | Runs the whole thing in order: audit, agree a plan, set up, re-audit, then grow |
117
+ | **`magnet-audit`** | Contributor-Readiness score out of 100 across 7 categories, biggest wins first, a shareable report card and a README badge. Local checkout or any public repo |
118
+ | **`magnet-setup`** | CONTRIBUTING with copy-paste setup and claim rules, issue forms, PR template, labels (fixes look-alikes like `good-first-issue` that hide you from GitHub discovery), code of conduct, security policy, devcontainer. Never overwrites |
119
+ | **`magnet-bots`** | 11 GitHub Actions workflows: `/assign` claiming with a per-person cap, idle-claim reminders and unassign, welcomes, merge thanks, PR labels, linked-issue checks, duplicate hints, a stale bot that never closes PRs waiting on you, monthly shoutouts, program points tracking |
120
+ | **`magnet-issues`** | Scans the code for leads, verifies each one, writes specific issues (what, why, where, done-when, level), de-duplicates against every existing issue, files them after a dry run |
121
+ | **`magnet-readme`** | The contributor half of the README: why build here, first PR in 15 minutes, good-first-changes table, contributors wall, star history |
122
+ | **`magnet-programs`** | 50+ programs sorted by how a *project* gets in (GSSoC, GSoC, Hacktoberfest, SWoC, Outreachy, ESoC, C4GT, OSPP, LFX, GHC Open Source Day…), plus listings, bounties and funding; a year-round calendar with no dead season, application drafts, program label automation |
123
+ | **`magnet-review`** | The PR queue sorted by who's waited longest on you, how to spot slop and point farming, a selective merge bar, real code review, human-sounding comments, a merge chain for up-to-date-branch rules |
124
+ | **`magnet-retain`** | Monthly shoutouts, a contributor ladder, seasons, and a plan for the post-program cliff |
125
+ | **`magnet-launch`** | GitHub topics and social preview, good-first-issue listings, launch posts per channel, maintainer perks and funding |
126
+
127
+ ## Why this exists
128
+
129
+ Contributors don't show up because a repo is good. They show up when it's **findable**, **easy to start**, and **answers them fast**, and they stay when they're **seen**. Most maintainers learn this one painful PR at a time: the issues nobody can start, the claims nobody finishes, the PR that waited three weeks, the program that brought 300 people and left silence behind.
130
+
131
+ contributor-magnet packages the fixes so your agent can apply them to any project:
132
+
133
+ | | CONTRIBUTING templates | Repo health checkers | contributor-magnet |
134
+ |---|:-:|:-:|:-:|
135
+ | Docs and templates | Generic | – | Filled in from your real setup |
136
+ | Finds what's missing | – | Files only | Files, labels, issue supply, response times |
137
+ | Good first issues | – | – | Written from your code, de-duplicated |
138
+ | Claiming, idle claims, welcomes, thanks | – | – | 11 workflows, one file each |
139
+ | Which programs you can join, and when | – | – | 50+ programs on a calendar with no dead season |
140
+ | A flood of PRs | – | – | Review queue, merge bar, merge chain |
141
+
142
+ ## Ten rules the skills follow
143
+
144
+ 1. **Programs are the biggest lever and the biggest cliff.** A program brings a wave; when it ends with nothing after it, the repo goes silent. Line up the next one before the current one ends. [Calendar](skills/magnet-programs/references/programs.md).
145
+ 2. **Hacktoberfest stopped rewarding PRs in 2026.** The topic still helps discovery; the PR wave is gone.
146
+ 3. **Cap claims.** Without a per-person cap, a few people grab the whole backlog during a program and open PRs for none of it.
147
+ 4. **Free idle claims automatically.** A reminder on day 5 and an unassign on day 7 keep beginner issues actually available.
148
+ 5. **Match how people actually ask.** "I'd love to work on this" is a claim; an exact-phrase bot misses most of them.
149
+ 6. **Exact label names matter.** `good-first-issue` isn't `good first issue` to GitHub's discovery.
150
+ 7. **Never gate on stars.** A star-required check pushes people away; asking once after a merge works better.
151
+ 8. **Merge what makes it better, not what passes CI.** Decide the merge bar before the flood, and close the rest kindly.
152
+ 9. **Read the tests.** Bulk test-only issues attract tests that assert nothing but mocks.
153
+ 10. **Praise people in public, by name.** A monthly shoutout costs ten minutes and is the main reward most contributors get.
154
+
155
+ ## Show your score
156
+
157
+ `magnet-audit` prints a badge for your README:
158
+
159
+ ```markdown
160
+ [![Contributor Magnet score: 87/100](https://img.shields.io/badge/contributor%20magnet-87%2F100-3fb950)](https://github.com/Priyanshu-byte-coder/contributor-magnet)
161
+ ```
162
+
163
+ A score from file checks alone says "(files only)" on the badge.
164
+
165
+ ## FAQ
166
+
167
+ **Will it post things on GitHub without asking?** No. Labels, issues, comments and merges go through a dry run first, and changes to your repo go on a branch. The bots only run after you merge them.
168
+
169
+ **Does it replace my existing CONTRIBUTING or workflows?** No. It reads what's there and merges in what's missing. Scripts refuse to overwrite files unless you pass `--force`.
170
+
171
+ **My repo is tiny. Is this overkill?** Run the audit and do the top three fixes. Most small repos get the biggest jump from a real CONTRIBUTING, 5 good first issues and a claim bot.
172
+
173
+ **Do I need to join a program?** No, but if you want a wave of contributors it's the fastest way. `magnet-programs` helps you pick one you can actually review for.
174
+
175
+ **Are the bots safe on a public repo?** They use only the default `GITHUB_TOKEN` with the narrowest permissions, never check out PR code under `pull_request_target`, and never splice issue or comment text into scripts. The tests check all three.
176
+
177
+ <details>
178
+ <summary><b>What's inside</b></summary>
179
+
180
+ ```text
181
+ skills/
182
+ magnet/ orchestrator
183
+ magnet-audit/ scripts/audit.mjs, checks.mjs, card.mjs scoring reference
184
+ magnet-setup/ scripts/scaffold.mjs, labels.mjs templates/ (forms, CONTRIBUTING, labels.json, …)
185
+ magnet-bots/ scripts/install.mjs templates/workflows/magnet-*.yml
186
+ magnet-issues/ scripts/scan.mjs, file-issues.mjs issue recipes
187
+ magnet-readme/ README blocks
188
+ magnet-programs/ programs.md, playbook.md
189
+ magnet-review/ scripts/pr-queue.mjs, merge-chain.mjs review playbook, saved replies
190
+ magnet-retain/ retention playbook
191
+ magnet-launch/ launch playbook, post templates
192
+ examples/ the same CLI before and after a /magnet run
193
+ test/ audit and workflow tests (node --test)
194
+ assets/ README images, each built by a make-*.mjs script next to it
195
+ brand/ logo: mark, icon, wordmark (light and dark), icon-512.png
196
+ ```
197
+
198
+ Every script runs on Node 18+ with no dependencies and answers `--help`. The workflows are plain `actions/github-script` with their settings in an `env:` block.
199
+
200
+ </details>
201
+
202
+ ## Contributing
203
+
204
+ This repo uses its own medicine: claim an issue with `/assign`, see [CONTRIBUTING.md](CONTRIBUTING.md). Especially welcome: new programs and corrected dates for [programs.md](skills/magnet-programs/references/programs.md), new audit checks with tests, translations of the bot messages, and stories of what worked in your repo. Questions and ideas go in [Discussions](https://github.com/Priyanshu-byte-coder/contributor-magnet/discussions).
205
+
206
+ <a href="https://github.com/Priyanshu-byte-coder/contributor-magnet/graphs/contributors">
207
+ <img src="https://contrib.rocks/image?repo=Priyanshu-byte-coder/contributor-magnet" alt="contributor-magnet contributors" />
208
+ </a>
209
+
210
+ ## License
211
+
212
+ [MIT](LICENSE) © Priyanshu Doshi
package/bin/cli.mjs ADDED
@@ -0,0 +1,70 @@
1
+ #!/usr/bin/env node
2
+ // npx contributor-magnet <command> [args]
3
+ // A thin launcher: each command runs one of the skill scripts with the same arguments.
4
+ import { spawnSync } from 'node:child_process';
5
+ import { existsSync, readFileSync } from 'node:fs';
6
+ import { fileURLToPath } from 'node:url';
7
+
8
+ const root = new URL('../skills/', import.meta.url);
9
+ const COMMANDS = {
10
+ audit: ['magnet-audit/scripts/audit.mjs', 'Score a repo out of 100 (local path or owner/name)'],
11
+ scaffold: ['magnet-setup/scripts/scaffold.mjs', 'Write CONTRIBUTING, issue forms, PR template, CoC'],
12
+ labels: ['magnet-setup/scripts/labels.mjs', 'Create or align labels (dry run until --apply)'],
13
+ bots: ['magnet-bots/scripts/install.mjs', 'Install the contributor bot workflows'],
14
+ scan: ['magnet-issues/scripts/scan.mjs', 'Find good-first-issue candidates in the code'],
15
+ 'file-issues': ['magnet-issues/scripts/file-issues.mjs', 'File issues from a JSON list'],
16
+ 'pr-queue': ['magnet-review/scripts/pr-queue.mjs', 'Open PRs sorted by what to review first'],
17
+ 'merge-chain': ['magnet-review/scripts/merge-chain.mjs', 'Update, wait for CI and merge PRs in order'],
18
+ };
19
+
20
+ const { version } = JSON.parse(readFileSync(new URL('../package.json', import.meta.url), 'utf8'));
21
+ const usage = `contributor-magnet ${version}
22
+
23
+ Usage:
24
+ npx contributor-magnet owner/name score any public GitHub repo
25
+ npx contributor-magnet <command> [args]
26
+
27
+ Commands:
28
+ ${Object.entries(COMMANDS).map(([c, [, d]]) => ` ${c.padEnd(13)}${d}`).join('\n')}
29
+
30
+ Run "npx contributor-magnet <command> --help" for a command's options.
31
+ The full skills for Claude Code, Codex and other agents: https://github.com/Priyanshu-byte-coder/contributor-magnet`;
32
+
33
+ let [cmd, ...rest] = process.argv.slice(2);
34
+ if (!cmd || cmd === '-h' || cmd === '--help') {
35
+ console.log(usage);
36
+ process.exit(cmd ? 0 : 1);
37
+ }
38
+ if (cmd === '-v' || cmd === '--version') {
39
+ console.log(version);
40
+ process.exit(0);
41
+ }
42
+
43
+ // Shortcuts: `npx contributor-magnet owner/name` and `npx contributor-magnet .` both mean audit.
44
+ if (!COMMANDS[cmd]) {
45
+ if (cmd.startsWith('-') || cmd === '.' || existsSync(cmd) || /^[\w.-]+\/[\w.-]+$/.test(cmd)) {
46
+ rest = [cmd, ...rest];
47
+ cmd = 'audit';
48
+ } else {
49
+ console.error(`Unknown command "${cmd}".\n\n${usage}`);
50
+ process.exit(2);
51
+ }
52
+ }
53
+
54
+ // audit takes owner/name as a bare argument too, unless a folder by that name exists here.
55
+ if (cmd === 'audit') {
56
+ const i = rest.findIndex((a) => !a.startsWith('-'));
57
+ const prev = rest[i - 1];
58
+ const takesValue = ['--repo', '--out', '--name', '--sample'].includes(prev);
59
+ if (i >= 0 && !takesValue && /^[\w.-]+\/[\w.-]+$/.test(rest[i]) && !existsSync(rest[i])) {
60
+ rest.splice(i, 1, '--repo', rest[i]);
61
+ }
62
+ }
63
+
64
+ const script = fileURLToPath(new URL(COMMANDS[cmd][0], root));
65
+ const { status, error } = spawnSync(process.execPath, [script, ...rest], { stdio: 'inherit' });
66
+ if (error) {
67
+ console.error(error.message);
68
+ process.exit(1);
69
+ }
70
+ process.exit(status ?? 1);
package/package.json CHANGED
@@ -1,6 +1,22 @@
1
1
  {
2
2
  "name": "contributor-magnet",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "1.0.0",
4
+ "description": "Score any GitHub repo's Contributor-Readiness out of 100, and the agent skills that fix it: docs, contributor bots, good first issues, open source programs.",
5
+ "type": "module",
6
+ "bin": { "contributor-magnet": "bin/cli.mjs" },
7
+ "files": ["bin/", "skills/", "LICENSE", "README.md"],
8
+ "engines": { "node": ">=18" },
9
+ "scripts": {
10
+ "test": "node --test \"test/*.test.mjs\"",
11
+ "audit": "node skills/magnet-audit/scripts/audit.mjs"
12
+ },
13
+ "keywords": [
14
+ "open-source", "contributors", "good-first-issue", "github", "maintainers",
15
+ "agent-skills", "claude-code", "codex", "audit", "cli"
16
+ ],
17
+ "homepage": "https://github.com/Priyanshu-byte-coder/contributor-magnet#readme",
18
+ "repository": { "type": "git", "url": "git+https://github.com/Priyanshu-byte-coder/contributor-magnet.git" },
19
+ "bugs": "https://github.com/Priyanshu-byte-coder/contributor-magnet/issues",
20
+ "author": "Priyanshu Doshi",
21
+ "license": "MIT"
22
+ }
@@ -0,0 +1,50 @@
1
+ ---
2
+ name: magnet
3
+ description: Makes an open source repository contributor-friendly from end to end. Audits the repo with a Contributor-Readiness score, then runs the right steps in order - docs and templates, contributor bots, a backlog of good first issues, a contributor-facing README, open source programs (GSSoC, Hacktoberfest, SWoC, GSoC and 50 more), PR review at scale, retention and launch. Use when someone asks how to get more contributors or stars, make a repo beginner-friendly or "contributor friendly", prepare for Hacktoberfest/GSSoC/GSoC or any open source program, or says their project has no contributors. Routes to the magnet-* skills for each step.
4
+ license: MIT
5
+ metadata:
6
+ author: Priyanshu Doshi
7
+ repo: https://github.com/Priyanshu-byte-coder/contributor-magnet
8
+ ---
9
+
10
+ # Contributor Magnet
11
+
12
+ Contributors don't arrive because a repo is good. They arrive because it is **findable**, **easy to start**, and **answers them fast**, and they stay because they are **seen**. Every step here serves one of those four.
13
+
14
+ Each skill encodes what works in practice for repos running hundreds of contributors, including the failure modes: hoarded issues, AI-slop floods, review backlogs and the silence after a program ends.
15
+
16
+ ## The skills
17
+
18
+ | Step | Skill | Does |
19
+ |---|---|---|
20
+ | 1 | `magnet-audit` | Scores the repo out of 100 and lists the biggest wins first |
21
+ | 2 | `magnet-setup` | CONTRIBUTING, issue forms, PR template, labels, code of conduct, security policy, devcontainer |
22
+ | 3 | `magnet-bots` | GitHub Actions for claiming, idle claims, welcomes, thanks, labels, duplicates, stale |
23
+ | 4 | `magnet-issues` | Turns the codebase into a backlog of specific, claimable issues |
24
+ | 5 | `magnet-readme` | The contributor half of the README: why build here, first PR in 15 minutes, wall of contributors |
25
+ | 6 | `magnet-programs` | Picks and prepares open source programs so there's never a dead season |
26
+ | 7 | `magnet-launch` | Gets the repo found: topics, listings, launch posts, perks |
27
+ | ongoing | `magnet-review` | Weekly: the PR queue, slop filtering, kind fast reviews, merge chains |
28
+ | ongoing | `magnet-retain` | Monthly: shoutouts, contributor ladder, seasons |
29
+
30
+ ## Run it
31
+
32
+ 1. **Audit first.** Run `magnet-audit` on the repo. Read the report to the user: score, the three biggest wins, and anything surprising (hoarded issues, look-alike labels, slow first responses). If the user only asked a narrow question (just labels, just a program), answer that with the matching skill and skip the rest.
33
+ 2. **Agree on the plan.** Propose the steps that move the score most, in the order above, with what each will add. Ask about the decisions that are theirs:
34
+ - Review capacity: how many PRs a week can they really review? This sets the claim cap, the number of issues to open, and which programs to join. A flood they can't review hurts more than no contributors.
35
+ - AI policy: allowed, allowed with disclosure, or not allowed.
36
+ - Programs: which season they're in and whether they want one (see `magnet-programs`).
37
+ - Anything already in place that must stay (existing bots, label schemes, templates).
38
+ Wait for answers before writing files, unless the user said to just do it.
39
+ 3. **Set up, in order.** `magnet-setup` → `magnet-bots` → `magnet-issues` → `magnet-readme`. Each one adapts to what exists: never overwrite a maintainer's CONTRIBUTING or workflows wholesale; merge what's missing into them.
40
+ 4. **Re-audit** and show the before/after score and card. The card (`card.svg`) is made for sharing; offer the badge for the README.
41
+ 5. **Grow.** `magnet-programs` for the next program window and `magnet-launch` for discovery.
42
+ 6. **Keep it running.** Suggest a weekly `magnet-review` pass and a monthly `magnet-retain` pass. If the agent supports scheduled runs, offer to schedule them.
43
+
44
+ ## Ground rules
45
+
46
+ - **Changes go through a branch and a PR** unless the user says otherwise. Workflows only run once merged to the default branch; say so.
47
+ - **Nothing public without a yes.** Creating issues, labels, comments or posts is visible to everyone. Show a dry run first (every script has one) and wait for approval.
48
+ - **Match the project's voice.** Bot messages, issues and docs should sound like the maintainer: short, warm, specific. No emoji walls, no "🚀 Exciting!" filler.
49
+ - **Capacity beats volume.** If the maintainer can review 5 PRs a week, set up for 5, not 50.
50
+ - **No dark patterns.** Never gate PRs on starring the repo, never fake activity, never promise mentorship or review times the maintainer can't keep.
@@ -0,0 +1,4 @@
1
+ interface:
2
+ display_name: "Contributor Magnet"
3
+ short_description: "Make this repo contributor-friendly from end to end"
4
+ default_prompt: "Use $magnet to make this repo contributor-friendly."
@@ -0,0 +1,45 @@
1
+ ---
2
+ name: magnet-audit
3
+ description: Scores how ready a GitHub repository is for outside contributors - a Contributor-Readiness score out of 100 across first impression, contributor docs, time to first PR, issue supply, maintainer responsiveness, automation and recognition - and lists the biggest fixes first. Produces a markdown report, JSON, a shareable 1200x630 report card SVG and a README badge. Works on a local checkout or any public repo by URL. Use when asked to audit, score, grade or review a repo's contributor experience, check if a project is beginner-friendly, or find out why a repo gets no contributors.
4
+ license: MIT
5
+ metadata:
6
+ author: Priyanshu Doshi
7
+ repo: https://github.com/Priyanshu-byte-coder/contributor-magnet
8
+ ---
9
+
10
+ # Magnet audit
11
+
12
+ Measures what a newcomer experiences: can they find the project, understand it, start in minutes, find an issue that's actually free, and get an answer quickly?
13
+
14
+ ## Run it
15
+
16
+ ```bash
17
+ node <this skill>/scripts/audit.mjs [path] # local checkout; reads the GitHub remote for live data
18
+ node <this skill>/scripts/audit.mjs --repo owner/name # any public repo, no checkout
19
+ node <this skill>/scripts/audit.mjs . --offline # file checks only, no network
20
+ node <this skill>/scripts/audit.mjs . --out magnet-report # output folder (default: magnet-report)
21
+ node <this skill>/scripts/audit.mjs . --name acme/app # name on the report and card
22
+ ```
23
+
24
+ Live GitHub data is read only when the path is the root of a checkout with a GitHub `origin`. For a subfolder (a package in a monorepo, say), pass `--repo owner/name` as well if you want the repo's issue and PR data.
25
+
26
+ Node 18+, no install. It uses `GITHUB_TOKEN`, `GH_TOKEN` or `gh auth token` if present; without a token it samples fewer issues to stay under the anonymous rate limit. It writes `report.md`, `report.json` and `card.svg` to the output folder. Put that folder outside the repo or in `.gitignore`.
27
+
28
+ ## Read the result to the user
29
+
30
+ 1. Lead with the score, the grade and the mode. A **partial** score (offline, or no GitHub remote) only covers file checks, so say which categories weren't measured.
31
+ 2. Give the top three fixes in plain words, each with the skill that does it (`→ /magnet-setup` etc.).
32
+ 3. Call out anything that changes the plan:
33
+ - **Few free beginner issues** (`gfi-free`): issues are hoarded by inactive claimers. Fix with `magnet-bots` before opening new issues, or the new ones get hoarded too.
34
+ - **Look-alike labels** (`label-names`): `good-first-issue` hides the repo from GitHub's good-first-issue discovery. `magnet-setup`'s label script renames them.
35
+ - **Slow first response**: no amount of setup fixes this. Suggest a review rhythm (see `magnet-review`) and promise only the response time the maintainer can keep.
36
+ 4. Offer the badge (it's in `report.md` and the console output) and the card. The card is 1200x630, the size of a social preview, so it works in a launch post or a before/after tweet.
37
+
38
+ ## What each check means
39
+
40
+ The thresholds and the reasoning for every check are in [references/scoring.md](references/scoring.md). Read it before arguing with a score or adjusting the plan around one.
41
+
42
+ ## Don't
43
+
44
+ - Don't treat the score as the goal. A repo at 95 that never answers PRs will still lose contributors; the responsiveness checks are weighted heavily for that reason.
45
+ - Don't commit the report folder into the user's repo unless they ask.
@@ -0,0 +1,4 @@
1
+ interface:
2
+ display_name: "Magnet Audit"
3
+ short_description: "Score a repo's contributor readiness out of 100"
4
+ default_prompt: "Use $magnet-audit to score this repo for contributors."
@@ -0,0 +1,82 @@
1
+ # How the Contributor-Readiness score works
2
+
3
+ 100 points in 7 categories. Checks that need GitHub data (labels, issues, response times) are skipped in offline mode, and the score is scaled to the points that were measured, marked **partial**.
4
+
5
+ Grades: 90+ **Magnet**, 75+ **Ready**, 50+ **Getting there**, below 50 **Quiet**.
6
+
7
+ ## First impression (15)
8
+
9
+ A visitor decides in seconds whether a repo is alive and worth their time.
10
+
11
+ | Check | Points | Full marks when | Why |
12
+ |---|---|---|---|
13
+ | readme | 3 | README is 1,500+ characters (1 point if shorter) | Short READMEs read as abandoned or toy projects |
14
+ | license | 3 | LICENSE file or a detected SPDX license | No license means legally nobody can contribute; every program requires one |
15
+ | description-topics | 3 | Description set (1) and 3+ topics (2) | Topics drive GitHub search, Explore and program discovery (the `hacktoberfest` topic alone is on ~147k repos) |
16
+ | readme-contributing | 3 | A "Contributing" heading (2) and a link to CONTRIBUTING or good first issues (1) | Visitors who want to help look for this section first |
17
+ | visual | 3 | An image or video in the README (2) and a homepage or live demo link (1) | People contribute to things they can see working |
18
+
19
+ ## Contributor docs (20)
20
+
21
+ | Check | Points | Full marks when | Why |
22
+ |---|---|---|---|
23
+ | contributing | 5 | CONTRIBUTING exists (3), is 1,500+ characters and has a code block (2) | The guide is where "I want to help" turns into a setup |
24
+ | code-of-conduct | 3 | CODE_OF_CONDUCT present (also counts when inherited from the org's `.github` repo) | Programs (GSSoC, GSoC, Outreachy) expect it; it gives you a basis to act on abuse |
25
+ | security | 2 | SECURITY.md present | Keeps exploits out of public issues |
26
+ | issue-forms | 4 | 2+ YAML issue forms (2 points for markdown templates) | Forms with required fields stop "it doesn't work" issues |
27
+ | issue-config | 2 | `config.yml` disables blank issues or adds contact links | Routes questions to Discussions and security reports to private advisories |
28
+ | pr-template | 2 | A pull request template | Gets "Closes #", testing steps and screenshots without asking |
29
+ | ai-policy | 2 | CONTRIBUTING states an AI policy | In 2026 most low-effort PR floods are AI-generated; a clear policy lets you close them without a debate |
30
+
31
+ ## Time to first PR (15)
32
+
33
+ | Check | Points | Full marks when | Why |
34
+ |---|---|---|---|
35
+ | quickstart | 4 | A fenced block with clone, install or run commands in README or CONTRIBUTING | Copy-paste setup is the single biggest drop-off point |
36
+ | ci | 3 | A workflow on `pull_request` with jobs | Contributors get feedback without waiting for you |
37
+ | env-example | 3 | `.env.example` (or no environment setup needed at all) | Missing env vars are the #1 setup question |
38
+ | devcontainer | 3 | `.devcontainer/devcontainer.json` or Gitpod config | One click to a working environment, including on a Chromebook |
39
+ | demo-mode | 2 | A keyless/sample-data mode (`dev:demo` script or docs) | A `dev:demo` mode on sample data lets UI contributors skip database, OAuth and API-key setup entirely |
40
+
41
+ ## Issue supply (20)
42
+
43
+ | Check | Points | Full marks when | Why |
44
+ |---|---|---|---|
45
+ | gfi-count | 6 | 8+ open `good first issue` (5→5, 3→4, 1→2) | No beginner issues, no beginners. goodfirstissue.dev requires 3+ |
46
+ | gfi-free | 4 | 60%+ of them unassigned (30%+ → 2) | Without idle-claim expiry, most beginner issues end up held by people who've gone quiet |
47
+ | help-wanted | 2 | 3+ open `help wanted` | Where returning contributors go next |
48
+ | label-names | 2 | Exact names `good first issue` and `help wanted`, no look-alikes | GitHub's `/contribute` page and recommendations read only the exact names |
49
+ | difficulty | 3 | 3+ difficulty-style labels | Programs map points to levels; contributors pick by level |
50
+ | gfi-quality | 3 | 70%+ of beginner issues are 300+ characters and name a file or have a checklist | "Fix the navbar" makes a newcomer ask five questions before starting |
51
+
52
+ ## Responsiveness (15)
53
+
54
+ Measured on the last 30 issues and PRs opened by people outside the team in the past 180 days (8 without a token).
55
+
56
+ | Check | Points | Full marks when | Why |
57
+ |---|---|---|---|
58
+ | first-response | 8 | Median time to first maintainer comment, review or close ≤ 24h (≤3 days → 6, ≤7 days → 3) | The strongest predictor of whether a first-timer returns. Unanswered items count with their wait so far |
59
+ | merge-time | 4 | Median open→merge for outside PRs ≤ 3 days (≤7 → 3, ≤14 → 2) | Slow merges mean stale branches, conflicts and lost interest |
60
+ | stale-prs | 3 | ≤10% of open human PRs idle 30+ days | A wall of rotting PRs tells newcomers theirs will rot too |
61
+
62
+ With fewer than 3 samples, first-response gives 4 and merge-time gives 2 (not enough data to judge either way).
63
+
64
+ ## Automation (10)
65
+
66
+ Detected by reading `.github/workflows/*.yml`.
67
+
68
+ | Check | Points | Full marks when |
69
+ |---|---|---|
70
+ | claim-bot | 3 | A workflow on `issue_comment` that assigns people |
71
+ | auto-unassign | 2 | A scheduled workflow that removes assignees |
72
+ | welcome | 2 | A first-interaction or welcome workflow |
73
+ | auto-label | 2 | `actions/labeler` or a PR workflow that adds labels |
74
+ | stale | 1 | `actions/stale` |
75
+
76
+ ## Recognition (5)
77
+
78
+ | Check | Points | Full marks when | Why |
79
+ |---|---|---|---|
80
+ | contributors-wall | 2 | contrib.rocks, all-contributors or similar in the README | Being seen is the main reward most contributors get |
81
+ | community | 2 | Discussions on, or a Discord/Slack/Matrix link | Somewhere to ask that isn't an issue |
82
+ | funding | 1 | `.github/FUNDING.yml` | Sponsors and OSS perk programs look for it |