| Crates.io | mcp-execution-skill |
| lib.rs | mcp-execution-skill |
| version | 0.6.4 |
| created_at | 2026-01-04 00:18:42.153022+00 |
| updated_at | 2026-01-04 01:01:24.559511+00 |
| description | SKILL.md generation for Claude Code integration with MCP tools |
| homepage | https://github.com/bug-ops/mcp-execution |
| repository | https://github.com/bug-ops/mcp-execution |
| max_upload_size | |
| id | 2021012 |
| size | 89,756 |
Skill generation for MCP progressive loading. Generates Claude Code skill files (SKILL.md) from TypeScript tool files.
cargo add mcp-execution-skill
Or add to your Cargo.toml:
[dependencies]
mcp-execution-skill = "0.6"
[!IMPORTANT] Requires Rust 1.89 or later.
use mcp_execution_skill::{scan_tools_directory, build_skill_context};
use std::path::Path;
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
// Scan TypeScript tool files from generated server directory
let tools = scan_tools_directory(Path::new("~/.claude/servers/github")).await?;
// Build skill generation context
let context = build_skill_context("github", &tools, None);
// Use context.generation_prompt with LLM to generate SKILL.md
println!("Skill: {}", context.skill_name);
println!("Tools: {}", context.tool_count);
println!("Prompt:\n{}", context.generation_prompt);
Ok(())
}
[!TIP] For optimal results, use the MCP server (
mcp-execution-server) for skill generation. It leverages LLM capabilities to summarize tool descriptions, resulting in more concise skill files.
@tool, @server, @category, @keywords) from TypeScript filestokio::fsTypeScript Files → Parser → Context Builder → Template Renderer → SKILL.md Prompt
parser.rs) - Extracts JSDoc metadata using pre-compiled regexescontext.rs) - Groups tools by category, generates examplestemplate.rs) - Renders Handlebars prompt templateuse mcp_execution_skill::parse_tool_file;
let content = r#"
/**
* @tool create_issue
* @server github
* @category issues
* @keywords create,issue,new
* @description Create a new GitHub issue
*/
"#;
let parsed = parse_tool_file(content, "createIssue.ts")?;
assert_eq!(parsed.name, "create_issue");
assert_eq!(parsed.category, Some("issues".to_string()));
use mcp_execution_skill::build_skill_context;
// Add use-case hints for better context
let hints = vec!["managing pull requests", "code review"];
let context = build_skill_context("github", &tools, Some(&hints));
println!("Categories: {:?}", context.categories.len());
| Type | Description |
|---|---|
ParsedToolFile |
Metadata extracted from TypeScript file |
ParsedParameter |
TypeScript parameter information |
SkillCategory |
Tools grouped by category |
SkillTool |
Tool metadata for skill generation |
GenerateSkillResult |
Complete context for SKILL.md generation |
use mcp_execution_skill::{ParseError, ScanError};
// ParseError - JSDoc parsing failures
// ScanError - Directory scanning issues (permissions, limits)
[!NOTE] Built-in DoS protection for untrusted input.
.ts files, excludes _runtime/This crate is part of the mcp-execution workspace:
mcp-execution-core - Foundation types and traitsmcp-execution-codegen - TypeScript code generationmcp-execution-files - Virtual filesystemmcp-execution-cli - CLI with skill commandMinimum Supported Rust Version: 1.89
MSRV increases are considered minor version bumps.
Licensed under either of Apache License 2.0 or MIT license at your option.