2025-12-20 12:22:15 +01:00
---
summary: "Skills: managed vs workspace, gating rules, and config/env wiring"
read_when:
- Adding or modifying skills
- Changing skill gating or load rules
---
2026-01-04 14:32:47 +00:00
# Skills (Clawdbot)
2025-12-20 12:22:15 +01:00
2026-01-06 23:51:01 +01:00
Clawdbot uses ** [AgentSkills ](https://agentskills.io )-compatible** skill folders to teach the agent how to use tools. Each skill is a directory containing a `SKILL.md` with YAML frontmatter and instructions. Clawdbot loads **bundled skills** plus optional local overrides, and filters them at load time based on environment, config, and binary presence.
2025-12-20 12:22:15 +01:00
## Locations and precedence
2025-12-20 12:23:53 +00:00
Skills are loaded from **three** places:
2025-12-20 12:22:15 +01:00
2026-01-04 14:32:47 +00:00
1) **Bundled skills** : shipped with the install (npm package or Clawdbot.app)
2) **Managed/local skills** : `~/.clawdbot/skills`
2025-12-20 12:23:53 +00:00
3) **Workspace skills** : `<workspace>/skills`
2025-12-20 12:22:15 +01:00
2025-12-20 12:23:53 +00:00
If a skill name conflicts, precedence is:
2026-01-04 14:32:47 +00:00
`<workspace>/skills` (highest) → `~/.clawdbot/skills` → bundled skills (lowest)
2025-12-20 12:22:15 +01:00
2026-01-01 10:07:31 +01:00
Additionally, you can configure extra skill folders (lowest precedence) via
2026-01-04 14:32:47 +00:00
`skills.load.extraDirs` in `~/.clawdbot/clawdbot.json` .
2025-12-20 12:26:58 +00:00
2026-01-09 01:37:19 +01:00
## Per-agent vs shared skills
In **multi-agent** setups, each agent has its own workspace. That means:
- **Per-agent skills** live in `<workspace>/skills` for that agent only.
- **Shared skills** live in `~/.clawdbot/skills` (managed/local) and are visible
to **all agents** on the same machine.
- **Shared folders** can also be added via `skills.load.extraDirs` (lowest
precedence) if you want a common skills pack used by multiple agents.
If the same skill name exists in more than one place, the usual precedence
applies: workspace wins, then managed/local, then bundled.
2026-01-11 12:11:12 +00:00
## Plugins + skills
Plugins can ship their own skills (for example, `voice-call` ) and gate them via
`metadata.clawdbot.requires.config` on the plugin’ s config entry. See
[Plugins ](/plugin ) for plugin discovery/config and [Tools ](/tools ) for the tool
surface those skills teach.
2026-01-09 01:38:19 +01:00
## ClawdHub (install + sync)
ClawdHub is the public skills registry for Clawdbot. Use it to discover,
install, update, and back up skills. Full guide: [ClawdHub ](/tools/clawdhub ).
Common flows:
- Install a skill into your workspace:
- `clawdhub install <skill-slug>`
- Update all installed skills:
- `clawdhub update --all`
- Sync (scan + publish updates):
- `clawdhub sync --all`
By default, `clawdhub` installs into `./skills` under your current working
directory; Clawdbot picks that up as `<workspace>/skills` on the next session.
2025-12-20 12:22:15 +01:00
## Format (AgentSkills + Pi-compatible)
`SKILL.md` must include at least:
```markdown
---
name: nano-banana-pro
description: Generate or edit images via Gemini 3 Pro Image
---
```
Notes:
- We follow the AgentSkills spec for layout/intent.
- The parser used by the embedded agent supports **single-line** frontmatter keys only.
- `metadata` should be a **single-line JSON object** .
- Use `{baseDir}` in instructions to reference the skill folder path.
2025-12-20 17:31:09 +01:00
- Optional frontmatter keys:
2026-01-04 14:32:47 +00:00
- `homepage` — URL surfaced as “Website” in the macOS Skills UI (also supported via `metadata.clawdbot.homepage` ).
2025-12-20 12:22:15 +01:00
## Gating (load-time filters)
2026-01-04 14:32:47 +00:00
Clawdbot **filters skills at load time** using `metadata` (single-line JSON):
2025-12-20 12:22:15 +01:00
```markdown
---
name: nano-banana-pro
description: Generate or edit images via Gemini 3 Pro Image
2026-01-04 14:32:47 +00:00
metadata: {"clawdbot":{"requires":{"bins":["uv"],"env":["GEMINI_API_KEY"],"config":["browser.enabled"]},"primaryEnv":"GEMINI_API_KEY"}}
2025-12-20 12:22:15 +01:00
---
```
2026-01-04 14:32:47 +00:00
Fields under `metadata.clawdbot` :
2025-12-20 12:22:15 +01:00
- `always: true` — always include the skill (skip other gates).
2025-12-20 17:23:45 +01:00
- `emoji` — optional emoji used by the macOS Skills UI.
2025-12-20 17:31:09 +01:00
- `homepage` — optional URL shown as “Website” in the macOS Skills UI.
2026-01-01 22:23:23 +01:00
- `os` — optional list of platforms (`darwin` , `linux` , `win32` ). If set, the skill is only eligible on those OSes.
2025-12-20 12:22:15 +01:00
- `requires.bins` — list; each must exist on `PATH` .
2026-01-02 15:40:03 -08:00
- `requires.anyBins` — list; at least one must exist on `PATH` .
2025-12-20 12:22:15 +01:00
- `requires.env` — list; env var must exist **or** be provided in config.
2026-01-04 14:32:47 +00:00
- `requires.config` — list of `clawdbot.json` paths that must be truthy.
2026-01-01 10:07:31 +01:00
- `primaryEnv` — env var name associated with `skills.entries.<name>.apiKey` .
2025-12-20 17:50:29 +01:00
- `install` — optional array of installer specs used by the macOS Skills UI (brew/node/go/uv).
2025-12-20 13:33:06 +01:00
Installer example:
```markdown
---
name: gemini
description: Use Gemini CLI for coding assistance and Google search lookups.
2026-01-04 14:32:47 +00:00
metadata: {"clawdbot":{"emoji":"♊️","requires":{"bins":["gemini"]},"install":[{"id":"brew","kind":"brew","formula":"gemini-cli","bins":["gemini"],"label":"Install Gemini CLI (brew)"}]}}
2025-12-20 13:33:06 +01:00
---
```
2025-12-20 12:22:15 +01:00
2025-12-20 17:23:45 +01:00
Notes:
- If multiple installers are listed, the gateway picks a **single** preferred option (brew when available, otherwise node).
2026-01-04 14:32:47 +00:00
- Node installs honor `skills.install.nodeManager` in `clawdbot.json` (default: npm; options: npm/pnpm/yarn/bun).
2026-01-01 22:23:23 +01:00
- Go installs: if `go` is missing and `brew` is available, the gateway installs Go via Homebrew first and sets `GOBIN` to Homebrew’ s `bin` when possible.
2025-12-20 17:23:45 +01:00
2026-01-04 14:32:47 +00:00
If no `metadata.clawdbot` is present, the skill is always eligible (unless
2026-01-01 10:07:31 +01:00
disabled in config or blocked by `skills.allowBundled` for bundled skills).
2025-12-20 12:22:15 +01:00
2026-01-04 14:32:47 +00:00
## Config overrides (`~/.clawdbot/clawdbot.json`)
2025-12-20 12:22:15 +01:00
2025-12-20 12:23:53 +00:00
Bundled/managed skills can be toggled and supplied with env values:
2025-12-20 12:22:15 +01:00
```json5
{
skills: {
2026-01-01 10:07:31 +01:00
entries: {
"nano-banana-pro": {
enabled: true,
apiKey: "GEMINI_KEY_HERE",
env: {
GEMINI_API_KEY: "GEMINI_KEY_HERE"
}
},
peekaboo: { enabled: true },
sag: { enabled: false }
}
2025-12-20 12:22:15 +01:00
}
}
```
Note: if the skill name contains hyphens, quote the key (JSON5 allows quoted keys).
2026-01-01 10:07:31 +01:00
Config keys match the **skill name** by default. If a skill defines
2026-01-04 14:32:47 +00:00
`metadata.clawdbot.skillKey` , use that key under `skills.entries` .
2025-12-20 12:22:15 +01:00
Rules:
2025-12-20 12:23:53 +00:00
- `enabled: false` disables the skill even if it’ s bundled/installed.
2025-12-20 12:22:15 +01:00
- `env` : injected **only if** the variable isn’ t already set in the process.
2026-01-04 14:32:47 +00:00
- `apiKey` : convenience for skills that declare `metadata.clawdbot.primaryEnv` .
2026-01-01 10:07:31 +01:00
- `allowBundled` : optional allowlist for **bundled** skills only. If set, only
bundled skills in the list are eligible (managed/workspace skills unaffected).
2025-12-20 12:22:15 +01:00
## Environment injection (per agent run)
2026-01-04 14:32:47 +00:00
When an agent run starts, Clawdbot:
2025-12-20 12:22:15 +01:00
1) Reads skill metadata.
2026-01-01 10:07:31 +01:00
2) Applies any `skills.entries.<key>.env` or `skills.entries.<key>.apiKey` to
`process.env` .
2025-12-20 12:22:15 +01:00
3) Builds the system prompt with **eligible** skills.
4) Restores the original environment after the run ends.
This is **scoped to the agent run** , not a global shell environment.
## Session snapshot (performance)
2026-01-04 14:32:47 +00:00
Clawdbot snapshots the eligible skills **when a session starts** and reuses that list for subsequent turns in the same session. Changes to skills or config take effect on the next new session.
2025-12-20 12:22:15 +01:00
2026-01-09 02:21:17 +00:00
## Token impact (skills list)
When skills are eligible, Clawdbot injects a compact XML list of available skills into the system prompt (via `formatSkillsForPrompt` in `pi-coding-agent` ). The cost is deterministic:
- **Base overhead (only when ≥1 skill):** 195 characters.
- **Per skill:** 97 characters + the length of the XML-escaped `<name>` , `<description>` , and `<location>` values.
Formula (characters):
```
total = 195 + Σ (97 + len(name_escaped) + len(description_escaped) + len(location_escaped))
```
Notes:
- XML escaping expands `& < > " '` into entities (`&` , `<` , etc.), increasing length.
- Token counts vary by model tokenizer. A rough OpenAI-style estimate is ~4 chars/token, so **97 chars ≈ 24 tokens** per skill plus your actual field lengths.
2025-12-20 12:22:15 +01:00
## Managed skills lifecycle
2026-01-04 14:32:47 +00:00
Clawdbot ships a baseline set of skills as **bundled skills** as part of the
install (npm package or Clawdbot.app). `~/.clawdbot/skills` exists for local
2026-01-01 10:07:31 +01:00
overrides (for example, pinning/patching a skill without changing the bundled
copy). Workspace skills are user-owned and override both on name conflicts.
## Config reference
2026-01-10 14:51:21 -06:00
See [Skills config ](/tools/skills-config ) for the full configuration schema.
2025-12-20 12:22:15 +01:00
2026-01-06 23:51:01 +01:00
## Looking for more skills?
2026-01-07 02:04:02 +01:00
Browse [ClawdHub ](/tools/clawdhub ).
2026-01-06 23:51:01 +01:00
2025-12-20 12:22:15 +01:00
---