Two stow packages, plus personal plugins. Preview with stow -nvt ~ claude agents;
drop the -n to apply. See Setting up a new machine.
~/.claude pieces worth carrying between machines: settings.json, hooks/plan-file-allow.sh,
CLAUDE.md. CLAUDE.md is a symlink into the agents package: Claude Code reads only
CLAUDE.md, so that name has to exist, but nothing is maintained here. Skills live in
skill-packs/ (below).
Deliberately not tracked: .credentials.json (OAuth token), history.jsonl and projects/
(prompts and conversation transcripts). settings.json must stay free of secrets (this repo is
public): no env block with tokens. A secret belongs to the project that uses it, in that
project's git-ignored .env or mise.local.toml.
Not portable: the alex-local marketplace path in settings.json is absolute
(/home/alex/dev/dotfiles/claude-plugins), so clone this repo to ~/dev/dotfiles.
Plugins themselves are reinstalled from enabledPlugins and extraKnownMarketplaces.
Hooks installed by other tools (herdr) and skills symlinked in by omarchy or swamp are not
tracked.
The single source for instructions shared by every agent CLI:
.agents/AGENTS.md: global instructions.~/.claude/CLAUDE.md,~/.codex/AGENTS.mdand~/.config/opencode/AGENTS.mdare symlinks to~/.agents/AGENTS.md(install.shmakes the last two; they are outside the stow packages).
Skills are not global. Each pack is a folder of skills (my own, or symlinks to where a tool keeps
its skills) that an opencode.json turns on for one directory tree with
"skills": ["~/dev/dotfiles/skill-packs/<pack>"]. Config is merged from / down to the working
directory, so a pack listed in ~/dev/opencode.json applies to every repo below it.
| Pack | Turned on by |
|---|---|
| dev | ~/dev/opencode.json (every repo below it) |
| go | ~/dev/riverschurch, ~/dev/17xande.dev, ~/dev/tools, ~/dev/libraries, ~/dev/forks, ~/dev/worktrees (the folders holding Go repos) |
| cloudflare, basecamp | ~/dev/riverschurch/opencode.json |
| ipad | ~/dev/17xande.dev/opencode.json |
| swamp | ~/dev/tools/opencode.json |
| desktop (omarchy, omarchy-contribute, omarchy-diagnose-crash, superwhisper) | ~/.config/opencode/opencode.json (the global config; ~/.config/opencode.json is not read) |
| desktop-make (omarchy-make-*, omarchy-plugin-dev) | ~/dev/dotfiles/opencode.json |
The opencode.json files are tracked in opencode-configs/ (global.json, dev.json, riverschurch.json);
install.sh symlinks them into place. The pack folders link into repos that skill-sources.sh clones
(~/dev/tools/{cloudflare-skills,basecamp-cli,swamp} and the private ~/.swamp/workspaces/claude-skills, which is
17xande/swamp-web-factory). Basecamp and swamp skills are linked via ~/.local/share/agent-skills/.
Tool-installed skill folders (basecamp, swamp) were moved to ~/.local/share/agent-skills/, and so were
two stale copies of the Claude app's synced skills that sat in ~/.agents/skills/synced
(~/.local/share/agent-skills/synced/; they made pi print collision warnings). OpenCode also reads the app's
live sync, ~/.claude/skills/synced/, which provides docx, pdf, pptx, xlsx, skill-creator, deep-research and
others globally. The global config denies the ones that need Claude's own connectors or browser tools
(built-in-browser, chrome-browser, computer-use, google-workspace, docs, morning, import-memory) so
they stay out of the prompt (about 1.4k tokens). The only global skills are herdr, the desktop pack and what the
app syncs.
~/.agents/skills/omarchy* and ~/.claude/skills/omarchy* are empty placeholder folders: they
stop Omarchy migrations (omarchy-agent-skills-link) from linking its skills back in globally.
Claude Code does not read the skills config key, so it sees only the global skills.
-
Clone to
~/dev/dotfiles(thealex-localmarketplace path is absolute) and installstow,mise,gh. -
./install.sh: stowsclaudeandagents, links the Codex/OpenCode instructions, the OpenCode plugin and theopencode-configs/*.jsonfiles. It refuses to overwrite a real file: move the old one aside and re-run. Stow also stops on files from the previous layout (for example an old~/.claude/hooks/plan-file-allow.shsymlink): delete those and re-run. -
./skill-sources.sh: clones the skill sources the packs link into (the last one is private and needs GitHub SSH). -
Placeholder folders so Omarchy migrations do not link its skills back in globally:
mkdir -p ~/.agents/skills/{omarchy,omarchy-contribute,omarchy-diagnose-crash,omarchy-make-app,omarchy-make-game,omarchy-make-plugin,omarchy-make-theme,omarchy-plugin-dev}and the same under~/.claude/skills/. -
Cloudflare:
mise use -g npm:cf, then one auth profile per account, bound to a directory tree:cf auth create riverschurch && cf auth activate riverschurch ~/dev/riverschurch cf auth create 17xande && cf auth activate 17xande ~/dev cf auth whoami # run it in each tree to check
The nearest bound parent wins. Never set
CLOUDFLARE_API_TOKENglobally: it overrides every profile. There are no Cloudflare MCP servers; agents usecf(and thecloudflareskill pack). -
Secrets stay out of this repo: put a project's tokens in its git-ignored
.env.
A personal Claude Code plugin marketplace (alex-local), not a stow package. Add it with
claude plugin marketplace add ~/dev/dotfiles/claude-plugins, then
claude plugin install deno-lsp@alex-local. deno-lsp is a language-server plugin; deno lsp
is force-enabled (initializationOptions.enable) so it also covers Node projects.
Personal OpenCode plugins, not a stow package. ./install.sh links
opencode-plugins/restart-claude-agent to
~/.config/opencode/plugins/restart-claude-agent; existing directories must be moved
aside first. OpenCode discovers the server and TUI parts from that directory.
restart-claude-agent adds two token-free Ctrl+P actions:
- Restart Claude agent (this session): refuses busy sessions and stops only the current session's Claude process.
- Restart Claude agents (ALL sessions on this server): asks for confirmation and includes busy sessions and subagents.
Replacement processes use Omarchy's active Claude account. Other running processes
keep their account until replaced. Neither action restarts the OpenCode service.
This plugin requires Linux /proc, Omarchy's account commands, and OpenCode 2.3.0's
plugin API. It does not contain credentials or account state.
Run the non-destructive tests with a recent Node.js supporting TypeScript stripping
and node:module.registerHooks (verified with Node.js 26):
node --test opencode-plugins/restart-claude-agent/test/*.test.ts