The meta-pattern skill for wrapping MCP server tool calls in executable scripts for zero-context-token execution. Converts MCP tool definitions into the Skills + Code Execution pattern (SKILL.md + scripts/*.py), generates Goose recipes for cross-platform compatibility. Use when: converting an MCP server to a skill, building a new skill that wraps MCP tools, explaining the code execution pattern, or creating portable intelligence packages. Triggers on: "wrap MCP in script", "convert MCP to skill", "code execution pattern", "MCP skill wrapper", "create skill from MCP server".
The meta-skill that teaches and automates the core pattern of this project: wrap MCP server tool calls in executable scripts so tools run externally and only results enter the context window.
Does: Convert MCP tool definitions to executable Python scripts. Create SKILL.md files for MCP-backed skills. Generate Goose recipe.yaml for cross-platform compatibility. Explain the Skills + Code Execution pattern.
Does NOT: Run or manage MCP server processes. Create new MCP tool implementations. Modify existing MCP server source code. Install MCP dependencies.
SKILL.md (~100 tokens) -- Agent reads this; learns WHAT to do
|
v
scripts/*.py (0 tokens) -- Agent EXECUTES these; never loaded into context
|
v
Minimal result (JSON) -- Only the output enters context
Direct MCP tool loading bloats context with tool definitions:
| Approach | Context tokens | Tools available | |----------|---------------|-----------------| | Load 22 MCP servers directly | 50,000+ tokens | All tools always loaded | | Skills + Code Execution | ~100 tokens per skill | Tools executed on demand |
Scripts execute externally via subprocess. The agent never sees the tool schema, JSON-RPC protocol, or server internals -- only the result.
| Script | Purpose | Usage |
|--------|---------|-------|
| scripts/mcp_client.py | Call any MCP tool via CLI | python3 scripts/mcp_client.py --server <name> --tool <tool> --args '{...}' |
| scripts/convert_mcp_to_skill.py | Generate a full skill from an MCP server | python3 scripts/convert_mcp_to_skill.py --server-name <name> --output-dir <path> |
# Call the docker_containerization_mcp server's docker_generate_dockerfile tool
python3 scripts/mcp_client.py \
--server docker_containerization_mcp \
--tool docker_generate_dockerfile \
--args '{"app_type": "python", "framework": "fastapi"}'
The script:
.mcp.json to find server command and argsinitialize then tools/call# Generate a complete skill from the helm_packaging_mcp server
python3 scripts/convert_mcp_to_skill.py \
--server-name helm_packaging_mcp \
--output-dir .claude/skills/helm-packaging-generated \
--description "Package apps into Helm charts for Kubernetes deployment"
The script:
.mcp.json to resolve the server entrytools/list to discover all toolsSKILL.md with frontmatter, scope, tool map, and execution examplesscripts/mcp_client.py (copy of the universal client)scripts/recipe.yaml for Goose compatibilityBefore executing, confirm these if not clear from context:
.mcp.json (e.g., docker_containerization_mcp)docker_generate_dockerfile).mcp.json to resolve server config; never hardcode pathsname and description.venv or server scripts.mcp.jsonThe pattern works across AI agent platforms:
| Platform | Format | Entry Point |
|----------|--------|-------------|
| Claude Code | SKILL.md + scripts/ | .claude/skills/<name>/SKILL.md |
| Goose | recipe.yaml | Recipe references same scripts/ |
| OpenAI Codex | AGENTS.md reference | Points to scripts/ |
name: <skill-name>
description: <what it does>
steps:
- name: call-tool
command: python3 scripts/mcp_client.py --server <server> --tool <tool> --args '{}'
description: <step description>
The convert_mcp_to_skill.py script auto-generates the recipe.yaml.
See REFERENCE.md for:
k8s_deployment_mcp to a skillnpx skills add assadsharif/mcp-code-execution下载完整 Skill 目录,包含 SKILL.md 及所有相关文件
Search for places (restaurants, cafes, etc.) via Google Places API proxy on localhost.
Interact with GitHub using the `gh` CLI. Use `gh issue`, `gh pr`, `gh run`, and `gh api` for issues, PRs, CI runs, and advanced queries.
Create or update AgentSkills. Use when designing, structuring, or packaging skills with scripts, references, and assets.
Start voice calls via the OpenClaw voice-call plugin.
Notion API for creating and managing pages, databases, and blocks.
Gemini CLI for one-shot Q&A, summaries, and generation.
Category:developer