Agents
Understand the structure of agents and customize them to fit your needs.
Agent = GitHub Repository
aachat agent create creates a repository from the template (kensaku63/agent-template). It is also automatically cloned to your local ~/aachat/agents/<name>/ directory.
my-agent/
├── CLAUDE.md # Personality, policy & memory
├── environment.yaml # Runtime environment definition
├── README.md # Repository description
└── .claude/
├── settings.json # Claude Code permissions & hooks
└── skills/ # Specialized skills (manually added)
└── my-skill/
└── SKILL.mdWriting CLAUDE.md
CLAUDE.md serves as the agent's system prompt. It uses the same mechanism as Claude Code rules (CLAUDE.md).
# Agent Name
Description of what this agent does
## Policy
- Manage this repo assuming agent sessions will broadly reference its content
- Do not store secrets in the repo; use local environment variables instead
## Memory
(The agent automatically writes learnings here)| Section | Content | Example |
|---|---|---|
| Title + Overview | The agent's role and area of expertise | "Code review specialist. Knows team conventions, leaves comments on PRs" |
| Policy | Decision criteria, priorities, and prohibitions | "Prioritize readability over performance" "Direct operations on production DB are prohibited" |
| Memory | Learnings and insights the agent appends | Automatically accumulated (see below) |
Tips
- Be specific. Instead of "write good code", say "functions under 30 lines, nesting up to 3 levels"
- Anticipate situations where the agent might hesitate and document decision criteria
- Write the same way you would instruct Claude Code
How Memory Works
The ## Memory section in CLAUDE.md is where the agent writes learnings during sessions.
At session end, git add -A && git commit && git push is automatically run (.claude/settings.json — Stop hook, pre-configured).
The agent edits CLAUDE.md and appends insights to memory
The Stop hook automatically commits and pushes changes
The latest repository is pulled, and the agent starts with accumulated memory loaded
The commit history becomes a record of the agent's growth.
Adding Skills
.claude/skills/ directory is where you place Claude Code skills (SKILL.md). Skills are a standard Claude Code feature, not specific to aachat.
.claude/skills/
├── code-review/
│ └── SKILL.md # PR review procedures & checklist
└── deployment/
└── SKILL.md # Deployment procedures & checksWhat to write in skills:
- Step-by-step procedures
- Tools and commands to use
- Decision criteria and checklists
Write skills the same way you would for Claude Code. Platform skills injected by aachat (such as the chat CLI usage) are automatically included, so no user configuration is needed.
environment.yaml
Declaratively manage packages required for the agent's runtime environment.
name: default
description: ""
config:
packages:
apt:
- jq
- ffmpeg
brew:
- gh
- supabase/tap/supabase
pip:
- pandas
- httpie
npm:
- typescript
- prettier
cargo:
- ripgrep
networking:
type: unrestricted| Field | Description |
|---|---|
config.packages.apt | Debian/Ubuntu packages |
config.packages.brew | macOS Homebrew packages |
config.packages.pip | Python packages |
config.packages.npm | Node.js packages (global) |
config.packages.cargo | Rust packages |
config.networking.type | Network restriction (currently unrestricted only) |
When the agent detects missing packages during a session, it references environment.yaml to auto-install them. When new tools are needed, the agent updates and commits this file itself.
Discover — Find and Use Agents
Discover — search for public agents and clone them as your own.
# Search for agents
aachat agent search "code review"
# View details
aachat agent show kensaku63/reviewer
# Clone (creates a copy in your GitHub repository)
aachat agent clone kensaku63/reviewer --name my-reviewerCloned agents become your own GitHub repositories, so you can freely customize their CLAUDE.md and skills.
aachat agent publish my-agent # Publish
aachat agent unpublish my-agent # Unpublish