💡 摘要
此技能使任何兼容MCP的代理能够利用Claude代理技能,并实现渐进式披露。
🎯 适合人群
🤖 AI 吐槽: “看起来很能打,但别让配置把人劝退。”
风险:Medium。建议检查:是否执行 shell/命令行指令;是否发起外网请求(SSRF/数据外发);API Key/Token 的获取、存储与泄露风险;文件读写范围与路径穿越风险;依赖锁定与供应链风险。以最小权限运行,并在生产环境启用前审计代码与依赖。
AgentSkill MCP
Bring Claude Agent Skills to ANY MCP-compatible Agent
A universal MCP server that enables any Agent application with MCP support to use Anthropic's official Claude Agent Skills with progressive disclosure - reducing context overhead while maximizing capability.
Package Name: agentskill-mcp | PyPI: agentskill-mcp
English | 简体中文
Why AgentSkill MCP?
Claude Agent Skills are brilliantly designed but locked to Claude's ecosystem. This project breaks that limitation by:
- ✅ Universal Compatibility: Works with ANY MCP-compatible agent (Kilo Code, Cursor, Roo Code, Codex, and more)
- ✅ 100% Claude Skill Compatible: Uses official Anthropic Skill format - no modifications needed
- ✅ Progressive Disclosure: Implements the same smart context loading as Claude Code
- ✅ Zero Lock-in: Standard MCP protocol means you're never tied to one platform
The Problem Skills Solve
Traditional MCP tools load ALL documentation upfront, consuming massive amounts of tokens before you even start. With 15+ tools, your agent is context-starved before doing any real work.
Skills fix this through progressive disclosure: agents see a lightweight skill list initially, then load full details only when needed. This project brings that same efficiency to every MCP-compatible agent.
Features
- 🚀 One-Line Installation:
pip install agentskill-mcporuvx agentskill-mcp - 🔌 Universal MCP Compatibility (gradual testing): Works with Kilo Code, Cursor, Roo Code, Codex, Cherry Studio, and any MCP-compatible agent
- 📦 Official Skill Format: Fully compatible with Anthropic's Claude Skills
- 🎯 Progressive Disclosure: Smart context loading - minimal overhead until skills are needed
- 🔄 Hot Reload (not yet implemented): File changes detected and updated in real-time (where protocol supported)
- 🗂️ Smart Path Discovery: Auto-detects
.claude/skills/,.skill/, or custom directories - 🌍 Environment Aware: Project-level and global skill directories with automatic detection
- 🎨 ClaudeCode Compatible: Supports both
.claude/skills/(ClaudeCode format) and.skill/(custom format for this project)
Project Status
⚠️ Early Development - This project is in early stages. Currently tested on Windows only.
Tested Platforms:
- ✅ Kilo Code (AI coding assistant) - Windows
- ✅ Roo Code (AI coding assistant) - Windows
- ✅ Cline (AI coding assistant) - Windows
Next Steps:
- 🔄 Testing on more MCP-compatible agents (Codex, Cursor, QwenCode, etc.)
- 🔄 Cross-platform testing (macOS, Linux)
- 🔄 Broader compatibility verification
- 🔄 Hot reload feasibility testing (based on MCP's List Changed Notification) see: https://modelcontextprotocol.io/specification/2025-06-18/server/tools#list-changed-notification
In theory: Any agent implementing the Model Context Protocol should work, but we're actively testing to confirm.
Quick Start
Configuration
⚠️ Current Recommended Usage: Specify skills directory via --skills-dir parameter
Add to your MCP client configuration file. Find the configuration location in your agent's documentation:
- Kilo Code:
.kilocode/mcp.jsonin your workspace - Roo Code: Check agent documentation
- Cursor:
.cursor/mcp.jsonin your workspace - Other agents: Refer to agent-specific MCP configuration guide
Recommended Configuration (Windows):
{ "mcpServers": { "skills": { "command": "uvx", "args": [ "agentskill-mcp", "--skills-dir", "C:\\Users\\YourName\\path\\to\\skills" ] } } }
For macOS/Linux:
{ "mcpServers": { "skills": { "command": "uvx", "args": [ "agentskill-mcp", "--skills-dir", "/Users/YourName/path/to/skills" ] } } }
Using pip-installed version:
Replace "command": "uvx" with "command": "agentskill-mcp" and remove it from args:
{ "mcpServers": { "skills": { "command": "agentskill-mcp", "args": [ "--skills-dir", "C:\\Users\\YourName\\path\\to\\skills" ] } } }
💡 Tips:
- Use absolute paths in
--skills-dirto avoid ambiguity - After configuration changes, restart your agent application or reload MCP servers
- Test with
examples/directory first before creating custom skills
Loading Skills
Create a skills directory and add skill packages:
Format 1: ClaudeCode Format (Recommended for ClaudeCode users)
# Create in current project (recommended) Create .claude/skills/ in project root directory # Or create globally mkdir -p ~/.claude/skills # Linux/Mac mkdir C:\Users\YourName\.claude\skills # Windows
Format 2: Custom Format for This Project (Compatible with other agents)
# Create in current project Create .skill/ in project root directory # Or create globally mkdir ~/.skill # Linux/Mac mkdir C:\Users\YourName\.skill # Windows
Then place your Skill packages in the skills directory. The ./examples directory contains several official Anthropic Skill packages, which are sufficient for testing.
# Example of migrating skills (ClaudeCode format) Copy examples/canvas-design -> .claude/skills/ Copy examples/brand-guidelines -> .claude/skills/ # Or (Custom format for this project) Copy examples/canvas-design -> .skill/ Copy examples/brand-guidelines -> .skill/
The final structure should look like:
- ClaudeCode format:
.claude/skills/canvas-design/ - Custom format for this project:
.skill/canvas-design/
Try It Out
Restart your Agent application and test with:
Create a 1920x1080 promotional poster using Anthropic brand style.
Theme: "AI belongs to the future? AI is just a means, not an end"
What happens:
- Agent sees available skills in the
load_skilltool description - Agent identifies relevant skills (
canvas-design,brand-guidelines) - Agent calls
load_skillto get full skill details - Agent follows skill instructions to create the poster
Note: The agent may call only one skill depending on how it interprets the task. This is normal - AI agents have some inherent randomness in tool selection.
Skill Format
Skills follow the official Claude Skill format:
Frontmatter (YAML)
--- name: skill-name # Required: matches folder name description: | # Required: detailed description for agent matching What this skill does and when to use it. Include keywords that agents should match on. license: MIT # Optional: license information ---
Skill Content
After the frontmatter, provide detailed Markdown instructions:
- Clear, actionable guidance
- Examples and best practices
- References to auxiliary resources
Auxiliary Resources
Skills can include resources like templates, fonts, scripts:
# ClaudeCode format
.claude/skills/
├── algorithmic-art/
│ ├── SKILL.md
│ └── templates/
│ ├── viewer.html
│ └── generator.js
# Or legacy format
.skill/
├── algorithmic-art/
│ ├── SKILL.md
│ └── templates/
│ ├── viewer.html
│ └── generator.js
Reference resources in your skill:
Read `templates/viewer.html` using the Read tool
How It Works
Progressive Disclosure Implementation
The Challenge: How to implement progressive disclosure within the MCP framework?
Official Claude Implementation (inferred from behavior):
- Built-in Skill system integrated in agent's system prompt
- Initial display shows only
<available_skills>list - Special
load_skillcommand triggers full content loading
Our MCP Implementation:
-
Single MCP Tool:
load_skill- Embeds all available skill metadata in the tool's
description - Agents see the skill list without loading full content
- Embeds all available skill metadata in the tool's
-
Tool Description Structure:
Tool( name="load_skill", description="""Execute a skill within the main conversation <skills_instructions> When users ask you to perform tasks, check if any of the available skills below can help... </skills_instructions> <available_skills> <skill> <name>code-reviewer</name> <description>Comprehensive code review framework...</description> </skill> <skill> <name>calculator</name> <description>Mathematical calculations...</description> </skill> </available_skills> """, inputSchema={ "type": "object", "properties": { "skill": {"type": "string"} } } )
- On-Demand Loading:
- Agent matches task with skills from
<available_skills> - Calls
load_skill(skill="code-reviewer") - Server reads
.skill/code-reviewer/SKILL.md - Returns full skill content
- Agent matches task with skills from
Current Implementation Note
Version 0.1.3 focuses on the most reliable usage pattern:
- ✅ Recommended: Specify skills directory via
--skills-dirparameter - ⚠️ Experimental: Dynamic
set_skills_directorytool (currently disabled in production)
This approach ensures maximum compatibility across different agent implementations while we continue testing and refining more advanced features.
Path Discovery
The server automatically finds skills using this priority:
- Command-line argument:
--skills-dir /path/to/skills⭐ Recommended - Environment variable:
MCP_SKILLS_DIR=/path/to/skills - Project-level:
.claude/skills/or.skill/in project root (detects.git,.claude/,package.json, etc.) - Global fallback:
~/.skill
Note: The project-level discovery prioritizes .claude/skills/ (ClaudeCode format) over .skill/ (custom format for this project) when both exist.
Current Recommendation: Always use --skills-dir parameter for best compatibility.
优点
- 与MCP代理的通用兼容性
- 渐进式披露减少上下文开销
- Claude技能无需修改
- 支持ClaudeCode和自定义格式
缺点
- 目前处于早期开发阶段
- 平台测试有限
- 热重载功能尚未实现
- 新用户配置可能较复杂
相关技能
免责声明:本内容来源于 GitHub 开源项目,仅供展示和评分分析使用。
版权归原作者所有 QianjieTech.
