Shared, cross-agent setup for personal instructions, public skills, MCP
registrations, and small automation helpers. The repository is public; private
workflows remain in the sibling manager repository.
Clone this repository, then run the entry point for the current operating system:
| Platform | Command |
|---|---|
| macOS | ./scripts/setup-macos.sh |
| Linux | ./scripts/setup-linux.sh |
| Windows | powershell -NoProfile -ExecutionPolicy Bypass -File .\scripts\setup-windows.ps1 |
The setup script:
- Detects
codex,claude,opencode,gemini, andcopilotonPATH. - Links
AGENTS.MDinto the instruction path for each detected CLI. - Links public skills from
skills/into the registries those CLIs use. - Includes private skills from
../manager/skills/when that sibling checkout exists. - Merges public MCP registrations from
config/mcps.jsonwith the optional private../manager/config/mcps.jsonoverlay. - Verifies the resulting links and MCP entries, then reports drift.
- Saves the machine policy and installs post-pull drift checks in the
agentand optional siblingmanagercheckout.
It does not install agent CLIs. Re-running it is safe and is the normal way to repair a machine after adding a CLI or pulling new skills.
MCP synchronization uses the installed CLIs' native user-config commands. OpenCode is merged into its user JSON config because its MCP command is interactive. Node.js is required for this cross-platform MCP step; setup skips MCPs with a clear message when Node is absent.
For the usual private layout:
~/Projects/
├── agent/ public instructions, skills, and setup
└── manager/ private skills (optional)
~/AGENTS.md is always configured. Only detected CLIs receive additional
runtime-specific files unless --all-clis or an explicit CLI list is used.
| CLI | Instruction destination | Skill registry |
|---|---|---|
| Codex | ~/.codex/AGENTS.md |
~/.agents/skills/ |
| Claude | ~/.claude/CLAUDE.md |
~/.claude/skills/ |
| OpenCode | ~/.config/opencode/AGENTS.md |
~/.agents/skills/ |
| Gemini | ~/.gemini/GEMINI.md |
~/.agents/skills/ |
| GitHub Copilot | ~/.github/copilot-instructions.md |
~/.agents/skills/ |
Existing regular instruction files are preserved. Setup adds the canonical
AGENTS.MD pointer as their first line, leaving tool-managed sections such as
Recall blocks intact. On Windows, skill folders use directory junctions;
instruction setup falls back to a pointer file when symbolic-link creation is
unavailable.
Codex officially loads user skills from ~/.agents/skills/, supports symlinked
skill folders, and uses ~/.codex/AGENTS.md for global guidance. See the
OpenAI skill documentation and
AGENTS.md documentation.
macOS and Linux:
# Detect installed CLIs and configure them
./scripts/setup-macos.sh
# Verify without changing anything
./scripts/setup-macos.sh --check
# Configure every supported CLI, even if it is not on PATH
./scripts/setup-macos.sh --all-clis
# Configure an explicit subset
./scripts/setup-macos.sh --cli codex --cli claude
# Install only public skills
./scripts/setup-macos.sh --public-only
# Headless host: remove desktop browser MCPs
./scripts/setup-linux.sh --headless
# One read-only health command after setup
./bin/agent doctor
./bin/agent doctor --jsonUse setup-linux.sh with the same flags on Linux.
Windows PowerShell:
# Detect installed CLIs
powershell -NoProfile -ExecutionPolicy Bypass -File .\scripts\setup-windows.ps1
# Verify only
powershell -NoProfile -ExecutionPolicy Bypass -File .\scripts\setup-windows.ps1 -Check
# Configure all or an explicit subset
powershell -NoProfile -ExecutionPolicy Bypass -File .\scripts\setup-windows.ps1 -AllClis
powershell -NoProfile -ExecutionPolicy Bypass -File .\scripts\setup-windows.ps1 -Cli codex,claude
# Install only public skills
powershell -NoProfile -ExecutionPolicy Bypass -File .\scripts\setup-windows.ps1 -PublicOnly
# Headless Windows host
powershell -NoProfile -ExecutionPolicy Bypass -File .\scripts\setup-windows.ps1 -Headless
# Doctor (bin/agent is a shell shim, so call the Node entry point in PowerShell)
node .\scripts\agent-cli.mjs doctorExplicit CLI selection is useful when an executable is installed but is not on
the current shell's PATH.
git pull --ff-only
./scripts/setup-macos.sh # or setup-linux.sh
./bin/agent doctorOn Windows, run setup-windows.ps1 and then setup-windows.ps1 -Check.
Setup installs post-merge and post-rewrite hooks in both source
repositories without copying the shared checker. After a pull or rebase, the
hook runs agent doctor --quiet; healthy updates stay silent and drift prints
the explicit setup command to rerun. Existing unmanaged hooks are preserved and
reported instead of overwritten. The saved policy at
~/.config/agent/setup.json remembers public-only, headless, and CLI-selection
semantics for unattended checks.
agent doctor is read-only. It checks instruction and skill links, native MCP
registrations, launcher prerequisites, private OAuth-cache presence, saved
machine policy, and repository hooks. Human output is the default; --json is
stable for automation and --quiet emits only failures. Warnings do not change
the successful exit status; drift or broken requirements exit 1, and invalid
usage exits 2.
Advanced low-level commands remain available:
# Skills only; defaults to shared + Claude registries
./scripts/sync-agent-skills.sh
./scripts/sync-agent-skills.sh --check
./scripts/sync-agent-skills.sh --registry shared --public-only
# Instructions only; defaults to home + detected CLIs
./scripts/sync-agent-instructions.sh
./scripts/sync-agent-instructions.sh --check
./scripts/sync-agent-instructions.sh --all-clis
./scripts/sync-agent-instructions.sh --cli codex --cli claude
# MCPs only; same CLI and private-overlay semantics
./bin/sync-agent-mcps
./bin/sync-agent-mcps --check
./bin/sync-agent-mcps --public-only --cli codex --cli claude
./bin/sync-agent-mcps --exclude chrome-devtools --cli codexSkill sync also removes legacy Codex links and byte-identical Paseo duplicates. A divergent managed directory is kept and reported instead of being deleted.
AGENTS.MD: canonical personal agent instructions.skills/: public reusable skills.../manager/skills/: optional private reusable skills.config/mcps.json: public MCP registrations managed by setup.../manager/config/mcps.json: optional private MCP overrides/registrations.~/.agents/skills/: neutral cross-agent user registry.~/.claude/skills/: Claude compatibility registry.
Downstream repositories should use this pointer as the first line of their own
AGENTS.MD, followed by genuinely repository-specific rules:
READ ~/Projects/agent/AGENTS.MD BEFORE ANYTHING (skip if missing).
Do not copy the full shared instruction body into downstream repositories.
scripts/committer: commit exactly the paths provided.scripts/docs-list.tsandbin/docs-list: list documented runbooks.bin/agent-mcp: launch shared MCP profiles;bin/sync-agent-mcpsregisters the managed subset across CLIs; seedocs/mcp-profiles.md.bin/agent doctor: audit the complete shared setup using the machine policy recorded by the platform setup script.browser/: browser automation helpers.tools.md: detailed desktop, browser, screenshot, and verification tooling.scripts/setup-agent-machine.sh: optional macOS workstation bootstrap for Edi's broadervmlab,guiport,abx,shotport, andprobeportfleet. It also runs the standard macOS agent setup.
- Keep setup and sync scripts dependency-free where practical and compatible with macOS Bash 3.2, current Linux Bash, and Windows PowerShell 5.1+.
- Preserve non-link files owned by users or other tools.
- Keep
scripts/committer,scripts/docs-list.ts, and other mirrored guardrail helpers byte-identical with downstream copies. - After changing setup behavior, test sync and
--checkin an isolated home before running it against a real profile. - Run
scripts/test-agent-setup.shfor the dependency-free setup regression suite.