Overview

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.

The Pattern

1. Store commands in a generic location

Keep all command files in a vendor-neutral directory:

.agents/
└── commands/
    ├── research_codebase.md
    ├── create_plan.md
    └── implement_plan.md

2. Symlink to agent-specific locations

Use symlinks to expose commands where each agent expects them:

# For Claude
mkdir -p .claude
ln -sfn ../.agents/commands .claude/commands

3. Automate with just

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"

Benefits

Extending for other agents

setup-amp:
    mkdir -p .amp
    ln -sfn ../.agents/commands .amp/commands

setup-all: setup-claude setup-amp

Gitignore consideration

You may want to gitignore the agent-specific directories and only track the source:

# Agent-specific (symlinked)
.claude/
.amp/

# Source of truth (tracked)
!.agents/

See also