Skill sources
src/skills/loadSkillsDir.ts supports skills from several sources:
- user settings home directory
- project
.claude/skills - managed policy path
- plugins
- bundled skills
- MCP skill builders
File format
Skills are markdown-driven. The loader parses frontmatter and markdown content, then derives command-like metadata such as:- display name
- description
- allowed tools
- argument names
when_to_use- model override
- effort
- hooks
- execution context
Token budgeting
estimateSkillFrontmatterTokens() estimates skill cost from frontmatter only. That indicates the loader is intentionally trying to keep the main context small until the skill is actually invoked.
Paths and scoping
The loader supports path-scoped skills through frontmatter parsing. It also resolves symlinks viarealpath when deduplicating files, which helps avoid the same skill being loaded twice through overlapping paths.