ClaudeSkillsSkill

View as MarkdownOpen in Claude

Load Claude Code-style SKILL.md files as agent tools. Each SKILL.md file in the configured directory becomes a SWAIG function, with YAML frontmatter parsed for metadata.

Class: ClaudeSkillsSkill

Tools: Dynamically created from SKILL.md files (prefixed with tool_prefix)

Env vars: None

Multi-instance: Yes

skills_path
stringRequired

Path to the directory containing Claude skill folders (each with a SKILL.md file).

include
string[]Defaults to *

Glob patterns for skills to include.

exclude
string[]Defaults to

Glob patterns for skills to exclude.

tool_prefix
stringDefaults to claude_

Prefix for generated tool names. Use an empty string for no prefix.

prompt_title
stringDefaults to Claude Skills

Title for the prompt section listing skills.

prompt_intro
stringDefaults to You have access to specialized skills. Call the appropriate tool when the user's question matches:

Introductory text for the prompt section.

skill_descriptions
object

Override descriptions for specific skills. Keys are skill names, values are description strings.

response_prefix
string

Text to prepend to skill results.

response_postfix
string

Text to append to skill results.

allow_shell_injection
booleanDefaults to false

Enable shell command preprocessing in skill bodies. Security warning: allows arbitrary shell execution.

allow_script_execution
booleanDefaults to false

Discover and list scripts/ and assets/ files in prompt sections.

ignore_invocation_control
booleanDefaults to false

Override disable-model-invocation and user-invocable flags from frontmatter. When true, all discovered skills are registered regardless of invocation control.

shell_timeout
integerDefaults to 30

Timeout in seconds for shell injection commands.

1import { AgentBase, ClaudeSkillsSkill } from '@signalwire/sdk';
2
3const agent = new AgentBase({ name: 'assistant', route: '/assistant' });
4agent.setPromptText('You are a helpful assistant.');
5
6await agent.addSkill(new ClaudeSkillsSkill({
7 skills_path: '/path/to/skills/directory',
8 tool_prefix: 'skill_',
9 include: ['*'],
10 exclude: ['deprecated-*'],
11}));
12
13agent.run();