librecode supports Agent Skills as local, reusable instruction bundles.
Default roots are checked in priority order:
./.librecode/skills./.agents/skills~/.librecode/skills~/.agents/skills
A spec skill is a directory containing SKILL.md:
.librecode/skills/my-skill/SKILL.md
Skill discovery uses Agent Skills-compatible directories containing SKILL.md.
Duplicate skill names are resolved by discovery priority. Lower-priority duplicates produce diagnostics and are ignored.
Discovery honors .gitignore, .ignore, and .fdignore files found in scanned skill directories. Symlinked directories are followed through normal filesystem resolution and canonical paths are used for dedupe/cycle prevention.
Supported fields:
---
name: my-skill
description: Use when this workflow applies.
license: MIT
compatibility: Works with Agent Skills-compatible agents.
allowed-tools: Read Bash(git:*)
user-invocable: true
disable-model-invocation: false
metadata:
author: me
version: "0.1.0"
---Validation rules:
namedefaults to the parent directory when omitted.namemust be lowercasea-z,0-9, and hyphens only.namemust be at most 64 characters.nameshould match the parent directory name.descriptionis required and must be at most 1024 characters.compatibilitymust be at most 500 characters.allowed-toolsmay be either a spec string (Read Bash(git:*)) or a YAML string list.
librecode uses progressive disclosure:
- The system prompt advertises valid skill names, descriptions, and file paths.
- The model may read a skill file when it decides the skill applies.
- librecode also performs conservative auto-activation by matching the current user prompt against skill names and descriptions.
- Auto-activated skills have their full
SKILL.mdcontent injected into the request context, bounded to protect prompt size.
Auto-activation emits a skill_auto_activate lifecycle event for extensions.
Inside chat:
/skilllists discovered skills./skill <name>prints the fullSKILL.mdfor that skill.
CLI commands:
librecode skill list
librecode skill show my-skill
librecode skill validateThe current implementation is intentionally close to the published spec. Future work should focus on:
- better ignore-pattern parity for advanced
.gitignoresyntax; - explicit skill activation diagnostics in the TUI;
- optional enforcement/reporting of
allowed-toolswhen tool permissions become first-class.