Core Concept
The central idea is prompt composition:- Agents define “who” the AI is (personality, specialization, tone)
- Skills define “what” it should know/follow (rules, knowledge, compliance)
Benefits
Reusability
Skills can be shared across multiple agents
Versioning
.md files can be versioned in Git
Collaboration
Teams can share agents and skills
Consistency
Coding style rules applied automatically
Specialization
Create agents for Go, Python, DevOps, etc.
Dispatch as Worker
Custom agents are automatically registered in the multi-agent system and can be dispatched via
agent_call by the LLMRemote Server
When connecting to a server, remote agents and skills are automatically discovered and merged with local ones
Directory Structure
Files are stored in the~/.chatcli/ directory:
Agent File Format
Agents are Markdown files with YAML frontmatter:tools Field — Multi-Agent Integration
The tools field in the YAML frontmatter is the key to integration with the multi-agent orchestration system. It defines which commands the agent can use when dispatched as a worker by the orchestrator LLM.
| Tool in YAML | @coder Command(s) | Description |
|---|---|---|
Read | read | Read file contents |
Grep | search | Search for patterns in files |
Glob | tree | List directories |
Bash | exec, test, git-status, git-diff, git-log, git-changed, git-branch | Command execution and git operations |
Write | write | Create/overwrite files |
Edit | patch | Precise editing (search/replace) |
Example without the tools field
This agent will be registered as read-only in the multi-agent system (only
read, search, tree).Skill File Format
Skills contain pure knowledge or compliance rules:Skills V2 — Packages with Subskills and Scripts
In addition to V1 skills (single.md file), ChatCLI supports Skills V2: directories containing multiple documents and executable scripts.
V2 Skill Structure
Subskills
.md files inside the skill directory (except SKILL.md) are registered as subskills. When the agent is dispatched as a worker, the subskill paths appear in the worker’s system prompt, which can read them with the read command as needed.
Scripts
Files inscripts/ are registered as executable skills in the worker. The system automatically infers the execution command based on the extension:
| Extension | Inferred Command |
|---|---|
.sh | bash script.sh |
.py | python3 script.py |
.js | node script.js |
.ts | npx ts-node script.ts |
.rb | ruby script.rb |
| Others | ./script (direct execution) |
exec command and their results return to the worker for processing.
Skills from Remote Registries
In addition to creating skills manually, you can search and install skills from remote registries with the/skill command:
Skills installed via registry are saved in
~/.chatcli/skills/<name>/SKILL.md as V2 packages and are immediately available for use with agents. ChatCLI supports multiple simultaneous registries (ChatCLI.dev, ClawHub, corporate registries) with parallel fan-out search. See Skill Registry for full details.Dispatch as Worker (Multi-Agent)
When starting/coder or /agent, all custom agents are automatically registered in the multi-agent orchestration system. The orchestrator LLM can then dispatch them via <agent_call>:
What the Worker Receives
When dispatched, the CustomAgent executes with:Personalized system prompt
Includes the agent content (markdown body), loaded skills, subskill paths, script commands, and tool_call instructions
End-to-End Example
Management Commands
All management commands are integrated into/agent:
| Command | Description |
|---|---|
/agent | Shows active agent status and help |
/agent list | Lists all available agents |
/agent status | Lists only attached agents (summary) - alias: attached/list-attached |
/agent load <name> | Loads a specific agent |
/agent attach <name> | Attaches an additional agent to the session |
/agent detach <name> | Removes an attached agent |
/agent skills | Lists all available skills |
/agent show [--full] | Shows the active agent with example prompts (use —full to display everything) |
/agent off | Deactivates all currently activated agents |
/agent <task> | Executes a task in agent mode |
Prompt Assembly Order
When an agent is loaded, the system prompt is assembled in the following order:
This order ensures that the AI receives context in a structured manner.
Complete Practical Example
1. Create an agent
Create the file~/.chatcli/agents/python-data.md:
2. Use the agent
Agent and Skill Precedence (Project > Global)
Both agents and skills support per-project directories with precedence over global ones. ChatCLI automatically detects the project root by searching for a.agent/ or .git/ directory starting from the current directory.
Search Order
| Resource | 1. Project (priority) | 2. Global (fallback) |
|---|---|---|
| Agents | ./.agent/agents/*.md | ~/.chatcli/agents/*.md |
| Skills | ./.agent/skills/ | ~/.chatcli/skills/ |
Project Structure
Integration with /coder
When an agent is loaded:/agent <task>— Uses the agent’s persona/coder <task>— Combines the agent’s persona with the coder prompt
@coder tools to edit files, run tests, etc.
Tips
Start Simple
Create agents with few skills and add more as needed.
Version in Git
Keep your agents and skills in a repository.
Share with the Team
Coding style skills ensure consistency.
Use Clear Descriptions
Helps understand the purpose of each agent/skill.
Test the Prompt
Use
/agent show to see how the assembled prompt looks.Useful Skill Examples
- clean-code - Clean code principles
- error-handling - Error handling patterns
- testing-patterns - Automated testing patterns
- docker-master - Best practices for Dockerfiles
- clean-scripts - Patterns for secure Bash scripts
- aws-security - AWS security rules
- team-conventions - Team-specific conventions
Remote Agents and Skills
When connected to a ChatCLI server viachatcli connect, the client automatically discovers agents and skills available on the server. They are transferred to the client and composed locally, allowing merging with local resources.
Provisioning via Kubernetes
- Helm
- Operator
ConfigMaps are mounted at
/home/chatcli/.chatcli/agents/ and /home/chatcli/.chatcli/skills/, and are available for automatic remote discovery.