rail-setup
Skill5 starsChanged 4 months agoMITView on GitHub
Configure a repo for rail skills — all docs under docs/monorail/ (work tracker + domain). Run once per repo before other rail engineering skills.
In this repository12 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- rail-alignSkill
- rail-buildSkill
- rail-debugSkill
- rail-grillSkill
- rail-passSkill
- rail-reviewSkill
- railSkill
- rail-sliceSkill
- rail-specSkill
- rail-tddSkill
The file
We split this skill into the rules it gives an agent
6 rules. About 0 are common, 4 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈4
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 20
Read what exists; do not assume:
- Distinctive: line 37
Write immediately after presenting — no confirmation, no waiting for edits.
- Very specific: line 43
Skip what already exists: if docs/monorail/work-tracker.md / docs/monorail/domain.md — or the ## Agent skills block — is already there …
- Distinctive: line 47
If either file already has the block, leave both untouched and report where it lives
- Distinctive: line 50
If neither exists, create AGENTS.md — do not ask
- Very specific: line 61
Write docs/monorail/work-tracker.md and docs/monorail/domain.md from the templates in this skill folder.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 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
Rail Setup
Scaffold per-repo configuration that rail engineering skills assume:
- Everything under
docs/monorail/— work tracker, glossary, ADRs, and convention files (no remote tracker; no scatter to repo root /docs/agents//docs/adr/) - Domain docs —
docs/monorail/CONTEXT.md+docs/monorail/adr/
This is prompt-driven, not a deterministic script. Explore, present, then write — never pause to ask the user to confirm the plan.
Process
1. Explore
Read what exists; do not assume:
AGENTS.md/CLAUDE.md— either present? Already has## Agent skills?docs/monorail/— already in use? Check with the shell (ls -R docs/monorail, orls/test -fper file):work-tracker.md/domain.md/CONTEXT.md/adr/. Search tools skip gitignored paths — an empty Glob/Grep result is not evidence the directory is unused- Legacy scatter (migrate hint only, do not auto-move): repo-root
CONTEXT.md/CONTEXT-MAP.md,docs/adr/,docs/agents/ - Monorepo signals (
pnpm-workspace.yaml, packageworkspaces, populatedpackages/*)
2. Present
Summarise present vs missing. Then:
Doc root — state that rail keeps all docs under docs/monorail/ only. Show templates at templates/work-tracker.md and templates/domain.md (relative to this skill). Use the default root (docs/monorail/); adjust path wording only if the user explicitly asks for a non-default root. If they insist on a remote tracker, refuse for rail skills and stop — rail v1 is local-only. If legacy paths exist, tell the user to move them under docs/monorail/ manually (do not rewrite their content in this skill).
Domain docs — default single-context (docs/monorail/CONTEXT.md + docs/monorail/adr/). Offer multi-context only when exploration found monorepo signals (docs/monorail/CONTEXT-MAP.md; per-context paths still under docs/monorail/).
3. Write
Write immediately after presenting — no confirmation, no waiting for edits. Show each draft as you go, then report what was written. The pieces to write:
## Agent skillsblock forCLAUDE.mdorAGENTS.mddocs/monorail/work-tracker.md(from template, path adjusted if needed)docs/monorail/domain.md(from template)
Skip what already exists: if docs/monorail/work-tracker.md / docs/monorail/domain.md — or the ## Agent skills block — is already there (confirmed with the shell), leave it untouched, report it as already present, and write only the missing pieces. Never overwrite an existing tracker or domain doc.
Pick file for Agent skills block:
- If either file already has the block, leave both untouched and report where it lives
- Else if
AGENTS.mdexists, edit it - Else if
CLAUDE.mdexists, edit it - If neither exists, create
AGENTS.md— do not ask - Never create both
Agent skills block (adapt if work root changed) — include these bullets verbatim in the target file:
- Heading:
## Agent skills - Line: This repo uses rail skills. All rail docs live under
docs/monorail/. - Bullet: Work tracker:
docs/monorail/work-tracker.md - Bullet: Domain docs:
docs/monorail/domain.md - Line: Run
/rail-setupagain only if these conventions change. Prefer/railto see the main flow.
Write docs/monorail/work-tracker.md and docs/monorail/domain.md from the templates in this skill folder. Create docs/monorail/ if needed. Do not create CONTEXT.md / adr/ until /rail-align needs them.
Completion
Done when both convention files exist under docs/monorail/, the Agent skills block is present, and you told the user they can start with /rail-align or /rail.
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.

