packages/skills/README.md
Bundled skills and skill loading utilities for elizaOS agents.
Skills are markdown files that provide specialized instructions for AI agents to perform specific tasks. Each skill contains:
npm install @elizaos/skills
# or
pnpm add @elizaos/skills
import { getSkillsDir } from "@elizaos/skills";
const skillsPath = getSkillsDir();
// Returns absolute path to bundled skills directory
import { loadSkills, loadSkillsFromDir } from "@elizaos/skills";
// Load from all default locations (bundled + managed + project)
const { skills, diagnostics } = loadSkills();
// Load from a specific directory
const result = loadSkillsFromDir({
dir: "/path/to/skills",
source: "custom",
});
import { formatSkillsForPrompt } from "@elizaos/skills";
const prompt = formatSkillsForPrompt(skills);
// Returns XML-formatted skills section for system prompt
import { loadSkillEntries, buildSkillCommandSpecs } from "@elizaos/skills";
const entries = loadSkillEntries();
const commands = buildSkillCommandSpecs(entries);
// Returns array of command specs for chat interfaces
Skills are loaded from multiple locations in precedence order (later overrides earlier):
skills/)~/.elizaos/skills/)<cwd>/.elizaos/skills/)skillPaths optionSkills are markdown files with YAML frontmatter:
---
name: my-skill
description: A brief description of what this skill does
primary-env: node
required-bins:
- node
- npm
---
# My Skill
Detailed instructions for the AI agent...
| Field | Type | Description |
|---|---|---|
name | string | Skill name (should match directory name) |
description | string | Human-readable description (required) |
disable-model-invocation | boolean | If true, skill won't appear in prompts |
user-invocable | boolean | If false, can't be invoked via commands |
primary-env | string | Primary runtime (node, python, etc.) |
required-os | string[] | Required operating systems |
required-bins | string[] | Required binaries in PATH |
required-env | string[] | Required environment variables |
Skill - Loaded skill with metadataSkillFrontmatter - Parsed frontmatterSkillEntry - Full skill entry with all metadataLoadSkillsResult - Result from loading skillsgetSkillsDir() - Get bundled skills pathloadSkills(options?) - Load from all locationsloadSkillsFromDir(options) - Load from single directoryloadSkillEntries(options?) - Load with full metadataformatSkillsForPrompt(skills) - Format for LLM promptbuildSkillCommandSpecs(entries) - Build command specsMIT