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 get a structured template:
---
name: security-reviewer
description: "Reviews code for OWASP Top 10 issues"
---
## Identity
You are security-reviewer...
## Mission
...
## Workflow
1. Read the relevant files first.
2. Plan before executing.
3. Return a structured summary.
## Deliverables
- ...
## Success Criteria
- ...
The structure matters. Agents with clear missions and explicit success criteria perform better than "you are a helpful X" prompts. The template nudges you toward that.
Why agent management is actually a problem worth solving
agency-agents hit 1,400+ GitHub stars in 24 hours this week. 55 specialized agents across 9 divisions. The interest is real.
But 55 agents in a flat directory with no tooling is just chaos. You lose track of what you have. You copy files between machines incorrectly. You’re not sure what’s installed.
agentfile is the missing layer — not the agents themselves, but the system for managing them.
Install
pip install agentfile
Repo: LakshmiSravyaVedantham/agentfile
If you’ve been building a collection of Claude Code agents and managing them manually, this should save you time. The source is readable Python if you want to add commands.
Top comments (0)