/agent skills.
Concepts
| Concept | Description |
|---|---|
| Registry | A remote server hosting searchable and installable skills |
| Skill | A SKILL.md file with YAML frontmatter defining specialized agent behavior |
| Snapshot | Complete skill package (SKILL.md + scripts/ + references/ + assets/) downloaded atomically |
| Fan-out Search | Parallel search across all enabled registries with merged results |
| Qualified Name | Directory name prefixed with source (e.g. anthropics-skills--frontend-design) to avoid collisions |
| Moderation | Safety flags (malware, suspicious content) provided by registries |
| Security Audits | Partner security assessments (Gen Agent Trust Hub, Socket, Snyk) via skills.sh |
| Trigram Cache | Local fuzzy cache that avoids network requests for similar queries |
Default Registries
ChatCLI ships with three registries:| Registry | URL | Type | Description |
|---|---|---|---|
| chatcli | https://registry.chatcli.dev/api/v1 | REST API | Official ChatCLI registry |
| clawhub | https://clawhub.ai/api/v1 | REST API | Public skills marketplace (ClawHub) |
| skills.sh | https://skills.sh | Snapshot API | Open agent skills directory (Vercel/Anthropic) |
skills.sh
skills.sh is the open agent skills directory, compatible with 30+ agents (Claude Code, Cursor, Codex, Gemini CLI, etc.). Skills hosted on GitHub are indexed with installation metrics and security audits. ChatCLI consumes 3 skills.sh APIs:- Search API — fuzzy search with install counts
- Download API — pre-packaged snapshots with all skill files
- Audit API — partner security assessments (ATH, Socket, Snyk)
/skill Commands
Search Skills
(214K installs)— install count (skills.sh)[installed](green) — skill installed from that registry[installed from other source](yellow) — same-name skill exists from another source[SUSPICIOUS]/[BLOCKED]— moderation flags
Install Skill
--from resolves the ambiguity:
Uninstall Skill
List Installed Skills
Skill Info
--from, prioritizes the registry with richest data (skills.sh with installs and security). With --from, queries only that registry.
Manage Registries
Source Preferences
| Priority | Condition |
|---|---|
| 1 (highest) | User preference via /skill prefer |
| 2 | Project-local skill (.agent/skills/) |
| 3 | Global local skill (~/.chatcli/skills/exact-name/) |
| 4 | Global registry skill (~/.chatcli/skills/source--name/) |
Pin Skills for the Session (/skill pin)
When you want a skill considered on every turn of the conversation — regardless of whether the message matches its triggers: or paths: — pin it with /skill pin. The skill stays injected in the system prompt until you /skill unpin it or end the session.
- Injects the skill into a dedicated
# Pinned Skillsblock in the system prompt, before the# Auto-loaded Skillsblock. Onmodel:/effort:hint conflicts, pinned beats auto-activation (but loses to a manual/<skill-name>invocation). - The pinned block carries
cache_control: ephemeral— the provider keeps the cache warm across turns as long as the pinned set doesn’t change. - Auto-activation still runs: if a skill is pinned and matches by
triggers:/paths:, it’s injected exactly once (deduplicated by name). - Skills uninstalled/renamed during the session silently drop from the set on the next turn (re-resolved through the persona manager).
/skill listshows[pinned]next to pinned skills.
- Skills with
disable-model-invocation: truecannot be pinned — the flag exists precisely to forbid automatic injection. Use manual/<skill-name>for those. - The pinned set is session-scoped; it does not persist across chatcli runs (by design — pinning expresses current-session intent).
How to Activate a Skill: Three Modes
| Mode | Trigger | Scope | Required frontmatter |
|---|---|---|---|
| Auto-activation | triggers: (substring keyword) or paths: (glob against input paths) matches | per-turn (re-evaluated each message) | triggers: or paths: (without disable-model-invocation: true) |
Manual /<skill-name> | User types /<name> | single-turn | user-invocable: true |
Pin /skill pin <name> | User pinned explicitly | whole session | any (except disable-model-invocation: true) |
model:/effort: hint precedence when multiple modes fire on the same turn:
Help
Namespace and Collisions
How Skills Are Stored on Disk
Registry skills use qualified names to avoid collisions:-- separator is safe because the agentskills.io spec forbids consecutive hyphens in skill names.
Users Never Need to Type Qualified Names
Daily usage is transparent:Configuration
Registries File
~/.chatcli/registries.yaml controls the registries:
Preferences File
~/.chatcli/skill-preferences.yaml stores source preferences:
/skill prefer — no manual editing needed.
Environment Variables
| Variable | Description |
|---|---|
CHATCLI_REGISTRY_URLS | Additional registry URLs (comma-separated) |
CHATCLI_REGISTRY_DISABLE | Registry names to disable (comma-separated) |
CHATCLI_SKILL_INSTALL_DIR | Install directory (default: ~/.chatcli/skills) |
Security and Moderation
Moderation Flags
| Flag | Behavior |
|---|---|
malware_detected | HARD BLOCK — installation refused automatically |
quarantined | HARD BLOCK — skill quarantined by registry |
suspicious_content | WARNING — shows warning and asks for confirmation |
Security Audits (skills.sh)
For skills.sh skills,/skill info shows security assessments from three partner providers:
| Provider | Assessment |
|---|---|
| Gen Agent Trust Hub (ATH) | Overall risk level (safe/low/medium/high/critical) |
| Socket | Security alert count |
| Snyk | Dependency risk analysis |
https://add-skill.vercel.sh/audit with a 3-second timeout — failures are silent (advisory data, never blocks).
Atomic Installation
Skills are installed using atomic writes:- Content downloaded to temporary directory (
.tmp-*) - YAML frontmatter validated
- Moderation flags checked
- Scripts receive executable permission
sourceandsnapshot_hashfields injected into frontmatter- Directory atomically renamed to final destination
- On failure, temporary directory is automatically removed
Search Cache (Trigram)
ChatCLI implements a trigram-based fuzzy cache to reduce network calls:| Parameter | Default |
|---|---|
| Max size | 50 entries |
| TTL per entry | 5 minutes |
| Similarity threshold | 0.7 (Jaccard) |
| Eviction | LRU (Least Recently Used) |
Architecture
Packages
| Package | File | Responsibility |
|---|---|---|
pkg/registry/ | interface.go | Types: SkillMeta, SnapshotFile, InstalledSkillInfo |
manager.go | Fan-out search, Install, InstallFrom, GetAllSkillMeta | |
installer.go | Install, InstallFromSnapshot, qualified names, FindInstalled | |
skillssh_registry.go | skills.sh adapter (Search, Download, Audit, enrichMeta) | |
skill_preferences.go | Source preferences per skill | |
config.go | Configuration, mergeDefaultRegistries | |
moderation.go | Safety flags | |
trigram.go | Fuzzy search cache | |
cli/ | skill_handler.go | /skill commands (search, install, info, prefer, registry) |
skill_activation.go | Auto-activation by triggers and paths | |
skill_invoke.go | Manual invocation via /<skill-name> | |
cli_completer.go | Contextual autocomplete | |
pkg/persona/ | loader.go | GetSkill (preference + qualified resolution), ListSkills (dedup) |
Next Steps
- Customizable Agents — How to create and use agents with skills
- Command Reference — Complete list of all commands
- Configuration (.env) — Available environment variables