Import
import {
buildSkillManifestPrompt,
createExecuteSkillScriptTool,
createLoadSkillReferenceTool,
createLoadSkillTool,
filterToolsForSkill,
getAllSkills,
} from "veryfront/skill";
Examples
import { parseSkillFrontmatter, validateSkillMetadata } from "veryfront/skill";
const parsed = await parseSkillFrontmatter("---\nname: review\ndescription: Review code\n---\n");
validateSkillMetadata(parsed.frontmatter, "review");
Exports
Components
| Name | Description | Source |
|---|---|---|
SKILL_ALLOWED_TOOL_PATTERN_REGEX | Valid allowed-tool pattern: exact ID or prefix wildcard (e.g. “api:*“) | source |
SKILL_ASSETS_DIR | source | |
SKILL_DESCRIPTION_MAX_LENGTH | Maximum description length in characters | source |
SKILL_MD_FILENAME | Standard SKILL.md filename per agentskills.io spec | source |
SKILL_NAME_REGEX | Valid skill name: lowercase alphanumeric + hyphens, 1-64 chars | source |
SKILL_REFERENCES_DIR | source | |
SKILL_RESOURCES_DIR | source | |
SKILL_SCRIPTS_DIR | Conventional subdirectory names | source |
SKILL_TOOL_IDS | Tool IDs that belong to the skill system (single source of truth) | source |
Functions
| Name | Description | Source |
|---|---|---|
buildSkillManifestPrompt | Build the skill manifest prompt section for an agent’s system prompt. | source |
createExecuteSkillScriptTool | Create the execute_skill_script tool. Executes a script from a skill’s scripts/ directory. | source |
createLoadSkillReferenceTool | Create the load_skill_reference tool. Reads a reference file from a skill’s references/, resources/, or assets/ directory. | source |
createLoadSkillTool | Create the load_skill tool. Loads a skill’s full instructions, available references, and scripts. | source |
filterToolsForSkill | Layer 1: Filter tool definitions before sending to model. | source |
getAllSkills | source | |
getSkill | source | |
getSkillScriptExecutor | Get the appropriate script executor. Checks cloud auth availability on every call so request-scoped credentials and environment overrides are respected. | source |
isSkillVisibleTo | Whether a skill is visible to the caller identified by the scope. | source |
isToolAllowedBySkill | Layer 2: Check if a specific tool call is allowed at execution time. | source |
listSkillSubdir | List files in a skill subdirectory. | source |
parseSkillFrontmatter | Parse SKILL.md content into frontmatter + body. | source |
registerSkill | source | |
validateAllowedToolPatterns | Validate allowed-tool patterns at parse time. | source |
validateSkillMetadata | Validate and normalize parsed frontmatter into SkillMetadata. | source |
validateSkillPath | Validate that a requested path is safe within a skill’s root directory. | source |
Types
| Name | Description | Source |
|---|---|---|
ActiveSkillContext | Active skill context for runtime policy tracking | source |
AgentCapabilityScope | Caller scope used for owner-aware capability resolution. | source |
Skill | Registered skill instance | source |
SkillContent | Full skill content returned by load_skill tool | source |
SkillMetadata | Parsed frontmatter metadata from SKILL.md | source |
SkillScriptExecutor | Script executor interface | source |
SkillScriptExecutorInput | Input for the script executor | source |
SkillScriptResult | Result from executing a skill script | source |
Constants
| Name | Description | Source |
|---|---|---|
skillRegistry | source |