repo-setup
Skill0 starsChanged 4 months agoApache-2.0View on GitHub
Stand up a new GitHub repository to the team standard. Covers the branch model, rulesets (branch protection), the label set, tag and release convention, and required scaffolding. Use when creating a new repository, setting up rulesets or branch protection, defining labels, or when the user says "new repo", "set up rulesets", "branch protection", "create labels", "tạo repo mới", "đặt ruleset", "tạo label".
- Commits and pushes
4 other projects use a version of this.
Adopted by
Most recently taken up by
- ethanaubuchon/dossier-tradecrafttheir own version, first seen Sep 26, 2026
- getsentry/outposttheir own version, first seen Sep 19, 2026
- vidhunnan/agentic-skillstheir own version, first seen Jul 12, 2026
- polaralias/skillstheir own version, first seen May 22, 2026
Other versions4 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 4
- getsentry/outpost★ 5same name
- ethanaubuchon/dossier-tradecraft★ 3same name
- polaralias/skills★ 2same name
- vidhunnan/agentic-skills★ 2same 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 repository11 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- commit-conventionSkill
- pr-conventionSkill
- architecture-reviewSkill
- code-styleSkill
- comment-reviewSkill
- review-gateSkill
- book-clean-architectureSkill
- book-legacy-codeSkill
- book-philosophy-of-software-designSkill
- book-refactoringSkill
The file
We split this skill into the rules it gives an agent
7 rules. 0 are common, 2 are distinctive, and 5 are very specific to this project.
0
Common
Most of the 4 edited versions we read keep these.
2
Distinctive
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 49
Run setup-branch-protections.sh, which this skill carries.
- Very specific: line 65
Create the set from labels.json, which this skill carries, so it never depends on an outside repo:
- Very specific: line 96
Every namespace fits any project except area:, which names the project's own components.
- Very specific: line 114
Write notes.md with one ## Changelog heading, a subsection per type (Features, Bug fixes, Documentation updates), and one line per commit:
- Very specific: line 127
Keep a CHANGELOG.md at the repo root in the same grouped format, newest version on top.
- Distinctive: line 136
Never delete a published tag or release once others may depend on it.
- Distinctive: line 155
Delete head branches on merge.
“Common” is measured: kept by at least 6 in 10 of the 4 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 setup
Bring a new GitHub repository to the team standard. This skill carries the values, the branch model, the rulesets and the label set, so setup is self-contained and needs no outside repo.
Detect the org and repo from the remote with gh repo view, or ask when neither
is set. Every step is a gh command, so the setup is repeatable and auditable.
1. Branch model
The branch model varies by project. Ask the user which branches the repository runs before protecting anything. Do not assume.
| Branch | Role |
main | Production |
staging | UAT, closest to production, where the PO signs off |
develop | Where dev and QC work, changes flow up to staging |
Common models:
mainonly - a small tool or library.main+staging- staging is UAT before production.main+staging+develop- a large application: develop for dev and QC, staging for UAT and the PO, main for production.
Pick the model before rulesets, and protect only the branches that exist. Pass
the chosen branches to setup-branch-protections.sh --branches.
2. Rulesets
One ruleset covers the protected branches. Each enforces the same core:
deletionandnon_fast_forward: no branch deletion, no force-push.pull_request: one approval, dismiss stale reviews on push.required_status_checks: the repo's own CI job names as the contexts, strict.- No bypass actors.
Run setup-branch-protections.sh, which this
skill carries. It creates the ruleset, or updates it in place when it exists:
./setup-branch-protections.sh <org>/<repo> --checks <ctx1>,<ctx2>Pass the CI contexts the repo's workflow reports. Omit --checks on a repo with
no CI yet, then re-run once the workflow has run and the context names are known.
The defaults protect main and staging with one approval. See --help in the
script header for --branches, --approvals, --code-owner and --name.
3. Labels
Create the set from labels.json, which this skill carries, so it
never depends on an outside repo:
jq -c '.[]' labels.json | while read -r l; do
gh label create "$(jq -r .name <<<"$l")" \
--color "$(jq -r .color <<<"$l")" \
--description "$(jq -r .description <<<"$l")" \
--repo <org>/<repo> --force
doneTo go faster when a repo you own already carries the set, clone it instead:
gh label clone <org>/<a-repo-you-own> --repo <org>/<repo>The set is namespaced by scope, the pattern Kubernetes, Angular and Rust use. It drives two things beyond triage:
changelog: breaking,changelog: bugfixandchangelog: featurefeed the release notes.impact:,priority:andseverity:classify blast radius, urgency and defect weight.
The set is broad: beyond changelog: and impact: it has size:, area:,
target:, priority:, severity:, status:, quality: and type:. A PR
applies the ones that describe the change (see pr-convention). It skips type:,
which repeats the title.
Every namespace fits any project except area:, which names the project's own
components. The area: entries in labels.json are examples. Replace them with
the new project's areas.
4. Tags and releases
SemVer with a v prefix (v0.1.0). Tag on a release, then cut a GitHub release
whose notes group commits by change type, so the changelog: labels have
somewhere to land.
git tag -a v1.2.3 -m "release 1.2.3"
git push origin v1.2.3
gh release create v1.2.3 --notes-file notes.mdWrite notes.md with one ## Changelog heading, a subsection per type
(Features, Bug fixes, Documentation updates), and one line per commit:
* <hash>: <subject> (#<pr>) (@<author>)Reference each author as a bare @handle, not a [@handle](url) link. GitHub
collects bare mentions into an auto-generated Contributors avatar grid at the end
of the release. Links are not collected, and a hand-written ## Contributors
section renders a second time next to the auto grid, so the release shows two
Contributors blocks. Use bare mentions and add no Contributors section.
Keep a CHANGELOG.md at the repo root in the same grouped format, newest
version on top. The GitHub release covers one version. The file accumulates every
version for readers browsing the source.
Build the version's entries at release, from the commits merged since the previous tag, so every hash is real. A feature PR adds no changelog line, since its squash hash does not exist until merge. Cut the release in its own PR that writes the version section, then tag that merge commit.
Never delete a published tag or release once others may depend on it. Move the changelog forward with a new version instead. Re-cutting a tag is safe only on a fresh repository with no consumers.
5. Scaffolding and settings
A new repo carries these before the first feature:
README.md,LICENSE,CONTRIBUTING.md,SECURITY.md.github/: a PR template, issue templates, andworkflows/for CICODEOWNERSwhen review routing matters- The commit hook and the commit-lint CI, so the commit standard holds from the first commit
Settings:
- The default branch chosen in section 1.
- Delete head branches on merge.
- Merge method is repo-wide, not per-branch. Set squash only, unless the branch model needs another.
- Auto-merge: ask the user. On lets a maintainer queue a pull request to merge once its checks and approval pass. Off keeps merges manual. Default off.
A three-branch model wants squash on feature work but a merge commit to promote
staging to main. GitHub sets the merge method per repository, not per branch. So
enable both squash and merge commit, then enforce the split with rulesets. Add
required_linear_history on develop and staging so they take squash or
rebase only. Leave main without it so it takes the merge commit from staging.
Reference conventions
- The label set lives in
labels.json, so setup needs no outside repo. - GitHub rulesets, the current form of branch protection.
- Scoped labels, as Kubernetes, Angular and Rust apply them.
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.

