When working with AI coding agents like Claude, Amp, or others, each tool expects commands/prompts in specific locations (e.g., .claude/commands/). To avoid vendor lock-in and maintain a single source of truth, we can use an agent-agnostic approach.
Keep all command files in a vendor-neutral directory:
.agents/
└── commands/
├── research_codebase.md
├── create_plan.md
└── implement_plan.md
Use symlinks to expose commands where each agent expects them:
# For Claude
mkdir -p .claude
ln -sfn ../.agents/commands .claude/commands
Create a justfile recipe to set up symlinks:
# Symlink .agents/commands to .claude/commands for Claude compatibility
setup-claude:
mkdir -p .claude
ln -sfn ../.agents/commands .claude/commands
@echo "Symlinked .agents/commands → .claude/commands"
.agents/, gitignore agent-specific dirs
setup-amp:
mkdir -p .amp
ln -sfn ../.agents/commands .amp/commands
setup-all: setup-claude setup-amp
You may want to gitignore the agent-specific directories and only track the source:
# Agent-specific (symlinked)
.claude/
.amp/
# Source of truth (tracked)
!.agents/