Skip to main content

Crate mcp_execution_skill

Crate mcp_execution_skill 

Source
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:

  1. parser - Extracts JSDoc metadata from TypeScript files
  2. context - Builds structured context from parsed tools
  3. template - 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§

ParsedParameter
A parsed parameter from TypeScript interface.
ParsedToolFile
Parsed metadata from a TypeScript tool file.

Enums§

ParseError
Errors that can occur during TypeScript file parsing.
ScanError
Errors that can occur during directory scanning.
TemplateError
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 JSDoc metadata from TypeScript file content.
render_generation_prompt
Render the skill generation prompt.
scan_tools_directory
Scan directory and parse all tool files.