/agent skills.
Concepts
| Concept | Description |
|---|---|
| Registry | A remote server that hosts searchable and installable skills |
| Skill | An .md file with YAML frontmatter that defines specialized behavior for agents |
| Fan-out Search | Parallel search across all enabled registries, with merged and deduplicated results |
| Moderation | Safety flags (malware, suspicious content) provided by the registries |
| Trigram Cache | Local fuzzy cache that avoids network requests for similar searches |
Default Registries
ChatCLI comes configured with two registries:| Registry | URL | Description |
|---|---|---|
| chatcli | https://registry.chatcli.dev/api/v1 | Official ChatCLI registry |
| clawhub | https://clawhub.ai/api/v1 | Public skill marketplace (ClawHub) |
/skill Commands
Search Skills
- Name, version, and author
- Source registry (
[chatcli],[clawhub], etc.) - Moderation flags (
SUSPICIOUS,BLOCKED) - Installation status (
[installed])
Install Skill
~/.chatcli/skills/<name>/SKILL.md.
- Skills with detected malware are blocked automatically
- Suspicious skills display a warning and ask for confirmation
- Already installed skills are updated (replaced)
- After installation, the skill is immediately available in
/agent skills
Uninstall Skill
List Installed Skills
Skill Information
View Configured Registries
Help
Configuration
Configuration File
The~/.chatcli/registries.yaml file controls the registries:
Environment Variables
| Variable | Description |
|---|---|
CHATCLI_REGISTRY_URLS | Additional registry URLs (comma-separated). Each URL is added as a custom registry. |
CHATCLI_REGISTRY_DISABLE | Registry names to disable (comma-separated). E.g., clawhub,chatcli |
CHATCLI_SKILL_INSTALL_DIR | Installation directory (default: ~/.chatcli/skills) |
Custom Registry
Any server that implements the standard REST API can be used as a custom registry:Expected Endpoints
| Endpoint | Method | Description |
|---|---|---|
/skills/search?q=<query> | GET | Search skills. Returns {"skills": [...]} or [...] |
/skills/<slug> | GET | Metadata for a specific skill |
/skills/<slug>/download | GET | Download the skill content |
Response Format (Search)
Authentication
Custom registries may require Bearer token authentication. Configure thetoken field in registries.yaml:
Security and Moderation
The skill registry system includes protections against malicious content:Moderation Flags
| Flag | Behavior |
|---|---|
malware_detected | FULL BLOCK — installation automatically refused |
quarantined | FULL BLOCK — skill quarantined by the registry |
suspicious_content | WARNING — displays a warning and asks for user confirmation |
Atomic Installation
Skills are installed using atomic writes:- Content is downloaded to a temporary directory (
.tmp-*) - YAML frontmatter is validated
- Moderation flags are checked
- Directory is atomically renamed to the final destination
- On failure, the temporary directory is automatically removed
Name Sanitization
Skill names are sanitized to prevent path traversal:- Converted to lowercase
- Spaces replaced with hyphens
- Slashes (
/) removed ..sequences removed
Search Cache (Trigram)
ChatCLI implements a trigram-based fuzzy cache to reduce network calls:How It Works
-
Trigram Extraction: The query is split into subsequences of 3 characters
"golang"→{"gol", "ola", "lan", "ang"}
-
Jaccard Similarity: For each cached query, calculates
J(A, B) = |A ∩ B| / |A ∪ B| -
Threshold: If J >= 0.7, cached results are returned
"golan"→ match with"golang"(J ~ 0.75)"python"→ no match with"golang"(J ~ 0.0)
Characteristics
| Parameter | Default Value |
|---|---|
| Maximum cache size | 50 entries |
| TTL per entry | 5 minutes |
| Similarity threshold | 0.7 |
| Eviction | LRU (Least Recently Used) |
Agent Integration
Skills installed via/skill install are automatically available to the agent system:
- Skills are installed to
~/.chatcli/skills/<name>/SKILL.md - The
Loaderin the persona system (pkg/persona) already scans this directory /agent skillslists both local skills and those installed via the registry- Agents can reference installed skills in their frontmatter:
Skill Precedence
| Priority | Location | Description |
|---|---|---|
| 1 (highest) | .agent/skills/ (project) | Project-local skills |
| 2 | ~/.chatcli/skills/ (global) | Skills installed via registry or manually |
Architecture
Packages
| Package | Responsibility |
|---|---|
pkg/registry/ | Interface, adapters, manager, cache, installer, moderation |
cli/skill_handler.go | /skill command handler |
pkg/persona/ | Local skill loader (unchanged) |
Next Steps
- Customizable Agents — How to create and use agents with skills
- Command Reference — Complete list of all commands
- Configuration (.env) — Available environment variables