repo-bootstrap
Skill2 starsChanged 28 days agoMITView on GitHub
Creates or hardens a GitHub repository so it starts safe: public unless the user asks for private, a CI workflow that lints, tests and fails under 80% line coverage, and a ruleset on the default branch (no direct pushes, force-pushes or deletion; merges only through a PR with green CI). Use when a new repo is being created or first pushed ("create a repo", "make a new GitHub repo", "gh repo create", "init this project and push it", "publish this to GitHub"), or when the user says "add branch protection", "set up CI and coverage", or "harden this repo". Not for reviewing code or fixing a failing test suite.
- Reads credentials
- Commits and pushes
5 other projects use a version of this.
Adopted by
Most recently taken up by
- VladButacu/agentkittheir own version, first seen Nov 15, 2026
- ai-agent-assembly/agent-assemblytheir own version, first seen Nov 8, 2026
- fpizzuta/repo-bootstraptheir own version, first seen Jul 23, 2026
- joseantoniogarciay/ModularProjecttheir own version, first seen May 24, 2026
- gclm/super-stacktheir own version, first seen Mar 29, 2026
Other versions5 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 5
- ai-agent-assembly/agent-assembly★ 4same name
- fpizzuta/repo-bootstrap★ 0same name
- gclm/super-stack★ 0same name
- joseantoniogarciay/ModularProject★ 0same name
- VladButacu/agentkit★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository13 other files it gives its agents.
- blind-pr-reviewSkill
- bug-huntSkill
- bug-reviewSkill
- context-firstSkill
- course-builderSkill
- mock-interviewSkill
- product-manager-reviewerSkill
- progress-logSkill
- skill-verifierSkill
- staff-engineer-reviewerSkill
- test-firstSkill
- token-auditSkill
- trip-itinerarySkill
The file
We split this skill into the rules it gives an agent
10 rules. 0 are common, 4 are distinctive, and 6 are very specific to this project.
0
Common
Most of the 5 edited versions we read keep these.
4
Distinctive
This author's own choices. Worth a look.
6
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 33
Ask only if the stack can't be detected and the directory is empty.
- Very specific: line 37
Preflight: Run gh auth status and confirm the repo scope.
- Very specific: line 41
Add the coverage config the stack needs (the threshold lives in the project, so it holds locally too) from references/coverage.md.
- Distinctive: line 42
If the repo has no tests yet, add one small real test of real code, so CI is green at 80% from the first commit.
- Very specific: line 43
Add a .gitignore for the stack if it is missing, and make sure coverage output (coverage.out, .coverage, coverage/, lcov.info) is ignored.
- Distinctive: line 44
Run the same lint, test and coverage commands locally and fix any failures before pushing.
- Distinctive: line 52
Protect the default branch: Run:
- Very specific: line 76
Public by default: Only make a repo private when the user says so.
- Very specific: line 79
Never weaken the gate to get green: no lowering the threshold, no || true, no continue-on-error, no blanket coverage excludes.
- Very specific: line 81
Use the current major versions of GitHub Actions and language runtimes.
“Common” is measured: kept by at least 6 in 10 of the 5 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Repo Bootstrap
Every repo the user creates gets the same baseline, with no reminders needed: public by default, CI on every PR and push, a minimum of 80% line coverage enforced in CI, and the default branch protected by a ruleset whose required check is that CI job. Done means scripts/verify_repo.py passes against the live repo, not that the files were written.
Inputs
The request, or $ARGUMENTS:
- A repo name, or nothing → use the current directory's name and create the repo under the logged-in account (
gh api user --jq .login). owner/name→ create under that owner (an org the user belongs to).- Words like "private", "internal" or "don't make it public" → private. Otherwise it is public; never ask about visibility.
- An existing repo ("harden this repo", or the current directory already has a GitHub remote) → skip creation and run phases 2–5 against it.
- Coverage: 80% is the floor. A higher number from the user wins; a lower one only if the user insists, and say so in the reply.
Ask only if the stack can't be detected and the directory is empty. Then ask which language, using a structured question tool such as AskUserQuestion if available, or plain chat otherwise.
Workflow
- Preflight. Run
gh auth statusand confirm thereposcope. Make sure the project is a git repo with amaindefault branch (git init -b mainif needed). Checkgh repo view <owner/name>to see whether the repo already exists, so you don't create a duplicate. - Detect the stack and scaffold CI. Detect the stack from its marker file:
pyproject.toml/requirements*.txt→ python;package.json→ node;go.mod→ go;Cargo.toml→ rust;build.gradle*→ java-gradle;pom.xml→ java-maven. In a monorepo, add one job per stack.- Copy
assets/workflows/<stack>.ymlto.github/workflows/ci.yml. Keep the job id and nameci, because the ruleset requires a check with exactly that name. If you rename it, pass the new name toapply_protection.sh. - Add the coverage config the stack needs (the threshold lives in the project, so it holds locally too) from
references/coverage.md. - If the repo has no tests yet, add one small real test of real code, so CI is green at 80% from the first commit. Never lower the threshold or exclude source files to pass the check.
- Add a
.gitignorefor the stack if it is missing, and make sure coverage output (coverage.out,.coverage,coverage/,lcov.info) is ignored. - Run the same lint, test and coverage commands locally and fix any failures before pushing.
- Copy
- Create the repo and push. For a new repo:
If the repo already exists, push the CI scaffold togh repo create <owner/name> --public --source . --remote origin --push # --private only if askedmainbefore protecting it. Once the ruleset is on, every change needs a PR. Then wait for the first run:gh run watch -R <owner/name> $(gh run list -R <owner/name> -b main -L1 --json databaseId --jq '.[0].databaseId') --exit-status. If it fails, fix the problem and push again. Don't protect a branch whose required check is red. - Protect the default branch. Run:
The script creates or updates the ruleset frombash scripts/apply_protection.sh <owner/name> ciassets/ruleset.json(idempotent), then turns on delete-branch-on-merge, the "update branch" button, and secret scanning with push protection where the plan allows it. If GitHub refuses rulesets on a private repo (free plan), tell the user and offer two fixes: make the repo public, or upgrade the plan. Don't silently skip protection. - Verify. Run:
It checks visibility, an active ruleset with all four rules and thepython3 scripts/verify_repo.py <owner/name> --dir . --min-coverage 80cicheck, a workflow on the default branch, a green latest run, and a coverage threshold of 80 or more in the project. Fix everything it reports and re-run until it exits 0.
Output
A short chat reply covering:
- The repo URL and its visibility.
- The stack, the CI file path, and where the coverage threshold is set, with the current coverage from the first run.
- The ruleset rules and the required check.
- Anything that couldn't be applied and why (for example, secret scanning on a private free repo), plus the
verify_repo.pyresult.
From then on, changes land through a branch and a PR: git switch -c <branch>, push, then gh pr create.
Rules
- Public by default. Only make a repo private when the user says so. Before creating a public repo, scan what will be pushed for secrets (
.env, keys, tokens). If you find any, stop and tell the user. - Order matters: push the CI first, wait for green, then protect. A ruleset that requires a check that has never passed blocks every PR.
- The required check name must equal the job
name:in the workflow (ci). A mismatch leaves PRs waiting forever on "Expected — waiting for status". - Never weaken the gate to get green: no lowering the threshold, no
|| true, nocontinue-on-error, no blanket coverage excludes. Write tests instead. - Rulesets need no approving review by default (
required_approving_review_count: 0), so a solo owner can merge their own green PR. Raise it to 1 when the repo has collaborators. - Use the current major versions of GitHub Actions and language runtimes. The versions in
assets/are a starting point, so check them before copying.
Files
assets/workflows/<stack>.yml: the CI templates (python, node, go, rust, java-gradle, java-maven). Copy one to.github/workflows/ci.yml.assets/ruleset.json: the default-branch ruleset thatapply_protection.shapplies.references/coverage.md: read in phase 2 for each stack's coverage config and its gotchas.scripts/apply_protection.sh: run in phase 4 to apply the ruleset and the repo hardening settings.scripts/verify_repo.py: run in phase 5. Exits non-zero and lists each gap.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

