
I Built a CLI to Manage Claude Code Agents — Because Copy-Pasting .md Files Got Old Fast
If you use Claude Code, you know about custom agents . You drop a .md file into ~/.claude/agents/ and Claude gets a specialized persona — a backend reviewer, a security auditor, whatever you need. Problem: managing those files manually is tedious. Copy from a repo, rename, edit, delete the wrong one, reinstall after a machine wipe. Every time I wanted a new agent I was doing it by hand. So I built agentfile — a CLI that manages Claude Code agents the same way pip manages packages. What it does # List everything installed agentfile list # Create a new agent from template agentfile create security-reviewer -d "Reviews code for OWASP Top 10 issues" # Show an agent’s full content agentfile show security-reviewer # Install agents from a local directory or another project agentfile install ./team-agents/ # Delete one agentfile delete old-agent That’s the whole thing. It reads and writes ~/.claude/agents/*.md . No magic, no config file, no daemon. The template When you create a new agent, you
Continue reading on Dev.to Python
Opens in a new tab


