# Home Repo

> Build or refresh a home repo for a multi-repository workspace, a route-only root AGENTS.md with one pointer line per repository, and audit each repository's own

- Skill: `ilexpwh/home-repo` (Agent Skill)
- Install (CLI): `npx get-skill add ilexpwh/home-repo`
- Raw SKILL.md: https://api.skillmd.com/api/skills/ilexpwh/home-repo/raw
- Safety review: pending
- Works with: any agent that reads SKILL.md (Claude Code, Claude.ai, Cursor, Codex, Windsurf, 60+ more)
- Category: Coding & Dev Tools
- Author: Ilexpwh (https://skillmd.com/u/ilexpwh)
- Updated: 2026-12-02
- Page: https://skillmd.com/skills/ilexpwh/home-repo

---

---
name: home-repo
description: Build or refresh a home repo for a multi-repository workspace, a route-only root AGENTS.md with one pointer line per repository, and audit each repository's own AGENTS.md for size and shape. Use when the user says home repo, index my repos, map the workspace, list all my repositories, which repo holds X, agents get lost across many repos, the root AGENTS.md or CLAUDE.md is too long or out of date, or clone missing repos. Not for changes inside one repository, or for machine, account and hook checks (istack-setup).
disable-model-invocation: true
argument-hint: "[workspace path]"
metadata:
  phase: workspace
---

# Home repo

Produce a route-only workspace index that tells an agent where each repository lives and what to read next, and an audit of every repository's `AGENTS.md`.

## When to use
- One folder holds many repositories, and agents search, guess or run git at the wrong root.
- The root `AGENTS.md` has grown into a manual, or repositories were added, moved or removed.
- The `afk-run` playbook needs a workspace map and none exists.

**Not for:** a change inside one repository (work in that repo), or profile, install and account checks (`../istack-setup/SKILL.md`).

## Steps
1. **Confirm the root and the limits.** The root is the folder sessions start in; ask if unclear. Until the human approves the plan in step 4 this is T0: read-only, no writes, no clones. Never open `.env`, key, credential or other secret files; read only `AGENTS.md`, `CLAUDE.md`, `README*` and git metadata. *Done when:* the root path is stated.
2. **Inventory the repositories.** Find every repository and linked worktree, three levels deep by default:
   `find ROOT -maxdepth 3 -name .git -not -path '*/node_modules/*'`
   Run git inside each one, never at the root: `git -C <path> remote get-url origin`, `git -C <path> log -1 --format='%cs %h'`, `git -C <path> branch --show-current`. A `.git` file, not a folder, marks a linked worktree. Take a one-phrase purpose from the first lines of its README or `AGENTS.md`. Compare with the existing root `AGENTS.md` and area files. *Done when:* you have a table: name | path | remote | last commit | repo or worktree | purpose | new, listed or missing.
3. **Audit each repository's `AGENTS.md`** against `../istack-mode/templates/agents-md.md`:
   - at most 6,000 bytes (`wc -c AGENTS.md`);
   - a map, not a manual: commands, directory map, repo-only rules, detail moved to `docs/` behind a pointer;
   - no global policy repeated from the root or the user's global instructions file;
   - `CLAUDE.md` is a symlink to `AGENTS.md`, or holds only `@AGENTS.md`.

   *Done when:* each repository has a verdict (ok, too big, manual, repeats policy, missing, unlinked) and a one-line fix.
4. **Show the plan and wait.** Present the inventory, the audit and the exact files you would write. Ask one numbered round, each with a recommended answer: repositories to leave out, area grouping, which repository fixes to include. *Done when:* the human approved, edited or declined the plan.
5. **Write the root index.** Fill `../istack-mode/templates/home-agents-md.md`. Keep its routing rules: sessions start here; run git and `gh` inside the owning repository; read a repository's `AGENTS.md` before changing it; clone a missing repository to its listed path when a task needs it; one worktree per feature on a `<type>/<slug>` branch. Then one line per repository:
   `- <name> (<what it is>): <path>. Clone from <remote> if missing.`
   Past about 20 repositories, group by area: the root keeps one line per area (`Billing: see areas/billing.md`) and `areas/<area>.md` holds that area's pointer lines. List linked worktrees under their repository, never as repositories. Shared workspace skills live here too, in `.claude/skills` or `.agents/skills`. Link `CLAUDE.md` with `ln -s AGENTS.md CLAUDE.md`, or a one-line `@AGENTS.md` where symlinks don't work. *Done when:* the root `AGENTS.md` and area files exist, each under 6,000 bytes, and `CLAUDE.md` resolves to the same text.
6. **Apply the approved repository fixes.** For each, work inside that repository on a `docs/agents-md` branch in its own worktree: trim to the template, move detail to `docs/`, add the `CLAUDE.md` link. Commit; leave pushing and PRs to the human. *Done when:* each fix is a commit on its branch, with its new byte count.
7. **Check the index resolves.** For every pointer line, the path exists, or `git ls-remote <remote> HEAD` succeeds for a missing one. Use the route the profile names (for example SSH only). *Done when:* every line resolves, or the failures are listed.

## Red flags
| If you're thinking | Do this instead |
|---|---|
| "I'll copy each repo's commands into the root so agents find them faster." | The root routes. Facts live in the owning repository. |
| "I'll run `git status` at the root." | The root is not the repository. Use `git -C <path>`. |
| "This `.env` would tell me what the service does." | Never open secret files. Read the README. |
| "I'll clone the missing repositories now." | Clone on demand, when a task needs one. |
| "That AGENTS.md is long but useful." | Over 6,000 bytes is a finding. Move detail to `docs/` and point to it. |
| "I'll push the AGENTS.md fixes." | Commit on a branch. The human pushes. |
| "The plan is obvious; I'll write while I ask." | Nothing is written before approval. |

## Verify
- [ ] Nothing was written before the human approved the plan.
- [ ] The root `AGENTS.md` has one pointer line per approved repository and no repository facts beyond the phrase.
- [ ] The root and each area file are under 6,000 bytes.
- [ ] `CLAUDE.md` resolves to `AGENTS.md` at the root and in each fixed repository.
- [ ] Every pointer line resolves (step 7).
- [ ] No secret file was opened and nothing was pushed.

## Reply
```
Home repo <root>: <n> repositories (<a> new, <m> missing, <w> worktrees); <k> areas or "no areas".
Index: <path> (<bytes> bytes). Areas: <paths or none>.
| Repository | AGENTS.md bytes | Verdict | Fix | Status |
Waiting on you: <numbered push commands per fixed branch; omit if none>.
```

## Credits
The home repo idea (one folder holding shared skills and a pointer line per repository, sessions starting there, one worktree per feature) is "The Home Repo Pattern" from AI Hero (aihero.dev). Treating `AGENTS.md` as a table of contents rather than a manual follows OpenAI's "Harness engineering".

