← Library

Video learning playbook

The Home Repo Pattern: Run agents across ALL your repos

What this video is about

  • The problem is shared agent context across many repos. Copying skills and tooling into every repo means keeping 30 to 40 copies in sync. Putting them in each person's user directory hides them, so they drift from the team setup.
  • The fix is a home repo. One ordinary repo holds the skills, steering files, versioned settings, wiki and custom tooling. You always start the agent there, and it reaches out to the other repos.
  • The links to other repos are plain paths in AGENTS.md or CLAUDE.md. On a fresh machine the agent clones a missing repo, and parallel agents each get a git worktree, so setup is close to zero.
  • Matt says a flat list of repos works up to about 40. Past that, group the pointers into front-end, back-end and internal docs files. He would still pick a monorepo first if the politics allowed it.
  • The bigger payoff is tooling. Matt's home repo hosts an LLM wiki and a wiki CLI that reaches Gmail, Slack, Discord, YouTube, GitHub, his calendar, AI Hero and Cold Turkey. That lets one session chain work across tools and repos.
  • His aihero.dev article includes a setup prompt. It inventories your repos and asks you the decisions in rounds, and it changes nothing until you approve its plan.

The multi-repo agent problem

Matt opens by saying he had been using this technique for a while and thought it was too boring and obvious to post about (00:00). He showed it in office hours for the live course group he was running that week, and people were surprised it could be so simple. He then posted it on X and it went nuts, so he decided people need to hear it.

One attendee's reply is on screen. They were skeptical of the format during office hours but are blown away by the results, given that they maintain 38 repositories (00:14). In their words, just cloning the repositories inside the agent repository and git-ignoring them works with no fancy technique. They also spent a night writing agent docs so the agent understands how their services connect.

The office-hours reply: skeptical at first, then blown away while maintaining 38 repositories. The post had 259.4K views. Screenshot at 00:21.

The problem is how you work with agents in many repos at once. Matt asks you to picture a typical organisation with lots of repos, each with its own concern: a storefront, a payments API, an admin dashboard, and 20 more you dip in and out of (00:28). Changing one repo is easy, since you just run the agent inside it. Changing two is still easy. If you are working in the storefront and realise the payments API needs a change too, the agent can work in multiple directories at once (00:50). You end up with a pull request in each repo, so two pull requests come out of the same session (01:04).

That part works. The hard part is everything you want the agent to have in every session: data, steering files, skills, tooling, AGENTS.md and maybe wiki links (01:16). The usual answer is to duplicate all of it into every repo, so any session starts with it. Matt calls that a massive pain, because you then have to keep the skills and tooling in sync across maybe 30 to 40 repos.

The other answer is to put the skills and tooling in each person's user directory, so every repo can reach them (01:48). But that setup is invisible to the person using it, so it does not get updated and will probably fall behind the team's setup. Matt also sees the user directory as the place where someone sets things up in a way that suits how they work, not how the team wants them to work (02:05). Neither option feels good, so people in multi-repo setups feel they have no good choice.

The home repo

Matt's answer is the home repo (02:20). One repo is the home for all of his skills, his steering files, a wiki and a lot of custom tooling. He always runs his agent inside the home repo, which is just a normal repo. From there the agent reaches the storefront and the payments API, works across many repos at once, and pulls in all the context it needs (02:44).

His X post sums it up. He runs the agent in the home repo, and AGENTS.md holds pointers to the other repos, written as plain instructions such as "For skills, clone mattpocock/skills to ~/repos/skills" (02:40). The post lists three benefits. You keep all your steering files and tooling in one place, you get a single spot to run all your agents in, and you can make sweeping changes over multiple repos.

Inside Matt's home repo

Matt then opens his real home repo, called personal-wiki, in VS Code (02:53). The top level mixes code and working data. There are folders for briefings, chief-of-staff, course-wikis, factory-app, fitness, loops, remote-box, state and the wiki. There are also hidden .claude, .sandcastle and .worktrees folders. The root files include CLAUDE.md, a GLOSSARY-MAP.md that points to one GLOSSARY.md per context, and Stryker config for mutation testing.

The first thing to look at is .claude/skills (03:05). These are private skills. Matt does not want to release them because they are extremely good and extremely sensitive to his business. Because they live in the home repo, every session has them. If your organization has a list of skills it wants everyone to use, you add them here (03:25).

The home repo also keeps settings versioned. If everyone runs a consistent agent from this repo, a change to its settings.json spreads across the whole organisation at once (03:32).

The structure comes from CLAUDE.md, or AGENTS.md (03:44). On screen, its first section teaches the agent Matt's wiki CLI. All source operations live behind one command, wiki <source> <verb>, and --help on a source or verb lists its flags, costs and guardrails. If the command is missing from PATH, the agent should run pnpm link --global from the main checkout, not a worktree.

A second section sets the rules for changes. Main is protected, so every code change lands through a PR that a human reviews, even a small fix. Data is the exception and commits straight to main, as with wiki hand edits, fitness logs and state files (03:46). The same section says the background jobs in .sandcastle/ can push only what a rules file allows each one.

Further down, an Other Repos section holds navigation pointers to the repos Matt touches day to day (03:50). Skill changes go to ~/repos/ai/skills. The Course Video Manager, probably his hottest repo by commit count, sits at ~/repos/matt/course-video-manager. Further lines point to the project repo for his live course group, the AI Coding Crash Course repo, Sandcastle, the AI Hero repo and the AI Hero OpenAPI docs. Matt stresses how plain the link is. Each one is just a path inside AGENTS.md (04:16).

The Other Repos section: one plain path per repo, with a hint where the copy may be stale. Screenshot at 03:50.

That plain path is enough for a fresh machine. If Sandcastle is not at its path, the agent clones it down. If several agents run at once, each one uses a worktree inside that same repo (04:20). Matt calls it basically zero setup, though you still do normal worktree cleanup as you go. To add another repo, he edits AGENTS.md and the new repo joins the same setup (04:34).

The Sandcastle line. If the folder is missing, the agent clones it there. Screenshot at 04:24.

Scaling it, and why not a monorepo

Matt thinks a flat list of pointers works for maybe 20 to 40 repos, but would not scale to 400 repos (04:42). For that size he adds progressive disclosure. AGENTS.md stops listing raw repos and points to group files instead: one for the front-end repos, one for the back-end repos and one for internal tooling. Each group file, such as docs/FRONTEND.md, then lists its own repos (04:55). The agent finds the right repo with simple file-system moves.

Progressive disclosure: AGENTS.md points to group files, and each group file points to its repos. Screenshot at 05:00.

He adds that he loves monorepos. He used to work at Vercel doing developer relations for Turborepo, and if everything could live in one repo he would put it there (05:15). But you can't always use a monorepo, especially with a mix of public and private repos (05:25). His advice is to move everything into one repo if you can. Most teams cannot, often for reasons of political will rather than technology, and then a home repo is the way to go.

The personal wiki and custom tooling

Matt's last point is that the home repo made him more ambitious with agent tooling (05:43). He calls his home repo his personal wiki, because it holds an enormous wiki of data that is sensitive to his business. It lives in the wiki folder and is essentially an LLM wiki in the Karpathy style, made of markdown files about things his audience finds interesting (05:55). Notes in wiki/audience cover topics like AI coding fatigue, context window management and a long run of gap notes. Matt queries the wiki for rich data that feeds course creation and content creation (06:12). He says he will cover how he generates it and how he keeps it up to date in a future video (06:30). With a home repo already in place, it was the obvious spot to house the wiki (06:40).

Then Matt admits he has been burying the lead, because the tooling matters most. Custom tools let the agent work with the services his business runs on (06:43). Running wiki --help in the repo lists them. Its own description calls it an ingest-source CLI that fetches, looks up and searches material across X, Gmail, Slack, Discord, YouTube and GitHub (06:48). The commands on screen run as follows:

  • x, gmail, slack, discord, youtube and github fetch and look up messages and comments.
  • gcal reads Google Calendar as obstacles and writes the day's plan.
  • aihero reads the AI Hero CMS.
  • todoist covers his tasks and shopping list.
  • coldturkey reads and tightens the Cold Turkey block named "Claude".
  • reports publishes one-off HTML reports straight to Vercel, with no git and no PR.
  • buffer reposts his own tweets to LinkedIn through Buffer.
  • skills-triage, fitbit, stacks, slides, cut, finance, factory, questions and sweep cover the rest of his work.

All of this grew organically because everything is in one place and he always starts in one location (07:13). That lets him chain work across tools and repos in one request. He can look up a message in Discord, go to the crash course repo and fix it there with his existing skills (07:20). Then the cvm skill for his Course Video Manager can edit the course itself (07:40). The skill folder holds a SKILL.md plus DIAGRAM-STYLE.md and DIAGRAMS.md. In Matt's words, the home repo becomes the tooling that links every part of the business, not only the code. It gives the agent rich data sources and rich tooling, so it does better work (07:50).

To set one up, Matt points to his article on aihero.dev, The Home Repo Pattern (08:00). It ends with a setup prompt. You paste it into a new agent session started in the folder that holds your repos (08:16). The agent then grills you about your setup, inventories the repos you care about and only then starts moving things into a home repo.

The prompt is strict about how the agent works. It looks up every fact itself with the file system, git and gh, and uses subagents for wide searches. It asks you the decisions in numbered rounds, each with a recommended answer that a plain "yes" accepts. It only reads until you approve its plan, and it leaves .env and other secret files unread. Step 1 finds every git repo under your home directory and records its path, remote, visibility and last commit date. The first round of questions asks:

  • which repos the home repo should point at
  • where the home repo should live (it recommends a new private repo)
  • whether the home repo is personal or shared with a team
  • which file your agent loads at session start: AGENTS.md, CLAUDE.md or both

Matt closes with a plug for his self-paced AI Coding Crash Course (08:22). He thought the pattern was too basic to post, but it turned out to solve real problems people have.

Tools and resources

Name What it is Where in the video
The Home Repo Pattern (article)Matt's write-up with the copyable setup prompt, https://aihero.dev/the-home-repo-pattern08:00
AGENTS.md / CLAUDE.mdSteering files the agent loads at session start; they hold the Other Repos pointers03:44
.claude/skillsFolder of skills (private to Matt) available in every session started in the home repo03:05
.claude/settings.jsonRepo-level agent settings, versioned with the repo03:32
mattpocock/skillsMatt's public skills repo, pointed to at ~/repos/ai/skills02:40
SandcastleMatt's repo, cloned on demand to ~/repos/ai/sandcastle04:20
Course Video Manager (CVM)Matt's course-video app and his most-committed repo; edited through the cvm skill04:05
wiki CLIMatt's own command line over X, Gmail, Slack, Discord, YouTube, GitHub, Google Calendar, AI Hero, Todoist, Cold Turkey, Buffer and more06:48
StrykerMutation-testing tool configured at the home repo root02:58
TurborepoVercel's monorepo build tool, where Matt worked in developer relations05:15
AI Coding Crash CourseMatt's self-paced course, plugged at the end08:22

Claims to verify

  • Project-level skills and settings load only when the agent starts in that repo. That is why the pattern says to always start in the home repo. If someone opens a session directly in storefront, the home repo's skills and settings are not there. Check this against your agent's docs before relying on it for a team.
  • "Settings spill out across your entire organisation immediately" assumes everyone pulls the home repo and starts their agent in it. A settings.local.json or user-level settings can still override it per person.
  • The 20 to 40 repo ceiling for a flat pointer list is Matt's estimate, not a measured limit.
  • The article URL in the description is https://aihero.dev/the-home-repo-pattern. Confirm it still serves the setup prompt shown at 08:16.
  • The attendee reply says the retro skill can spawn tickets across multiple repositories. That is their report, not something shown in the video.

Glossary

  • home repo: One ordinary git repo that holds the shared agent setup (skills, steering files, settings, wiki, tooling) and is the place every agent session starts.
  • AGENTS.md: A markdown file of standing instructions that coding agents read at session start; the cross-tool counterpart to CLAUDE.md.
  • CLAUDE.md: Claude Code's standing-instructions file, loaded at session start; Matt's holds the wiki CLI notes, change rules and Other Repos pointers.
  • steering files: Files that steer an agent's behaviour every session, such as AGENTS.md, CLAUDE.md and glossaries.
  • skill: A packaged instruction set (a folder with a SKILL.md) an agent can load for a specific kind of task.
  • private skills: Skills kept in the home repo and never published, because they encode business-sensitive know-how.
  • user directory: The per-person home folder (here ~/.claude) where an agent reads personal skills and settings for every repo.
  • settings.json: The agent's settings file; inside a repo's .claude/ folder it is versioned and shared with everyone who uses that repo.
  • settings.local.json: A per-machine settings file that sits beside settings.json and is meant to stay personal.
  • navigation pointer: A line in a steering file that tells the agent where another repo or doc lives, here just a path.
  • git worktree: A second working checkout of the same repo on another branch, so parallel agents do not trample each other's files.
  • worktree cleanup: Removing finished worktrees so stale checkouts do not pile up.
  • progressive disclosure: Showing the agent a short top-level index that points to more detailed files, instead of everything at once.
  • monorepo: One repository holding many projects or services.
  • Turborepo: A build system from Vercel for JavaScript and TypeScript monorepos.
  • pull request: A proposed change to a repo that gets reviewed before it merges; often shortened to PR.
  • office hours: A live Q&A session Matt runs for people taking his course.
  • git-ignore: Listing a path in .gitignore so git does not track it, used here to keep cloned repos out of the home repo's history.
  • LLM wiki: A folder of plain markdown notes kept so a language model can search and query it; the idea Andrej Karpathy popularised.
  • Karpathy: Andrej Karpathy, the AI researcher whose LLM-wiki idea Matt follows.
  • mutation testing: Testing your tests by deliberately changing the code and checking that some test fails.
  • Stryker: A mutation-testing framework for JavaScript and TypeScript.
  • GLOSSARY-MAP.md: Matt's root file that points to one GLOSSARY.md per domain context.
  • pnpm link --global: A pnpm command that makes a local package's command available on the PATH everywhere.
  • main checkout: The repo's primary working folder, as opposed to an extra worktree.
  • Sandcastle: A repo of Matt's that his home repo points to and clones when missing; its pipelines also run from the .sandcastle/ folder.
  • Course Video Manager: Matt's app for producing course videos (CVM), his most active repo.
  • Cold Turkey: A website and app blocker; Matt's CLI can read and tighten its "Claude" block.
  • Buffer: A social-media scheduling service Matt uses to repost tweets to LinkedIn.
  • ingest-source CLI: A command line tool whose job is to pull material from outside services into the wiki.
  • subagent: A helper agent the main agent starts for a side task such as a wide search, so the main context stays small.
  • harness: The agent program itself (Claude Code, Codex and so on), which decides which steering file loads at session start.
  • OpenAPI: A standard machine-readable description of an HTTP API; Matt points his agent at AI Hero's.
  • WSL: Windows Subsystem for Linux, which Matt's VS Code connects to.

Personal recommendations

Write an Other Repos pointer map for the fleet

Source
03:50
Demonstration
Matt's CLAUDE.md has an Other Repos section with one line per repo: a label, a path, and a hint where a copy is likely stale.
System value
Anthony's code is spread over many repos in ~/Projects, linked to vault projects only by Code repo: lines. A session started in one place cannot find a sibling repo without searching. One pointer file with a line per active repo, grouped by kind, would let any session or fleet child find the right repo by path.
Proposed form
Reference. A grouped repo index (client sites, internal tools, fleet, courses) linked from the global CLAUDE.md.
Target project
alexana-workspace

Add clone-if-missing pointers so the VPS box can self-provision

Source
04:20
Demonstration
A pointer reads as an instruction, so on a fresh machine the agent clones a missing repo to its path and uses a worktree per parallel agent.
System value
Fleet children on the VPS box need repos at known paths. Writing each pointer as "if missing, clone <remote> to <path>" turns the pointer map into setup steps the agent runs itself, with no separate provisioning script to keep in sync.
Proposed form
Task. Extend the pointer map with remotes and a clone-if-missing rule, then test it on the box.
Target project
fleet-control

Run Matt's setup prompt read-only as an audit

Source
08:16
Demonstration
The prompt inventories every git repo under the home directory and asks the decisions in rounds. It only reads until the plan is approved.
System value
A free, read-only second opinion on how Anthony's repos and skills would be grouped. It shows which repos are stale, public or orphaned, without committing to a restructure.
Proposed form
Task. One attended session, stopped at the Step 3 plan.
Target project
alexana-workspace

Put a one-command front door over the agent's service tools

Source
06:48
Demonstration
Matt's wiki <source> <verb> CLI wraps every outside service. --help on each verb states its flags, costs and guardrails, and CLAUDE.md teaches the agent that one entry point.
System value
Anthony's service access is spread across gog, smscode.cjs, tool modules and per-project scripts. A single command whose help output carries cost and guardrail notes would cut the lookups each session does, and give one place to put the never-send-without-approval rule for email.
Proposed form
Build. A thin dispatcher over the existing CLIs, with per-verb help.
Target project
alexana-workspace

Split code changes from data commits in repos that mix them

Source
03:46
Demonstration
Matt's CLAUDE.md protects main for code, which always goes through a reviewed PR. Named data paths commit straight to main, and each background pipeline can push only what a rules file allows.
System value
Some of Anthony's repos hold both code and generated data, such as dashboards, leads and fleet state. Naming which paths are data that agents may commit directly, and which are code that needs review, gives unattended runs a clear line to stay inside.
Proposed form
Reference. A short rule block for repo CLAUDE.md files, rolled out to the repos where agents commit data.
Target project
fleet-control

Take this with you

Save the playbook to read later, or hand the raw notes to your favorite AI.

What's this?

The Markdown file (a .md file) is a plain-text copy of this whole playbook, written in the simple format AI chat tools read best. It keeps the headings, links, timestamps, and captions and drops all the page styling. Think of it as the raw notes behind this page, ready to hand to an assistant.

To use it, download the file and drag it into ChatGPT, Claude, or any AI chat (or just paste the text in), then ask for what you want: “Summarize this into a one-page cheat sheet,” “Turn these steps into a checklist I can follow,” or “Quiz me on the key ideas.” Because the file is already structured, the assistant works from the real content instead of guessing.