Magnet Setup
ASecurityAdds the contributor infrastructure an open source repo needs - CONTRIBUTING.md with copy-paste setup and claiming rules, YAML issue forms (bug, feature, maintainer task with difficulty), an issue chooser that routes questions and security reports away, a pull request template, a standard label set (fixing look-alikes like good-first-issue that hide a repo from GitHub discovery), Contributor Covenant, SECURITY.md and a devcontainer. Fills everything from the actual project and never overwrite...
- 33 stars
- 0 votes
- 0 copies
- 0 views
- Added December 4, 2026
Security analysis
100/100Pro scans all 13 files and shows the line behind each finding
npx -y skills add Priyanshu-byte-coder/contributor-magnet --skill magnet-setup --agent claude-codeAre you the author of Magnet Setup?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/priyanshu-byte-coder-magnet-setup)---
name: magnet-setup
description: Adds the contributor infrastructure an open source repo needs - CONTRIBUTING.md with copy-paste setup and claiming rules, YAML issue forms (bug, feature, maintainer task with difficulty), an issue chooser that routes questions and security reports away, a pull request template, a standard label set (fixing look-alikes like good-first-issue that hide a repo from GitHub discovery), Contributor Covenant, SECURITY.md and a devcontainer. Fills everything from the actual project and never overwrites existing docs. Use when asked to add or improve CONTRIBUTING, issue or PR templates, labels, a code of conduct, or to make a repo beginner-friendly.
license: MIT
metadata:
author: Priyanshu Doshi
repo: https://github.com/Priyanshu-byte-coder/contributor-magnet
---
# Magnet setup
Everything a newcomer touches before their first PR: the guide, the forms, the labels.
## Run it
1. **Look before you write.** List what exists: CONTRIBUTING (root, `.github/`, `docs/`), templates, labels (`gh label list`), code of conduct, devcontainer, and any org-level defaults in the owner's `.github` repo. Read the existing CONTRIBUTING fully; you'll merge into it, not replace it.
2. **Learn the project.** Find the real setup: package manager and lockfile, install/run/test/lint commands (from `package.json`, `Makefile`, `pyproject.toml`, `Cargo.toml`, CI workflows), required env vars (`.env.example`, code reading `process.env`/`os.environ`), default branch, and whether there's a keyless or demo mode. Run the commands if you can, so the docs are verified, not guessed.
3. **Scaffold what's missing:**
```bash
node <this skill>/scripts/scaffold.mjs --target <repo>
```
It copies templates that don't exist yet, fills owner/repo/branch, fetches the Contributor Covenant from GitHub, and prints the `{{PLACEHOLDERS}}` left. Fill every one from step 2: real commands, real review time, the AI policy the maintainer chose, the contact address. Delete sections that don't apply rather than leaving vague text. Then `grep -r "{{" ` to make sure none are left.
4. **Merge into existing docs.** Where a file already existed, compare it with the template and add only what's missing: usually the claiming rules (`/assign`, 7 days, cap), the AI policy, the label table, and copy-paste setup commands.
5. **Labels:**
```bash
node <this skill>/scripts/labels.mjs --repo owner/name
```
That is a dry run: it only prints what would change. Show it, then run again with `--apply` after approval. It renames look-alikes (`good-first-issue`, `Good First Issue`) to the exact names GitHub reads, keeps any label that differs only by punctuation (`level:beginner` stays; no duplicate `level: beginner`), and never recolors existing labels unless `--update`. If the repo already has its own difficulty or type scheme, keep theirs and tell `magnet-bots` to use those names.
6. **Turn on Discussions** if the maintainer wants it (`gh repo edit --enable-discussions`) so the issue chooser's links work, or point `config.yml` at their Discord instead.
7. **Re-run the audit** (`magnet-audit`) and report what moved.
## What good looks like
- Setup is copy-paste and verified. If it needs keys, `.env.example` says where to get each one, or there's a demo mode that needs none. A `dev:demo` script that runs on sample data lets UI contributors skip the whole backend setup.
- The claim flow is stated once, clearly: comment `/assign`, open a PR within 7 days, at most 5 issues at a time, `/unassign` if you can't finish.
- The AI policy is explicit. Two working options:
- *Allowed:* "AI tools are fine. Your PR is reviewed like any other, and you must be able to explain every line."
- *Disclosed:* "Say in the PR which parts were AI-assisted. Undisclosed generated PRs are closed."
- The PR template asks for `Closes #`, testing steps and screenshots, with a short checklist. The program checkbox block stays commented until the repo joins a program (`magnet-programs`).
- `config.yml` turns blank issues off and sends questions to Discussions and vulnerabilities to private advisories.
## Don't
- Don't replace a maintainer's CONTRIBUTING with the template. Merge.
- Don't add labels the bots or programs won't use; a 60-label list is noise.
- Don't write setup steps you haven't checked against the code or CI config.
Files in this skill
- SKILL.md
- agents/openai.yaml
- scripts/labels.mjs
- scripts/scaffold.mjs
- templates/CONTRIBUTING.md
- templates/SECURITY.md
- templates/devcontainer/devcontainer.json
- templates/github/ISSUE_TEMPLATE/bug_report.yml
- templates/github/ISSUE_TEMPLATE/config.yml
- templates/github/ISSUE_TEMPLATE/feature_request.yml
- templates/github/ISSUE_TEMPLATE/task.yml
- templates/github/pull_request_template.md
- templates/labels.json
Attribution
Related skills
View all in ai-agents →Comments
Loading comments…
Newsletter
Get the weekly list of safe new skills, and the ones we pulled.