my-ai-tools
AGENTS.md127 starsChanged 26 days agoMITView on GitHub
Monorepo for my-ai-tools — source-of-truth configs for 14+ AI coding assistants (Claude Code, OpenCode, Amp, Codex, Gemini, Antigravity, Cursor, Cline, Grok, etc.). It installs configs to ~/.claude/, ~/.config/opencode/, ~/.pi/, etc. and exports them back via generate.sh. Per-tool configs live in configs/<tool>/. Never run ./cli.sh without --dry-run first. Config validation runs automatically and warns on failures. macOS getcwd/directory issues can break bats on the host. Use a read-only sandbox: On the cloud VM bats is preinstalled — run bats tests/ directly.
- Installs packages
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about code style.
Of the AGENTS.md files we read, the 31,774 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository38 other files it gives its agents.
- wiki/AGENTS.mdAGENTS.md
- wiki/CLAUDE.mdCLAUDE.md
- accountable-engineeringSkill
- adrSkill
- babysit-prSkill
- blindspot-passSkill
- capability-experimentsSkill
- codemapSkill
- code-quality-reviewSkill
- code-reviewSkill
- commit-atomicSkill
- context-discoverySkill
- diagnosing-bugsSkill
- doc-searchSkill
- docs-updateSkill
- draft-pull-requestSkill
- git-contextSkill
- handoffsSkill
- implementation-loggerSkill
- implement-specSkill
- llm-wikiSkill
- orchestrating-fusionSkill
- pickupSkill
- plannotator-setup-goalSkill
- portless-localSkill
- prdSkill
- pr-reviewSkill
- prSkill
- qmd-knowledgeSkill
- quiz-meSkill
- ralphSkill
- retroSkill
- security-auditSkill
- slopSkill
- spec-interviewSkill
- tddSkill
- tmuxSkill
- visual-prSkill
The file
We split this AGENTS.md into the rules it gives an agent
5 rules. About 0 are common, 0 are distinctive, and 5 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- could be automatic: a setting could enforce it
- Very specific: line 29
Never run ./cli.sh without --dry-run first.
- Very specific: line 66
Re-exec guard: every entry point sources lib/require_bash.sh _before_ lib/common.sh.
- Very specific: line 70
PATH: never export PATH= directly — call ensure_dir_on_path "<dir>" (defined in lib/install-deps.sh, sourced by lib/install.sh).
- Very specific: line 95
Prefer git add <specific-files> over git add -A.
- Very specific: line 96
Never force-push, rewrite history, or run destructive resets without explicit approval.
≈ “Common” is an estimate: at least 1 in 5 of the 40,246 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Agent Instructions
What This Is
Monorepo for my-ai-tools — source-of-truth configs for 14+ AI coding assistants (Claude Code, OpenCode, Amp, Codex, Gemini, Antigravity, Cursor, Cline, Grok, etc.). It installs configs to ~/.claude/, ~/.config/opencode/, ~/.pi/, etc. and exports them back via generate.sh. Per-tool configs live in configs/<tool>/.
Essential Commands
bash -n cli.sh generate.sh lib/*.sh lib/install.sh # Syntax gate (CI runs this)
bash -n cli.sh generate.sh install.sh scripts/*.sh # CI gates this exact set
./cli.sh --dry-run # Preview install plan — ALWAYS run first
./cli.sh # Install configs into $HOME
./generate.sh --dry-run # Preview export
./generate.sh # Export local configs from $HOME back to repo
./scripts/sync-token-efficiency.sh --check # Verify profiles are in sync (exit 1 if stale)
biome check . # Format check (tabs, 120 width, double quotes)
biome check --write . # Format in place
bats tests/ # Run ALL functional tests locally
bats tests/cli.bats # Run a single test fileWorkflow
./cli.sh --dry-run → git diff → ./cli.sh → git diff → commitNever run ./cli.sh without --dry-run first. Config validation runs automatically and warns on failures.
cli.sh Flags
--dry-run— side-effect-free preview--backup/--no-backup— backup existing configs (auto-prompted interactively)-y/--yes— non-interactive; installs Amp, Pi, Codex, OpenCode, Claude, Grok, qmd, rtk, ctx, open-cursor, ai-switcher, open_code_review, and Plannotator, plus shared skills, applicable MCP/plugin config, and declared integration dependencies. ctx installs without history import. Auto-activated in CI/piped input. Other standalone catalog entries remain optional; user-memory stays opt-in.--with-tools=name,...— opt into extra catalog CLIs such as fx or cursor.--with-integrations— bundled config, plugins, skills, MCPs, and their prerequisites (default); can replace existing config.--without-integrations— standalone CLIs only; leaves existing config unchanged.--migrate-gemini— one-step Gemini→Antigravity CLI migration--rollback— restore from the most recent$HOME/ai-tools-backup-{timestamp}-v/--verbose— verbose logging-h/--help— print usage options and exit
Testing
- CI runs only:
bats tests/pr_*.bats tests/generate.bats tests/sh_reexec.bats - Running
bats tests/locally executes many more files (skill/tool-specific) that CI does NOT run — don't assume CI coverage is complete. bash -n cli.sh generate.shis the cheapest syntax check and is what CI gates on first.biome check .andconfigs/claude/hookstypecheck report pre-existing formatting/tsconfigdeviations (tsconfig omits node/dom libs). These are repo-state issues, not environment failures.pre-commit run --all-filesruns: trailing-whitespace, end-of-file-fixer, check-yaml, check-added-large-files, oxfmt.lib/modules must stay under 1000 lines —tests/pr_install_deps.batsenforces it.
macOS host: run bats via microsandbox
macOS getcwd/directory issues can break bats on the host. Use a read-only sandbox:
msb run -m 512M -v "$(pwd):/project:ro" ubuntu -- \
bash -c 'apt-get update -qq && apt-get install -y -qq bats && cd /project && bats tests/'On the cloud VM bats is preinstalled — run bats tests/ directly.
Shell Script Conventions (enforced in cli.sh, generate.sh, lib/)
- Re-exec guard: every entry point sources
lib/require_bash.shbeforelib/common.sh.common.shuses bash-only syntax (<(), arrays,${var//pat/repl}) that crashes undersh/dash. set -egoes after the re-exec guard.- Installer layout: per-tool installers live in
lib/install.sh; prerequisites (runtimes, formatters, MCP binaries) live inlib/install-deps.sh, whichlib/install.shmust source (source "$(dirname "${BASH_SOURCE[0]}")/install-deps.sh"). - New installers: register in the ordered
INSTALL_SEQUENCEtable incli.sh("<allowlist-key>:<installer>"). The-yallowlist matches the<allowlist-key>portion; extra tools must be optional. Do not add anotherif tool_allowedblock. - PATH: never
export PATH=directly — callensure_dir_on_path "<dir>"(defined inlib/install-deps.sh, sourced bylib/install.sh). - Dry-run: wrap every side-effecting command in
execute()/execute_quoted()(defined inlib/common.sh). Never run destructive commands directly. - Paths: use
$HOME/ relative. No absolute paths in configs or scripts. - Quote all variables, use
local, and uselog_info/log_success/log_warning/log_errorfor output.
Key Gotchas
cli.shauto-detects installed tools and skips missing ones — it won't install configs for tools you don't have.generate.shexports from$HOMEto the repo; it only copies tools it finds installed.--yesin CI/non-TTY shells can install the default CLIs (Amp, Pi, Codex, OpenCode, Claude, Grok, qmd, rtk, ctx, open-cursor, ai-switcher, open_code_review, Plannotator) and integration dependencies over the network and copy config/skills. Use--without-integrationsfor standalone CLIs only. To exercise config copy deterministically, source the script and call its copy functions against a throwawayHOME:H=$(mktemp -d); mkdir -p "$H/.cursor" "$H/.config/opencode" "$H/.codex" ( export HOME="$H" DRY_RUN=false YES_TO_ALL=false; source ./cli.sh; copy_configurations ) find "$H" -type f # verify configs landedcopy_claude_configsalways runs; other tools only copy when detected. Do NOT run copy functions withset -u—lib/common.shreferences optional vars likeMSYSTEM.- MCP servers come from the central registry
configs/mcp-registry.json. Prefer it over the legacy fallback. - Configs are validated with
jqbefore install; failures warn but don't block (unless you decline the prompt). safe_copy_dir()(lib/common.sh) auto-excludesnode_modules,cache,*.sqlite, etc.- The
## Token Efficiencysection inconfigs/**/AGENTS.mdandconfigs/**/GEMINI.mdis generated fromconfigs/token-efficiency.md. Edit the canonical file and run./scripts/sync-token-efficiency.sh— the profiles stay standalone on purpose, since eager@file.mdimports cost tokens every session. - Backups go to
$HOME/ai-tools-backup-{timestamp}; last 5 are kept. - Gemini CLI is deprecated for Google One/unpaid tiers (June 18, 2026 cutoff). Migrate to Antigravity CLI.
Git Safety
- Prefer
git add <specific-files>overgit add -A. - Never force-push, rewrite history, or run destructive resets without explicit approval. See
configs/git-guidelines.md.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

