{"slug": "my-skills-live-in-git-sm-puts-them-where-claude-looks", "title": "My Skills Live in Git. sm Puts Them Where Claude Looks.", "summary": "Developer Greg Herlein published a field report on `sm` (skills-mapper), a tool he wrote that maps 29 hand-written agent skills from a single git repository at `~/src/gherlein-bare-skills` into the directories each AI agent reads, such as `~/.claude/skills`, `~/.copilot/skills`, and the folders used by pi, omp (oh-my-pi) and his own Go fork pi-go. Herlein configures the mapping in one file, `~/.config/skills-mapper/agents.toml`, which declares the skill store and each agent's target path, so the agent folders hold only symlinks back to the repo. Herlein said the setup is \"very much a work in progress\" and has changed substantially since he first wrote about it in August.", "body_md": "My skills don’t live in `~/.claude/skills`. Not one of them. They live in a plain folder in a git repo that I own, and a little tool I wrote, [`sm` (skills-mapper)](https://github.com/gherlein/sm), maps them into wherever Claude Code (or any other agent) expects to find them. Here’s exactly how I run it, day to day, with real commands.\n\nskills-mapper: one central burrow, tunnels out to every agent.\n\nI’ve written about `sm` twice already: the [original “why”](https://blog.herlein.com/post/skills-mapper-sm/) back in August, and the [standards argument](https://blog.herlein.com/post/skills-are-the-new-man-pages/) behind it in October. This post isn’t either of those. This is the boring, practical one: how my skills are actually laid out on disk, what I type, and what comes back.\n\nOne big caveat up front: **all of this is very much a work in progress.** It’s how I’m doing it *today*. It has already changed a lot since August, and it’ll keep changing as I get more experience with it. Take it as a field report, not a recommendation carved in stone.\n\n## Why Not Just Put Them in ~/.claude/skills?\n\nBecause `~/.claude/skills` is Claude’s folder, not mine.\n\nThink about what a skill actually is. It’s a directory with a `SKILL.md` in it. It’s *code*, near enough: instructions an agent will follow with my permissions, on my machine, in my repos. I’ve got 29 of them that I wrote or adapted by hand, and they change every week as I learn what works and what doesn’t.\n\nCode goes in git. Full stop. I want history. I want to diff what I changed when a skill suddenly started misbehaving. I want to clone the whole library onto a new laptop in one command. I want to be able to say “that edit last Tuesday made it worse” and roll it back.\n\nNone of that happens if the canonical copy lives in a dot-folder owned by one vendor’s tool. And the minute I run a second agent, the “one vendor’s folder” approach falls apart entirely.\n\nAnd I run a lot of second agents. Claude Code is my daily driver, but I’m constantly playing with others: [pi](https://github.com/badlogic/pi-mono), [omp (oh-my-pi)](https://github.com/can1357/oh-my-pi) (I [raced omp against hax](https://blog.herlein.com/post/ai-agents-in-trenchcoats/) back in August), and agents I’ve been writing myself, like [pi-go](https://github.com/gherlein/pi-go), my Go fork that I [wrote about back in May](https://blog.herlein.com/post/how-agents-work/). (There are a couple more homegrown ones I haven’t blogged about yet. Soon.) Claude reads `~/.claude/skills`. Copilot reads `~/.copilot/skills`. pi and omp each read their own. My homegrown ones read wherever I told them to that week. Each of them has an opinion, and none of those opinions is “the repo Greg keeps his stuff in.”\n\nIf I want my `go-via-make` skill in all of them, the naive answer is five copies. Then I fix a bug in one, forget the other four, and spend an afternoon wondering why omp keeps running `go test` directly. That’s exactly the thing DRY (Don’t Repeat Yourself) is supposed to prevent. We’d never tolerate five copy-pasted copies of a function in a codebase. Why tolerate it for skills?\n\nSo: the repo is the truth. The agent folders are just views onto it.\n\n## The Layout\n\nHere’s what’s on my disk.\n\n```\n~/src/gherlein-bare-skills/          <- git repo, the skills I write by hand\n├── api-canary/SKILL.md\n├── build-autonomous/SKILL.md\n├── engineering-principles/SKILL.md\n├── go-via-make/SKILL.md\n├── test-as-guardrails/SKILL.md\n└── ... (29 in all)\n\n~/.claude/skills/                    <- Claude's folder: nothing but symlinks\n├── api-canary -> ~/src/gherlein-bare-skills/api-canary\n├── build-autonomous -> ~/src/gherlein-bare-skills/build-autonomous\n└── ...\n```\n\nOne repo, one target. That’s the whole system.\n\nThe whole thing is wired up in one small file, `~/.config/skills-mapper/agents.toml`. This is mine, verbatim:\n\n```\n[store]\npersonal = \"/home/gherlein/src/gherlein-bare-skills\"\n\n[agents]\nclaude-code = \"~/.claude/skills\"\n# copilot = \"~/.copilot/skills\"\n# hax = \"~/.config/hax/skills\"\n# pi = \"~/.pi-go/skills\"\n# oh-my-pi = \"~/.config/agents/skills\"\n# kit = \"~/.config/kit/skills\"\n```\n\n`[store]` lists extra folders `sm` reads skills *from*. The key (`personal`) is just a label. `[agents]` lists the folders it maps skills *into*. This snapshot happens to have only Claude Code switched on. When I pull pi, omp, or one of my own agents into an experiment, I uncomment its line (or add one; for my homegrown agents it’s just a name and a path) and sync. Every agent gets the exact same skills, linked to the exact same files. One copy, many agents. That’s the whole DRY payoff, and it’s the single most useful thing `sm` does for me.\n\n## Day to Day\n\nThe loop is three commands, and honestly I mostly run one of them:\n\n```\nsm sync --dry-run   # what would change?\nsm sync             # do it\nsm status           # is everything healthy?\n```\n\nHere’s what `sm status` says on my machine right now:\n\n``` bash\n$ sm status\nstore: 0 skills (/home/gherlein/.local/share/skills)\nstore: 29 skills (/home/gherlein/src/gherlein-bare-skills)\nclaude-code    owned=29 missing=0 unmanaged=0 dangling=0  /home/gherlein/.claude/skills\n```\n\nThat last line is the one I care about. `owned=29` means `sm` placed all 29 links. `missing=0` means nothing in the stores failed to make it into Claude’s folder. `unmanaged=0` means there’s nothing in there that `sm` didn’t put there. `dangling=0` means no links point at something I deleted. All zeros is healthy. Anything else is worth a look.\n\n(The first line is `sm`’s built-in default store, `~/.local/share/skills`. I don’t use it, so it sits there empty. Everything I care about lives in the repo.)\n\nAnd because every entry in `~/.claude/skills` is a symlink back into the repo, **edits show up instantly**. I open `~/src/gherlein-bare-skills/go-via-make/SKILL.md`, change it, save it, and the next Claude session sees the new version. No sync needed for an edit. A sync is only needed when the *set* of skills changes: something added, removed, or renamed.\n\n## Example: Writing a New Skill\n\nSay I keep fighting the same problem with how an agent writes commit messages, and I want to bottle the fix. I write the skill directly in the repo:\n\n```\ncd ~/src/gherlein-bare-skills\nmkdir commit-msg\n$EDITOR commit-msg/SKILL.md\n---\nname: commit-msg\ndescription: Write a conventional commit message for the staged changes.\n---\nRead `git diff --staged` and write a one-line conventional commit subject...\n```\n\nOne rule matters here: **the directory name has to match the `name` in the frontmatter.** `sm` is strict about that, on purpose. Then:\n\n``` bash\n$ sm sync\nsync: claude-code +1 -0\n$ git add commit-msg && git commit -m \"add commit-msg skill\" && git push\n```\n\nClaude has it now. So does every other machine I own, the next time I pull there. And if the skill turns out to be a bad idea, `git log commit-msg/` tells me exactly what I was thinking when I wrote it. (Usually something optimistic.)\n\n## Example: A New Machine\n\nThis is where keeping skills in git pays for itself. Fresh box, nothing on it:\n\n```\n# 1. get my skills\ngit clone git@github.com:gherlein/gherlein-bare-skills.git ~/src/gherlein-bare-skills\n\n# 2. get sm (Debian/Ubuntu; there's also Homebrew and go install)\narch=$(dpkg --print-architecture)\nver=$(curl -fsSLI -o /dev/null -w '%{url_effective}' https://github.com/gherlein/sm/releases/latest | sed 's|.*/v||')\ncurl -fLO https://github.com/gherlein/sm/releases/download/v${ver}/skills-mapper_${ver}_linux_${arch}.deb\nsudo apt install ./skills-mapper_${ver}_linux_${arch}.deb\n\n# 3. tell sm which agents I use (it asks y/N for each one it finds)\nsm probe\n\n# 4. point it at the repo: add a [store] line to agents.toml\n$EDITOR ~/.config/skills-mapper/agents.toml\n\n# 5. go\nsm sync\nsm status\n```\n\nFive steps, and Claude on the new box knows everything Claude on my old box knew. Pulling updates later is just:\n\n```\ngit -C ~/src/gherlein-bare-skills pull && sm sync\n```\n\nIf someone deleted a skill upstream (ok, if *I* deleted it upstream), the sync unlinks it from every agent. No stale copies hanging around in some folder I forgot about.\n\n## Example: Tools That Write Their Own Skills\n\nHere’s the part I’m most excited about. My newer command-line tools carry their own skill *inside the binary*. That’s the [Skill Self-Installation idea](https://blog.herlein.com/post/skills-are-the-new-man-pages/): the tool embeds a `SKILL.md` with `//go:embed` and answers two subcommands. `print-skill` dumps it to stdout. `install-skill` writes it to a folder as a proper skill directory. `sm` does it. So do [gogl](https://github.com/gherlein/gogl) (GL.iNet travel routers) and [gofi](https://github.com/gherlein/gofi) (UniFi controllers).\n\nThe neat thing is that the skill always matches the binary. Upgrade the tool, re-run `install-skill`, and the docs your agent reads are the docs for the version you actually have. No more agent confidently using a flag that went away two releases ago.\n\nWhere does it write? By default, the XDG store at `~/.local/share/skills`. But every one of these tools honors `SM_DEFAULT_STORE_DIR`, and **that can be any folder you want, including your git-backed skills repo:**\n\n```\nexport SM_DEFAULT_STORE_DIR=~/src/gherlein-bare-skills\n\ngogl install-skill   # writes ~/src/gherlein-bare-skills/gogl-cli/\ngofi install-skill   # writes ~/src/gherlein-bare-skills/gofi-cli/\nsm install-skill     # writes ~/src/gherlein-bare-skills/sm-cli/\nsm sync              # and now every agent has them\n```\n\nPoint it at the repo and the tool skills land right next to the ones I write by hand, under version control, mapped out to every agent by the same `sm sync`. (` sm` notices that the `[store]` entry and the default store are the same folder and reads it once. No double-counting.)\n\nOr don’t. If you’d rather not commit generated skills into git (and there’s a decent argument that you shouldn’t, the same way you don’t commit build output), leave `SM_DEFAULT_STORE_DIR` alone and let them land in `~/.local/share/skills`. `sm` reads both and treats them as one library either way. I go back and forth on which I prefer. Today I lean toward keeping them out of the repo, since the binary is the real source of truth. Ask me again in a month.\n\nTwo safety rails worth knowing. If a *different* skill with the same name is already there, `install-skill` refuses and exits `3` instead of clobbering it (`--force` overrides). And if the same skill name ends up in two stores, `sm sync` refuses to guess:\n\n```\nskill \"<name>\" is in more than one store: <path> and <path>; keep it in one store only\n```\n\nFail loud, change nothing. A tool that guesses is a tool that lies to you.\n\n## Example: Giving a Sub-Agent Only Some Skills\n\n`sm sync` maps *everything* into every agent. Sometimes I want the opposite: a one-shot run, or a sub-agent, that sees only the two or three skills it needs and nothing else. Every extra skill is more context to wade through and one more chance for the wrong one to fire.\n\nThat’s `sm map`. I name the skills, it links just those into a folder:\n\n```\nsm map ~/runs/review-42 go-code-quality test-as-guardrails\n# ... point the sub-agent at ~/runs/review-42 ...\nsm unmap ~/runs/review-42\n```\n\nIf I do it often, I write a profile once and reuse it:\n\n```\necho 'skills = [\"go-code-quality\", \"go-testing-tools\", \"test-as-guardrails\"]' \\\n  > ~/.config/skills-mapper/profiles/go-review.toml\nsm map --profile go-review ~/runs/review-43\n```\n\n## Example: Containers\n\nA container can’t follow a symlink into my home directory. It points nowhere inside the box. So for anything isolated, I have `sm` place real copies instead, under a different home:\n\n```\nsm sync --agent-home ~/containers/worker --copy\n```\n\nThat writes real directories into `~/containers/worker/.claude/skills/`, which I mount as the container’s home. Change a skill, run it again to refresh. Same repo, same skills, no copy-paste.\n\n## What Changed Since August\n\nIf you read the [first `sm` post](https://blog.herlein.com/post/skills-mapper-sm/), you’ll notice this doesn’t look like what I described back then. Fair. Back then `sm` had a `skills.toml` manifest with git URLs in it, and `sm` itself cloned and pulled them.\n\nI ripped that out. It was the wrong layer.\n\nGit is already a perfectly good tool for fetching git repos. I don’t need `sm` to be a worse one. Now `sm` doesn’t fetch anything. It reads folders and maps them. *I* decide how those folders get populated, and for me that’s just `git clone` and `git pull`. The tool got smaller and the whole thing got simpler. That’s usually the right direction.\n\n## What Can Go Wrong\n\nBeing honest about the sharp edges:\n\n**Claude Code signed in with a claude.ai account loads more than what `sm` places.** Your account’s synced skills, plugins your org pushes, and Claude’s own built-ins all show up on top. `sm` delivers my repo to Claude just fine, but it can’t make Claude see *only* my skills. For the everyday case I don’t care. For a “this run gets exactly these skills” experiment, it matters, and it’s a Claude thing, not an `sm` thing.\n\n**Real directories block links.** If you already have hand-made folders in `~/.claude/skills`, `sm` will not overwrite them. It warns and skips. That’s the safety model working (it only ever touches what it made), but it means a first migration needs you to move the old folder aside. `ms ~/.claude/skills` copies the existing ones into the store first so you don’t lose anything.\n\n**Linux only, tested.** macOS builds. I haven’t tested it. Windows isn’t supported.\n\n## What’s Next: Too Many Skills?\n\nHere’s the thing that’s starting to nag at me. Twenty-nine skills, all mapped into every Claude session, everywhere. Plus whatever the claude.ai account brings along. That’s a lot.\n\nEvery skill’s name and description gets loaded so the agent can decide when to use it. More skills means more of that up-front context, and more chances for the wrong one to fire. Does Claude really need `go-usb` and `postgresql` when I’m editing a Hugo blog post? It does not. When I’m in a Go repo, I want the Go skills. In a React repo, the frontend ones. In this blog, almost none of them.\n\nSo I’m thinking about breaking the library up into groups and mapping skills *dynamically, per project*: dropping just the right subset into the place the agent looks for project-level skills (`.claude/skills` in the repo, for Claude) instead of fanning everything out globally. `sm map` and profiles already do most of the mechanical work. What’s missing is the “decide which profile this project gets” part, and how that should hook into starting an agent.\n\nI don’t have that figured out yet. More on that later. (See: work in progress.)\n\n## Conclusion\n\nThe idea is almost embarrassingly simple: your skills are code, so keep them in git like code, and let a tiny tool handle the last mile into whatever folder each agent insists on. One repo is the truth. `~/.claude/skills` is just a set of pointers. Edit once, every agent sees it.\n\nWhat I’d still like: agents reading a shared store directly, so the mapping step disappears altogether. Until then, `sm sync` is the bridge.\n\nAnd I’ll say it one more time: this is a WIP. The layout, the tool, and my opinions about both are subject to change as I rack up more miles with it. That’s kind of the point. If I’m still doing it exactly this way in six months, I probably stopped learning.\n\nIf you want to try it, [grab `sm`](https://github.com/gherlein/sm) and point it at your own skills repo. I’ve also published [a snapshot of my skills folder](https://github.com/gherlein/gherlein-bare-skills) if you want a starting point. Read before you install. Several of them assume my setup (a Makefile in every project, Debian, my own GitHub account for releases).\n\nIf you’ve got a better way to manage skills across agents, or you think git is overkill for this, drop me a note on LinkedIn: [linkedin.com/in/gherlein](https://www.linkedin.com/in/gherlein/).", "url": "https://wpnews.pro/news/my-skills-live-in-git-sm-puts-them-where-claude-looks", "canonical_source": "https://blog.herlein.com/post/my-skills-live-in-git/", "published_at": "2026-12-04 08:00:01+00:00", "updated_at": "2026-12-04 23:14:17.265559+00:00", "lang": "en", "topics": ["ai-agents", "ai-tools", "developer-tools"], "entities": ["Greg Herlein", "sm (skills-mapper)", "Claude Code", "GitHub Copilot", "pi", "omp (oh-my-pi)", "pi-go"], "also_reported_by": [], "takeaway": "Keep agent skills as a single git-tracked directory of SKILL.md folders and symlink them into each agent's expected path via a per-agent config file, so one edit propagates to Claude Code, Copilot, pi and omp instead of five drifting copies.", "recommendation": {"advice": "Store skills once in a git repo and use a mapper config to symlink them into each agent's skills folder, so a fix reaches every agent instead of leaving stale copies.", "playbook": "agent-architecture", "playbook_url": "https://wpnews.pro/playbooks/agent-architecture"}, "alternates": {"html": "https://wpnews.pro/news/my-skills-live-in-git-sm-puts-them-where-claude-looks", "markdown": "https://wpnews.pro/news/my-skills-live-in-git-sm-puts-them-where-claude-looks.md", "text": "https://wpnews.pro/news/my-skills-live-in-git-sm-puts-them-where-claude-looks.txt", "jsonld": "https://wpnews.pro/news/my-skills-live-in-git-sm-puts-them-where-claude-looks.jsonld"}}