Dino Lindlau

how to setup series — part 3: a home repo for agentic coding

in part 1 and part 2 i set up the terminal. this part is about what i start in it most often now: a coding agent. i use claude code, and i always start it in the same folder, ~/Code/home.

my work is spread over a lot of repos: internal projects at my employer and the repos of several clients. an agent started in one of them only sees that one. it doesn’t know that the infrastructure lives two folders away, which commit style the other repo uses or where i keep my notes.

so i followed the home repo pattern by matt pocock. it’s one repo with no product code in it, only instructions, pointers to the other repos, shared docs and shared skills.

what’s in it

~/Code/home
AGENTS.md            # always loaded: rules and the index of repo areas
CLAUDE.md            # one line: @AGENTS.md
repos/               # one pointer file per owner
docs/                # coding standards, glossary, decisions
wiki/                # notes and runbooks
todos/               # one file per open todo
.agents/skills/      # shared skills
.claude/skills/      # symlinks to the same skills, where claude code looks
skills-lock.json     # where each skill came from, and at which commit

claude code reads CLAUDE.md. mine only imports AGENTS.md, the file name most other coding agents look for, so the instructions aren’t tied to one tool.

the file every session reads

here’s a smaller version of my AGENTS.md. the owner names are examples.

AGENTS.md
# Home

This repo is where every agent session starts. It holds no product code, only
instructions, pointers to the other repos, shared docs and shared skills.

## How to work

- Do product work in the target repo, never in this repo.
- Before changing a repo, read its own `AGENTS.md`. Repo rules beat the defaults here.
- Use one worktree per feature, next to the main checkout.
- Paths use `~`. The home folder differs per machine, but the
  `~/Code/<owner>/<repo>` layout is the same.
- If a repo in `repos/` is missing locally, clone it to the listed path.
- Never open, print or commit `.env` files or anything in `~/.ssh`.
- Commit and push only when asked, unless the target repo's instructions say otherwise.

## Other repos

Grouped by owner. Open only the file for the area you need:

- Employer (platform, internal infrastructure, team skills) → `repos/employer.md`
- Acme (client: Azure landing zone) → `repos/acme.md`
- Globex (client: data platform on Databricks) → `repos/globex.md`

this file is loaded into every session, so i keep it short. the pattern puts one pointer per repo directly into AGENTS.md and suggests one file per area once there are more than about 20 repos. i’m past that, so the index only names the owners and the agent opens the one file it needs.

a pointer is three facts

repos/acme.md
# Acme (client)

- **azure-landing-zone**: Terraform for the Azure landing zone.
  `~/Code/acme/azure-landing-zone`. Clone from
  `git@github.com:acme/azure-landing-zone.git`.
  Read its AGENTS.md first (commit prefixes, changes only through pull requests).

each entry says what the repo is, where it lives and where to get it if it’s missing. some have a hint on top, like the last line here. the rules of a single repo stay in that repo’s own AGENTS.md. the home repo only says that they exist and that they win.

because every pointer has a clone url, a new machine needs two commands. the agent clones the other repos when it needs them.

Terminal
git clone git@github.com:<you>/home.git ~/Code/home
cd ~/Code/home && npx skills experimental_install

skills, installed once

a skill is a folder with a SKILL.md that tells the agent how to do one job. the ones i use book my working hours, prepare the work briefing for the day and keep terraform code in one style. the files exist once, in .agents/skills/. claude code looks in .claude/skills/, which only holds symlinks to them.

i install them with the skills cli:

Terminal
npx skills add <owner/repo> -s <skill> -a claude-code -y   # add a skill
npx skills update -p -y                                     # update installed skills

skills-lock.json records the source repo and the commit of every skill, so each machine gets the same versions. i write my own skills in a separate repo and install them here like any other. the home repo only holds the pinned copies.

letting the agent leave the folder

an agent started in ~/Code/home has to be able to edit the repos next to it. that’s a setting in the home repo:

.claude/settings.json
{
  "permissions": {
    "additionalDirectories": ["~/Code"]
  }
}

so a session starts like this:

Terminal
cd ~/Code/home && claude

it fills up on its own

the line about wiki/ in my full AGENTS.md says: add to it when you learn something worth keeping. in its first week the repo got more than a hundred commits, and most of them are an agent writing down something it found out, like which account a repo needs or where a client keeps its terraform state. the next session starts with that already known.