repo-init
Skill0 starsChanged 13 days agoMITView on GitHub
Bootstrap a repo's agent layer from nothing — AGENTS.md, detail tier, harness shims, and the commands table. Covers code repos, non-coding repos (docs vaults, research notes, writing) whose green check is a link or schema lint rather than a build, and empty folders that have no facts to record yet. Use only when a repo has no AGENTS.md at all. For a repo that already has one, use repo-audit to see what is wrong, then repo-align to fix what you approve.
8 other projects use a version of this.
Adopted by
Most recently taken up by
- zalogarcia/zalo-claude-code-setuptheir own version, first seen Nov 8, 2026
- SHYXIN/skillstheir own version, first seen Nov 1, 2026
- qbicus/skillstheir own version, first seen Oct 25, 2026
- aberson/skill-meshtheir own version, first seen Oct 24, 2026
- steveu/skillstheir own version, first seen Oct 13, 2026
- rohanhong/tmpl.general-repotheir own version, first seen Oct 11, 2026
Other versions8 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 8
- dgilford/ai-science-toolkit★ 82same name
- SHYXIN/skills★ 6same name
- rohanhong/tmpl.general-repo★ 3same name
- aberson/skill-mesh★ 2same name
- zalogarcia/zalo-claude-code-setup★ 2same name
- lldwb/lldwb-claude-skills★ 1same name
- qbicus/skills★ 1same name
- steveu/skills★ 1same 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.
- AGENTS.mdAGENTS.md
- agent-rulesSkill
- code-discoverySkill
- designSkill
- project-scaffoldSkill
- repo-alignSkill
- repo-auditSkill
- skills-installSkill
- standardSkill
- verify-changeSkill
- workflowSkill
The file
We split this skill into the rules it gives an agent
10 rules. 0 are common, 6 are distinctive, and 4 are very specific to this project.
0
Common
Most of the 7 edited versions we read keep these.
6
Distinctive
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 16
Read INIT.md and run it. This file is only the entry point: what the job is, what it produces, and how to know it is done.
- Very specific: line 26
Ask it and wait. ~/dotfiles existing on the machine is not a yes, and a repo cloned onto a machine that has them is not evidence it uses …
- Very specific: line 47
Ask, and say why: one permanent branch is a complete answer.
- Distinctive: line 54
Done when: every permanent branch has a stated purpose and AGENTS.md names the production branch.
- Distinctive: line 80
Every section of an AGENTS.md is a fact about a project, and an empty folder has none.
- Distinctive: line 101
Only two things are true before any code exists, and neither comes from the folder:
- Distinctive: line 159
Write the one that fits into the commands table, with its real invocation:
- Distinctive: line 168
If the repo has no tooling at all, the honest table is one row:
- Distinctive: line 222
Every fact collected has exactly one destination, and nothing is in two.
- Very specific: line 236
Do not rewrite it. Run the audit instead: skill repo-audit.
“Common” is measured: kept by at least 6 in 10 of the 7 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 Init
Build the instruction layer for a repo that has none, in eight steps, ending with a green check you can paste as evidence.
The failure this prevents: a repo where every session re-derives the same facts, and the rules that matter live in a skill the agent never opens.
Read INIT.md and run it. This file is only the entry point: what the job is, what it
produces, and how to know it is done.
Step 0, before reading the repo
One question cannot be answered from the files, and it decides who owns the harness shims:
does this project use ekajaya740/dotfiles? They are tuned for omp — omp-jev routing,
9router model aliases, the claude/ and jev/ deploy scripts — so a repo on another harness
inherits wiring it never reads.
Ask it and wait. ~/dotfiles existing on the machine is not a yes, and a repo cloned onto a
machine that has them is not evidence it uses them.
| Answer | What it changes |
| Yes | Record the dotfiles as the machine layer, by pointer: AGENTS.md names ~/dotfiles and bash ~/dotfiles/bootstrap.sh, and the shims come from there. Never restate their rules here. |
| No | Write the shims by hand in step 4, and record no dotfiles dependency anywhere. |
Done when AGENTS.md carries one line under the stack section: either "machine layer:
ekajaya740/dotfiles (omp-tuned)" or "self-contained, no dotfiles dependency". Full text in
INIT.md § 0.
Step 0b, the second question the files cannot answer
How many permanent branches does this repo have, and what does each one mirror? git branch -r
gives the names; nothing in the repo says which is production. That matters because deployments
fire on merge, per target branch — a merge to the production branch ships to users — so the
answer decides where an agent is allowed to edit. A second permanent branch (staging, or a
prose-only branch that cannot trigger a deploy) is how a change gets tested or a doc change avoids
shipping a migration.
Ask, and say why: one permanent branch is a complete answer; the defect is a branch with no
stated purpose, or two with the same one. Then record it as a | Branch | table in
docs/agents/, plus the production branch's name in AGENTS.md.
Full reasoning, the questions, and the record's shape → skill workflow
BRANCHES.md. Procedure: INIT.md § 1b.
Done when every permanent branch has a stated purpose and AGENTS.md names the production
branch.
First, what kind of repo is this
Three shapes reach this skill, and only one of them is the empty case. Tell them apart before reading anything else, because "no manifest" is not the same as "no content".
ls -A | grep -v '^\.git$' | head # any content at all?
ls *.md docs/ content/ 2>/dev/null | head
cat package.json pyproject.toml Cargo.toml go.mod Makefile 2>/dev/null | head -40| Shape | Test | What it is |
| Empty | Nothing but .git | No content, no facts to record |
| Non-coding | Files exist, but no manifest and no build | Docs vault, research notes, writing, a knowledge base |
| Code | A manifest, or a build/CI config | Run the eight steps normally |
A docs vault is not empty. It has a tree, conventions, a schema, and often a link graph — all
of them facts AGENTS.md should carry. Treating it as empty would throw that away and tell the
user their folder is blank when it is full of work.
Empty folder
Every section of an AGENTS.md is a fact about a project, and an empty folder has none. Step 1
asks you to read the build command, the green command and the primary branch from files. There are
no files, so the honest output is not a shorter document — it is a question.
If nothing but .git is there, do not write AGENTS.md. Say what is missing and ask what the
folder will hold:
This folder is empty, so there is no stack, green command or branch to record — the three things
AGENTS.mdis mostly made of. What will it hold: code, or something else? If code,project-scaffoldpicks the stack first and lays down the agent layer after, which is the order that avoids inventing facts.
Two outcomes:
| The user says | Do |
| "Scaffold it too" / names a stack | Skill project-scaffold — it creates the project and the agent layer, with real commands to record |
| "Just the AGENTS.md, I'll add code later" | Write a partial file, below |
The partial file
Only two things are true before any code exists, and neither comes from the folder:
- The three project-independent hard rules — never guess a spec, prove before done, one rule one home.
- An explicit list of what is not yet known.
# Agent Guide — «Project Name»
## Status
Scaffolded before any code. The sections below are deliberately incomplete; fill each one at the
first commit that makes it answerable, then delete this section.
## Hard rules
- **Never guess a specification.** Underspecified scope → stop and ask.
- **Prove it before calling it done.** A claim names the layer it was verified at.
- **One rule, one home.** Stated once; every other mention points at the owner.
## Not yet known — do not invent
| Fact | Fill it when |
| --- | --- |
| Stack | The first dependency is added |
| Build command | `package.json` / `pyproject.toml` / `Makefile` exists |
| Green command | There is a test or typecheck to run |
| Primary branch | The first push |
| Out-of-bounds | The first path an agent should not touch |Never fill a row with a plausible default. A green command that was guessed is worse than an
empty one: the agent runs it, it fails, and the file teaches the agent to distrust the file. An
AGENTS.md with four known-unknowns is honest and useful; one with bun test in a repo that has
no package.json is a lie the next session will act on.
Done when either the folder has enough evidence to run the eight steps, or the user has been asked and has chosen a path.
Non-coding repo
Files exist but nothing builds. This is a real repo with real facts — do not downgrade it to the
empty case, and do not pretend it has a bun test. It has a different green check, and finding
that check is the whole job.
What replaces the green command
A code repo proves itself by compiling. A non-coding repo proves itself by staying valid, and what "valid" means depends on what the files are:
| Content | The green check | Catches |
| Markdown docs, notes, a vault | A link check — every [x](./y.md) resolves | Rot: renamed files, dead cross-refs |
| Structured notes (frontmatter, tags, dates) | A schema lint — required keys present, values in range | A note the tooling cannot read |
| Anything rendered (site, PDF, slides) | A build that emits the artifact, exit 0 | A broken include, a missing asset |
| Prose with a stated house style | A lint for the stated rules only (heading depth, tense, banned words) | Drift from the style the repo claims |
| Nothing checkable | None — and say so | Nothing; do not invent one |
Write the one that fits into the commands table, with its real invocation:
| Check | Command | Passes when |
| --- | --- | --- |
| Links | `lychee --offline .` | exit 0, no broken relative link |
| Frontmatter | `python3 scripts/check_frontmatter.py` | exit 0 |If the repo has no tooling at all, the honest table is one row:
| Check | Command | Passes when |
| --- | --- | --- |
| None yet | — | Manual read; no mechanical check exists |That row is a finding, not a failure. It tells the next session exactly how much proof exists.
What the rest of the file becomes
| Section | Non-coding equivalent |
| Stack | What the repo is: Obsidian vault, docs site, research corpus, slide deck. Name the tools that read it. |
| Build command | Omit unless something renders. A vault has no build. |
| Primary branch | Same question, same answer. |
| Out-of-bounds | The paths an agent must not touch: published output, _archive/, other people's notes, anything with a licence. |
| Hard rules | The repo's own conventions — filename scheme, frontmatter contract, where new notes go. These bind harder here than in code, because nothing else enforces them. |
The rules that matter most in a non-coding repo are the ones a compiler would have caught: where a new file goes, what its name must look like, what frontmatter it must carry, and which files are read-only. Nothing else will fail loudly if they are broken.
Done when the commands table names a real check or says plainly that none exists, and the conventions that nothing else enforces are written down as hard rules.
What it produces
| Artifact | Tier | Holds |
AGENTS.md | Binding | What this repo is, hard rules, the commands table, out-of-bounds. Under ~150 lines. |
docs/agents/ | Detail | One file per area. Created on the first detail rule that earns a file — not before. |
CLAUDE.md, .cursor/rules/*.mdc, … | Shim | A pointer to AGENTS.md. Never a second copy. An existing hand-written shim is a rule source first: its rules are extracted and placed before the pointer replaces it. |
.agents/skills/ + skills-lock.json | Store | The pinned skills the repo's procedures live in. Lock committed, directory ignored. |
Template: TEMPLATE-AGENTS.md. Copy it, fill it from the repo, delete every
row with no true answer.
The one rule that makes it work
Never write a second copy of a rule for a second harness. A harness that cannot follow a
pointer gets the pointer plus a one-line summary, not the file. Two copies drift, and a drifted
rule is violated — see skill agent-rules § One rule, one home.
The same rule forbids the opposite mistake at bootstrap: a repo that already has a hand-written
CLAUDE.md and no AGENTS.md is the common case, and replacing that file with a pointer deletes
its rules while leaving a shim that looks correct. INIT.md § 4 drains each existing
shim into AGENTS.md or docs/agents/ before rewriting it, and reports where every rule went.
Done when
AGENTS.mdstates the repo's kind (Kind: codeorKind: knowledge), the command that proves it valid, and the primary branch — all copied from files, not memory.- Every fact collected has exactly one destination, and nothing is in two.
- A harness opening the repo lands in
AGENTS.mdin one hop. - That command passes on a clean checkout, and you have pasted the line that proves it. For a knowledge repo that is the link check or schema lint; where none exists, the table says so and the rule is that no command was invented.
skills-lock.jsonis committed, and a clean checkout restores the set withnpx skills@latest experimental_install.
Step 7 of INIT.md has the test: hand AGENTS.md to a fresh agent and ask what it
would get wrong about this repo without it. Every missing answer is a binding rule; every answer
that would never be broken is noise.
Repo already has AGENTS.md
Do not rewrite it. Run the audit instead: skill repo-audit. It reports wrong, duplicated, and
missing rules against the same template, and writes nothing. Then skill repo-align applies only
the ids you name.
Related
- The eight steps →
INIT.md - What to pin and how →
SKILLS.md - The file to copy →
TEMPLATE-AGENTS.md - Tiers and ownership → skill
agent-rules - Audit an existing repo, read-only → skill
repo-audit - Apply the findings you approve → skill
repo-align - The whole routing table → skill
standard
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.

