Expand description
Skill generation for MCP progressive loading.
This crate provides functionality to generate Claude Code skill files (SKILL.md) from generated progressive loading TypeScript files.
§Architecture
The skill generation flow:
parser- ExtractsJSDocmetadata from TypeScript filescontext- Builds structured context from parsed toolstemplate- Renders Handlebars template with context
§Examples
use mcp_execution_skill::{scan_tools_directory, build_skill_context, ScanError};
use std::path::Path;
let tools = scan_tools_directory(Path::new("~/.claude/servers/github")).await?;
let context = build_skill_context("github", &tools, None);Re-exports§
pub use types::GenerateSkillParams;pub use types::GenerateSkillResult;pub use types::SaveSkillParams;pub use types::SaveSkillResult;pub use types::SkillCategory;pub use types::SkillMetadata;pub use types::SkillTool;pub use types::ToolExample;pub use types::validate_server_id;
Modules§
- types
- Type definitions for skill generation.
Structs§
- Parsed
Parameter - A parsed parameter from TypeScript interface.
- Parsed
Tool File - Parsed metadata from a TypeScript tool file.
Enums§
- Parse
Error - Errors that can occur during TypeScript file parsing.
- Scan
Error - Errors that can occur during directory scanning.
- Template
Error - Errors that can occur during template rendering.
Constants§
- MAX_
FILE_ SIZE - Maximum file size to read in bytes (1MB).
- MAX_
TOOL_ FILES - Maximum number of tool files to scan (denial-of-service protection).
Functions§
- build_
skill_ context - Build skill generation context from parsed tools.
- extract_
skill_ metadata - Extract skill metadata from SKILL.md content.
- parse_
tool_ file - Parse
JSDocmetadata from TypeScript file content. - render_
generation_ prompt - Render the skill generation prompt.
- scan_
tools_ directory - Scan directory and parse all tool files.