mcp_execution_skill/lib.rs
1//! Skill generation for MCP progressive loading.
2//!
3//! This crate provides functionality to generate Claude Code skill files (SKILL.md)
4//! from generated progressive loading TypeScript files.
5//!
6//! # Architecture
7//!
8//! The skill generation flow:
9//! 1. `parser` - Extracts `JSDoc` metadata from TypeScript files
10//! 2. `context` - Builds structured context from parsed tools
11//! 3. `template` - Renders Handlebars template with context
12//!
13//! # Examples
14//!
15//! ```no_run
16//! use mcp_execution_skill::{scan_tools_directory, build_skill_context, ScanError};
17//! use std::path::Path;
18//!
19//! # async fn example() -> Result<(), ScanError> {
20//! let tools = scan_tools_directory(Path::new("~/.claude/servers/github")).await?;
21//! let context = build_skill_context("github", &tools, None);
22//! # Ok(())
23//! # }
24//! ```
25
26mod context;
27mod parser;
28mod template;
29pub mod types;
30
31pub use context::build_skill_context;
32pub use parser::{
33 MAX_FILE_SIZE, MAX_TOOL_FILES, ParseError, ParsedParameter, ParsedToolFile, ScanError,
34 extract_skill_metadata, parse_tool_file, scan_tools_directory,
35};
36pub use template::{TemplateError, render_generation_prompt};
37pub use types::{
38 GenerateSkillParams, GenerateSkillResult, SaveSkillParams, SaveSkillResult, SkillCategory,
39 SkillMetadata, SkillTool, ToolExample, validate_server_id,
40};