conventions-init
Skill68 starsChanged 4 months agoMITView on GitHub
USE WHEN setting up a repo for AI-first work (after /init-repo), or when the context-surface hook should start feeding repo conventions to agents before edits. Drafts `conventions.yml` at repo root: per-kind casing (inferred from the code), a vague-name denylist seed, directory roles, and a hand-filled house-rules block. Idempotent — never overwrites a populated file; re-running prints suggested additions for manual merge. Read-only on code; never invents house rules. After writing, run /refresh-context-map so the hook picks it up.
In this repository16 other files it gives its agents.
- AGENTS.mdAGENTS.md
- adr-newSkill
- arch-mapSkill
- codex-sandboxSkill
- dynamic-checkSkill
- explain-diffSkill
- glossary-initSkill
- init-repoSkill
- log-structuredSkill
- process-diagramSkill
- refresh-context-mapSkill
- repo-doctorSkill
- repo-mapSkill
- security-reviewSkill
- session-logSkill
- stack-checkSkill
The file
We split this skill into the rules it gives an agent
6 rules. About 0 are common, 2 are distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
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 39
When you want the plugin to start steering on this repo (no conventions.yml yet means the whole steering loop is a no-op).
- Distinctive: line 42
Do NOT invoke for: per-function docs (those are docstrings), or to auto-write house rules the team has not agreed on.
- Very specific: line 49
Detect mode: If conventions.yml is absent, bootstrap.
- Very specific: line 50
NOT rewrite it (stdlib YAML loses the human-written consistency comments).
- Very specific: line 52
Infer casing: Run python scripts/score_adherence.py --repo .
- Distinctive: line 79
Python-first casing: Do not infer casing from unsupported languages.
≈ “Common” is an estimate: at least 1 in 5 of the 213,895 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
/conventions-init
What it does
Bootstraps conventions.yml at the repo root — the profile the context-surface
hook surfaces to an agent before it edits a source file (casing rules, a
vague-name denylist, directory roles, and divergent house rules the model cannot
infer). Block-style YAML only, so the stdlib fallback parser stays reliable.
It infers the mechanical parts (casing, structure) and asks the user for the house rules — it never invents a convention the repo does not actually hold.
When to invoke
- Setting up an AI-first repo, after
/init-repo. - When you want the plugin to start steering on this repo (no
conventions.ymlyet means the whole steering loop is a no-op).
Do NOT invoke for: per-function docs (those are docstrings), or to auto-write house rules the team has not agreed on.
Workflow
- Resolve repo root (
git rev-parse --show-toplevel); if not a repo, STOP and suggestgit init//init-repo. - Detect mode. If
conventions.ymlis absent, bootstrap. If it exists, do NOT rewrite it (stdlib YAML loses the human-writtenconsistencycomments); instead print the suggested draft below and tell the user to merge by hand. - Infer casing. Run
python scripts/score_adherence.py --repo .if the plugin's scorer is available, and readmetrics.casing_consistency.by_kind[*] .dominantforfunctions/types/constants. Python-first: if there are no.pyfiles (or the scorer is absent), leavecasingvalues blank with a comment for the user — never guess from an unsupported language. - Seed structure roots. List top-level + recognized source dirs (
src/,lib/,app/,scripts/,tests/, …) that exist; write each as a root key with a blank role string for the user to fill. - Seed the denylist from the documented defaults (
data,result,tmp,handle,process); the user can extend. - Leave
consistencyas a commented template — house rules are the user's to write (same "never invent" rule asglossary-init). - Write
conventions.yml(bootstrap mode) with theschema_version"1.x" comment, block-style. In existing-file mode, print the draft instead. - Remind the user to run
/refresh-context-mapso the manifest (and thus the hook) picks up the new conventions, and offer a one-lineAGENTS.mdpointer. - Report the path and which fields were inferred vs left for the user.
Hard rules
- Never invent house rules. The
consistencyblock is the user's; the skill only scaffolds it. - Never overwrite a populated
conventions.yml. Existing-file mode prints suggestions for manual merge (preserves the user's comments). - Never block. Discoverability skill; advisory if the user declines.
- Block-style YAML only (no inline braces or brackets) — keeps the stdlib fallback parser reliable.
- Python-first casing. Do not infer casing from unsupported languages; leave it blank for the user.
Tunables
--noninteractive— write the inferred skeleton with blank roles and a commentedconsistencyblock, no prompts.
What this skill does NOT do
- Auto-write house rules or invent conventions the repo does not hold.
- Rebuild the context-map manifest — that is
/refresh-context-map. - Score or lint code — that is
score_adherence.py//repo-doctor.
Codex parity
Same SKILL.md ships in Codex via scripts/install-codex.sh. No tool-specific
divergence.
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.

