[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6C7N79Y8P14GGCJRCM706EK":3,"skill-same:01M6C7N79Y8P14GGCJRCM706EK":111},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":8,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":13,"sourceHtmlUrl":17,"categories":18,"keywords":29,"publishedAt":50,"linkOnly":51,"markdownContent":52,"markdownBody":53,"frontMatter":54,"refName":56,"commitSha":57,"skillDirectory":58,"forksCount":59,"repositoryHtmlUrl":60,"repositoryHomepageUrl":13,"ownerHtmlUrl":61,"ownerBlogUrl":13,"ownerDescription":13,"updatedAt":62,"install":63,"resources":76},"01M6C7N79Y8P14GGCJRCM706EK","mcp-integration","MCP 服务器集成配置","This skill should be used when the user asks to \"add MCP server\", \"integrate MCP\", \"configure MCP in plugin\", \"use .mcp.json\", \"set up Model Context Protocol\", \"connect external service\", mentions \"${CLAUDE_PLUGIN_ROOT} with MCP\", or discusses MCP server types (SSE, stdio, HTTP, WebSocket). Provides comprehensive guidance for integrating Model Context Protocol servers into Claude Code plugins for external tool and service integration.","当用户要求“添加 MCP 服务器”、“集成 MCP”、“在插件中配置 MCP”、“使用 .mcp.json”、“设置 Model Context Protocol”、“连接外部服务”，提及“在 MCP 中使用 ${CLAUDE_PLUGIN_ROOT}”，或讨论 MCP 服务器类型（SSE、stdio、HTTP、WebSocket）时，应使用本技能。本技能提供将 Model Context Protocol 服务器集成到 Claude Code 插件中的全面指导，以实现外部工具和服务集成。","xiaoyuge886\u002Faigc","xiaoyuge886","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F12636900?v=4","01M6C7J3YT6CQHYHZ29SF3VNBC",null,"01M6C7J42B85WJJ9BQGRDED804",200,"MIT","https:\u002F\u002Fgithub.com\u002Fxiaoyuge886\u002Faigc\u002Fblob\u002Fmain\u002Fplugins\u002Fclaude-plugins-official-main\u002Fplugins\u002Fplugin-dev\u002Fskills\u002Fmcp-integration\u002FSKILL.md",[19,24],{"categoryNo":20,"categoryName":21,"taxonomyType":22,"taxonomyTypeDesc":23},"01M8BQ6TQZN6R52WBJ9H8NRMQM","软件开发工程师","PROFESSION","适用职业",{"categoryNo":25,"categoryName":26,"taxonomyType":27,"taxonomyTypeDesc":28},"01M8BRN0CV1NMDZ5TEJX1GVM29","插件与技能管理","SCENARIO","使用场景",[30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49],"integration","MCP Integration","MCP","websocket","up","integrate","use","claude code plugins","context","add mcp","model","tool","configure","SET","server","code","connect","http","model context protocol","mcp server","2026-11-10 10:12:30",false,"---\nname: mcp-integration\ndescription: This skill should be used when the user asks to \"add MCP server\", \"integrate MCP\", \"configure MCP in plugin\", \"use .mcp.json\", \"set up Model Context Protocol\", \"connect external service\", mentions \"${CLAUDE_PLUGIN_ROOT} with MCP\", or discusses MCP server types (SSE, stdio, HTTP, WebSocket). Provides comprehensive guidance for integrating Model Context Protocol servers into Claude Code plugins for external tool and service integration.\nversion: 0.1.0\n---\n\n# MCP Integration for Claude Code Plugins\n\n## Overview\n\nModel Context Protocol (MCP) enables Claude Code plugins to integrate with external services and APIs by providing structured tool access. Use MCP integration to expose external service capabilities as tools within Claude Code.\n\n**Key capabilities:**\n- Connect to external services (databases, APIs, file systems)\n- Provide 10+ related tools from a single service\n- Handle OAuth and complex authentication flows\n- Bundle MCP servers with plugins for automatic setup\n\n## MCP Server Configuration Methods\n\nPlugins can bundle MCP servers in two ways:\n\n### Method 1: Dedicated .mcp.json (Recommended)\n\nCreate `.mcp.json` at plugin root:\n\n```json\n{\n  \"database-tools\": {\n    \"command\": \"${CLAUDE_PLUGIN_ROOT}\u002Fservers\u002Fdb-server\",\n    \"args\": [\"--config\", \"${CLAUDE_PLUGIN_ROOT}\u002Fconfig.json\"],\n    \"env\": {\n      \"DB_URL\": \"${DB_URL}\"\n    }\n  }\n}\n```\n\n**Benefits:**\n- Clear separation of concerns\n- Easier to maintain\n- Better for multiple servers\n\n### Method 2: Inline in plugin.json\n\nAdd `mcpServers` field to plugin.json:\n\n```json\n{\n  \"name\": \"my-plugin\",\n  \"version\": \"1.0.0\",\n  \"mcpServers\": {\n    \"plugin-api\": {\n      \"command\": \"${CLAUDE_PLUGIN_ROOT}\u002Fservers\u002Fapi-server\",\n      \"args\": [\"--port\", \"8080\"]\n    }\n  }\n}\n```\n\n**Benefits:**\n- Single configuration file\n- Good for simple single-server plugins\n\n## MCP Server Types\n\n### stdio (Local Process)\n\nExecute local MCP servers as child processes. Best for local tools and custom servers.\n\n**Configuration:**\n```json\n{\n  \"filesystem\": {\n    \"command\": \"npx\",\n    \"args\": [\"-y\", \"@modelcontextprotocol\u002Fserver-filesystem\", \"\u002Fallowed\u002Fpath\"],\n    \"env\": {\n      \"LOG_LEVEL\": \"debug\"\n    }\n  }\n}\n```\n\n**Use cases:**\n- File system access\n- Local database connections\n- Custom MCP servers\n- NPM-packaged MCP servers\n\n**Process management:**\n- Claude Code spawns and manages the process\n- Communicates via stdin\u002Fstdout\n- Terminates when Claude Code exits\n\n### SSE (Server-Sent Events)\n\nConnect to hosted MCP servers with OAuth support. Best for cloud services.\n\n**Configuration:**\n```json\n{\n  \"asana\": {\n    \"type\": \"sse\",\n    \"url\": \"https:\u002F\u002Fmcp.asana.com\u002Fsse\"\n  }\n}\n```\n\n**Use cases:**\n- Official hosted MCP servers (Asana, GitHub, etc.)\n- Cloud services with MCP endpoints\n- OAuth-based authentication\n- No local installation needed\n\n**Authentication:**\n- OAuth flows handled automatically\n- User prompted on first use\n- Tokens managed by Claude Code\n\n### HTTP (REST API)\n\nConnect to RESTful MCP servers with token authentication.\n\n**Configuration:**\n```json\n{\n  \"api-service\": {\n    \"type\": \"http\",\n    \"url\": \"https:\u002F\u002Fapi.example.com\u002Fmcp\",\n    \"headers\": {\n      \"Authorization\": \"Bearer ${API_TOKEN}\",\n      \"X-Custom-Header\": \"value\"\n    }\n  }\n}\n```\n\n**Use cases:**\n- REST API-based MCP servers\n- Token-based authentication\n- Custom API backends\n- Stateless interactions\n\n### WebSocket (Real-time)\n\nConnect to WebSocket MCP servers for real-time bidirectional communication.\n\n**Configuration:**\n```json\n{\n  \"realtime-service\": {\n    \"type\": \"ws\",\n    \"url\": \"wss:\u002F\u002Fmcp.example.com\u002Fws\",\n    \"headers\": {\n      \"Authorization\": \"Bearer ${TOKEN}\"\n    }\n  }\n}\n```\n\n**Use cases:**\n- Real-time data streaming\n- Persistent connections\n- Push notifications from server\n- Low-latency requirements\n\n## Environment Variable Expansion\n\nAll MCP configurations support environment variable substitution:\n\n**${CLAUDE_PLUGIN_ROOT}** - Plugin directory (always use for portability):\n```json\n{\n  \"command\": \"${CLAUDE_PLUGIN_ROOT}\u002Fservers\u002Fmy-server\"\n}\n```\n\n**User environment variables** - From user's shell:\n```json\n{\n  \"env\": {\n    \"API_KEY\": \"${MY_API_KEY}\",\n    \"DATABASE_URL\": \"${DB_URL}\"\n  }\n}\n```\n\n**Best practice:** Document all required environment variables in plugin README.\n\n## MCP Tool Naming\n\nWhen MCP servers provide tools, they're automatically prefixed:\n\n**Format:** `mcp__plugin_\u003Cplugin-name>_\u003Cserver-name>__\u003Ctool-name>`\n\n**Example:**\n- Plugin: `asana`\n- Server: `asana`\n- Tool: `create_task`\n- **Full name:** `mcp__plugin_asana_asana__asana_create_task`\n\n### Using MCP Tools in Commands\n\nPre-allow specific MCP tools in command frontmatter:\n\n```markdown\n---\nallowed-tools: [\n  \"mcp__plugin_asana_asana__asana_create_task\",\n  \"mcp__plugin_asana_asana__asana_search_tasks\"\n]\n---\n```\n\n**Wildcard (use sparingly):**\n```markdown\n---\nallowed-tools: [\"mcp__plugin_asana_asana__*\"]\n---\n```\n\n**Best practice:** Pre-allow specific tools, not wildcards, for security.\n\n## Lifecycle Management\n\n**Automatic startup:**\n- MCP servers start when plugin enables\n- Connection established before first tool use\n- Restart required for configuration changes\n\n**Lifecycle:**\n1. Plugin loads\n2. MCP configuration parsed\n3. Server process started (stdio) or connection established (SSE\u002FHTTP\u002FWS)\n4. Tools discovered and registered\n5. Tools available as `mcp__plugin_...__...`\n\n**Viewing servers:**\nUse `\u002Fmcp` command to see all servers including plugin-provided ones.\n\n## Authentication Patterns\n\n### OAuth (SSE\u002FHTTP)\n\nOAuth handled automatically by Claude Code:\n\n```json\n{\n  \"type\": \"sse\",\n  \"url\": \"https:\u002F\u002Fmcp.example.com\u002Fsse\"\n}\n```\n\nUser authenticates in browser on first use. No additional configuration needed.\n\n### Token-Based (Headers)\n\nStatic or environment variable tokens:\n\n```json\n{\n  \"type\": \"http\",\n  \"url\": \"https:\u002F\u002Fapi.example.com\",\n  \"headers\": {\n    \"Authorization\": \"Bearer ${API_TOKEN}\"\n  }\n}\n```\n\nDocument required environment variables in README.\n\n### Environment Variables (stdio)\n\nPass configuration to MCP server:\n\n```json\n{\n  \"command\": \"python\",\n  \"args\": [\"-m\", \"my_mcp_server\"],\n  \"env\": {\n    \"DATABASE_URL\": \"${DB_URL}\",\n    \"API_KEY\": \"${API_KEY}\",\n    \"LOG_LEVEL\": \"info\"\n  }\n}\n```\n\n## Integration Patterns\n\n### Pattern 1: Simple Tool Wrapper\n\nCommands use MCP tools with user interaction:\n\n```markdown\n# Command: create-item.md\n---\nallowed-tools: [\"mcp__plugin_name_server__create_item\"]\n---\n\nSteps:\n1. Gather item details from user\n2. Use mcp__plugin_name_server__create_item\n3. Confirm creation\n```\n\n**Use for:** Adding validation or preprocessing before MCP calls.\n\n### Pattern 2: Autonomous Agent\n\nAgents use MCP tools autonomously:\n\n```markdown\n# Agent: data-analyzer.md\n\nAnalysis Process:\n1. Query data via mcp__plugin_db_server__query\n2. Process and analyze results\n3. Generate insights report\n```\n\n**Use for:** Multi-step MCP workflows without user interaction.\n\n### Pattern 3: Multi-Server Plugin\n\nIntegrate multiple MCP servers:\n\n```json\n{\n  \"github\": {\n    \"type\": \"sse\",\n    \"url\": \"https:\u002F\u002Fmcp.github.com\u002Fsse\"\n  },\n  \"jira\": {\n    \"type\": \"sse\",\n    \"url\": \"https:\u002F\u002Fmcp.jira.com\u002Fsse\"\n  }\n}\n```\n\n**Use for:** Workflows spanning multiple services.\n\n## Security Best Practices\n\n### Use HTTPS\u002FWSS\n\nAlways use secure connections:\n\n```json\n✅ \"url\": \"https:\u002F\u002Fmcp.example.com\u002Fsse\"\n❌ \"url\": \"http:\u002F\u002Fmcp.example.com\u002Fsse\"\n```\n\n### Token Management\n\n**DO:**\n- ✅ Use environment variables for tokens\n- ✅ Document required env vars in README\n- ✅ Let OAuth flow handle authentication\n\n**DON'T:**\n- ❌ Hardcode tokens in configuration\n- ❌ Commit tokens to git\n- ❌ Share tokens in documentation\n\n### Permission Scoping\n\nPre-allow only necessary MCP tools:\n\n```markdown\n✅ allowed-tools: [\n  \"mcp__plugin_api_server__read_data\",\n  \"mcp__plugin_api_server__create_item\"\n]\n\n❌ allowed-tools: [\"mcp__plugin_api_server__*\"]\n```\n\n## Error Handling\n\n### Connection Failures\n\nHandle MCP server unavailability:\n- Provide fallback behavior in commands\n- Inform user of connection issues\n- Check server URL and configuration\n\n### Tool Call Errors\n\nHandle failed MCP operations:\n- Validate inputs before calling MCP tools\n- Provide clear error messages\n- Check rate limiting and quotas\n\n### Configuration Errors\n\nValidate MCP configuration:\n- Test server connectivity during development\n- Validate JSON syntax\n- Check required environment variables\n\n## Performance Considerations\n\n### Lazy Loading\n\nMCP servers connect on-demand:\n- Not all servers connect at startup\n- First tool use triggers connection\n- Connection pooling managed automatically\n\n### Batching\n\nBatch similar requests when possible:\n\n```\n# Good: Single query with filters\ntasks = search_tasks(project=\"X\", assignee=\"me\", limit=50)\n\n# Avoid: Many individual queries\nfor id in task_ids:\n    task = get_task(id)\n```\n\n## Testing MCP Integration\n\n### Local Testing\n\n1. Configure MCP server in `.mcp.json`\n2. Install plugin locally (`.claude-plugin\u002F`)\n3. Run `\u002Fmcp` to verify server appears\n4. Test tool calls in commands\n5. Check `claude --debug` logs for connection issues\n\n### Validation Checklist\n\n- [ ] MCP configuration is valid JSON\n- [ ] Server URL is correct and accessible\n- [ ] Required environment variables documented\n- [ ] Tools appear in `\u002Fmcp` output\n- [ ] Authentication works (OAuth or tokens)\n- [ ] Tool calls succeed from commands\n- [ ] Error cases handled gracefully\n\n## Debugging\n\n### Enable Debug Logging\n\n```bash\nclaude --debug\n```\n\nLook for:\n- MCP server connection attempts\n- Tool discovery logs\n- Authentication flows\n- Tool call errors\n\n### Common Issues\n\n**Server not connecting:**\n- Check URL is correct\n- Verify server is running (stdio)\n- Check network connectivity\n- Review authentication configuration\n\n**Tools not available:**\n- Verify server connected successfully\n- Check tool names match exactly\n- Run `\u002Fmcp` to see available tools\n- Restart Claude Code after config changes\n\n**Authentication failing:**\n- Clear cached auth tokens\n- Re-authenticate\n- Check token scopes and permissions\n- Verify environment variables set\n\n## Quick Reference\n\n### MCP Server Types\n\n| Type | Transport | Best For | Auth |\n|------|-----------|----------|------|\n| stdio | Process | Local tools, custom servers | Env vars |\n| SSE | HTTP | Hosted services, cloud APIs | OAuth |\n| HTTP | REST | API backends, token auth | Tokens |\n| ws | WebSocket | Real-time, streaming | Tokens |\n\n### Configuration Checklist\n\n- [ ] Server type specified (stdio\u002FSSE\u002FHTTP\u002Fws)\n- [ ] Type-specific fields complete (command or url)\n- [ ] Authentication configured\n- [ ] Environment variables documented\n- [ ] HTTPS\u002FWSS used (not HTTP\u002FWS)\n- [ ] ${CLAUDE_PLUGIN_ROOT} used for paths\n\n### Best Practices\n\n**DO:**\n- ✅ Use ${CLAUDE_PLUGIN_ROOT} for portable paths\n- ✅ Document required environment variables\n- ✅ Use secure connections (HTTPS\u002FWSS)\n- ✅ Pre-allow specific MCP tools in commands\n- ✅ Test MCP integration before publishing\n- ✅ Handle connection and tool errors gracefully\n\n**DON'T:**\n- ❌ Hardcode absolute paths\n- ❌ Commit credentials to git\n- ❌ Use HTTP instead of HTTPS\n- ❌ Pre-allow all tools with wildcards\n- ❌ Skip error handling\n- ❌ Forget to document setup\n\n## Additional Resources\n\n### Reference Files\n\nFor detailed information, consult:\n\n- **`references\u002Fserver-types.md`** - Deep dive on each server type\n- **`references\u002Fauthentication.md`** - Authentication patterns and OAuth\n- **`references\u002Ftool-usage.md`** - Using MCP tools in commands and agents\n\n### Example Configurations\n\nWorking examples in `examples\u002F`:\n\n- **`stdio-server.json`** - Local stdio MCP server\n- **`sse-server.json`** - Hosted SSE server with OAuth\n- **`http-server.json`** - REST API with token auth\n\n### External Resources\n\n- **Official MCP Docs**: https:\u002F\u002Fmodelcontextprotocol.io\u002F\n- **Claude Code MCP Docs**: https:\u002F\u002Fdocs.claude.com\u002Fen\u002Fdocs\u002Fclaude-code\u002Fmcp\n- **MCP SDK**: @modelcontextprotocol\u002Fsdk\n- **Testing**: Use `claude --debug` and `\u002Fmcp` command\n\n## Implementation Workflow\n\nTo add MCP integration to a plugin:\n\n1. Choose MCP server type (stdio, SSE, HTTP, ws)\n2. Create `.mcp.json` at plugin root with configuration\n3. Use ${CLAUDE_PLUGIN_ROOT} for all file references\n4. Document required environment variables in README\n5. Test locally with `\u002Fmcp` command\n6. Pre-allow MCP tools in relevant commands\n7. Handle authentication (OAuth or tokens)\n8. Test error cases (connection failures, auth errors)\n9. Document MCP integration in plugin README\n\nFocus on stdio for custom\u002Flocal servers, SSE for hosted services with OAuth.\n","# MCP Integration for Claude Code Plugins\n\n## Overview\n\nModel Context Protocol (MCP) enables Claude Code plugins to integrate with external services and APIs by providing structured tool access. Use MCP integration to expose external service capabilities as tools within Claude Code.\n\n**Key capabilities:**\n- Connect to external services (databases, APIs, file systems)\n- Provide 10+ related tools from a single service\n- Handle OAuth and complex authentication flows\n- Bundle MCP servers with plugins for automatic setup\n\n## MCP Server Configuration Methods\n\nPlugins can bundle MCP servers in two ways:\n\n### Method 1: Dedicated .mcp.json (Recommended)\n\nCreate `.mcp.json` at plugin root:\n\n```json\n{\n  \"database-tools\": {\n    \"command\": \"${CLAUDE_PLUGIN_ROOT}\u002Fservers\u002Fdb-server\",\n    \"args\": [\"--config\", \"${CLAUDE_PLUGIN_ROOT}\u002Fconfig.json\"],\n    \"env\": {\n      \"DB_URL\": \"${DB_URL}\"\n    }\n  }\n}\n```\n\n**Benefits:**\n- Clear separation of concerns\n- Easier to maintain\n- Better for multiple servers\n\n### Method 2: Inline in plugin.json\n\nAdd `mcpServers` field to plugin.json:\n\n```json\n{\n  \"name\": \"my-plugin\",\n  \"version\": \"1.0.0\",\n  \"mcpServers\": {\n    \"plugin-api\": {\n      \"command\": \"${CLAUDE_PLUGIN_ROOT}\u002Fservers\u002Fapi-server\",\n      \"args\": [\"--port\", \"8080\"]\n    }\n  }\n}\n```\n\n**Benefits:**\n- Single configuration file\n- Good for simple single-server plugins\n\n## MCP Server Types\n\n### stdio (Local Process)\n\nExecute local MCP servers as child processes. Best for local tools and custom servers.\n\n**Configuration:**\n```json\n{\n  \"filesystem\": {\n    \"command\": \"npx\",\n    \"args\": [\"-y\", \"@modelcontextprotocol\u002Fserver-filesystem\", \"\u002Fallowed\u002Fpath\"],\n    \"env\": {\n      \"LOG_LEVEL\": \"debug\"\n    }\n  }\n}\n```\n\n**Use cases:**\n- File system access\n- Local database connections\n- Custom MCP servers\n- NPM-packaged MCP servers\n\n**Process management:**\n- Claude Code spawns and manages the process\n- Communicates via stdin\u002Fstdout\n- Terminates when Claude Code exits\n\n### SSE (Server-Sent Events)\n\nConnect to hosted MCP servers with OAuth support. Best for cloud services.\n\n**Configuration:**\n```json\n{\n  \"asana\": {\n    \"type\": \"sse\",\n    \"url\": \"https:\u002F\u002Fmcp.asana.com\u002Fsse\"\n  }\n}\n```\n\n**Use cases:**\n- Official hosted MCP servers (Asana, GitHub, etc.)\n- Cloud services with MCP endpoints\n- OAuth-based authentication\n- No local installation needed\n\n**Authentication:**\n- OAuth flows handled automatically\n- User prompted on first use\n- Tokens managed by Claude Code\n\n### HTTP (REST API)\n\nConnect to RESTful MCP servers with token authentication.\n\n**Configuration:**\n```json\n{\n  \"api-service\": {\n    \"type\": \"http\",\n    \"url\": \"https:\u002F\u002Fapi.example.com\u002Fmcp\",\n    \"headers\": {\n      \"Authorization\": \"Bearer ${API_TOKEN}\",\n      \"X-Custom-Header\": \"value\"\n    }\n  }\n}\n```\n\n**Use cases:**\n- REST API-based MCP servers\n- Token-based authentication\n- Custom API backends\n- Stateless interactions\n\n### WebSocket (Real-time)\n\nConnect to WebSocket MCP servers for real-time bidirectional communication.\n\n**Configuration:**\n```json\n{\n  \"realtime-service\": {\n    \"type\": \"ws\",\n    \"url\": \"wss:\u002F\u002Fmcp.example.com\u002Fws\",\n    \"headers\": {\n      \"Authorization\": \"Bearer ${TOKEN}\"\n    }\n  }\n}\n```\n\n**Use cases:**\n- Real-time data streaming\n- Persistent connections\n- Push notifications from server\n- Low-latency requirements\n\n## Environment Variable Expansion\n\nAll MCP configurations support environment variable substitution:\n\n**${CLAUDE_PLUGIN_ROOT}** - Plugin directory (always use for portability):\n```json\n{\n  \"command\": \"${CLAUDE_PLUGIN_ROOT}\u002Fservers\u002Fmy-server\"\n}\n```\n\n**User environment variables** - From user's shell:\n```json\n{\n  \"env\": {\n    \"API_KEY\": \"${MY_API_KEY}\",\n    \"DATABASE_URL\": \"${DB_URL}\"\n  }\n}\n```\n\n**Best practice:** Document all required environment variables in plugin README.\n\n## MCP Tool Naming\n\nWhen MCP servers provide tools, they're automatically prefixed:\n\n**Format:** `mcp__plugin_\u003Cplugin-name>_\u003Cserver-name>__\u003Ctool-name>`\n\n**Example:**\n- Plugin: `asana`\n- Server: `asana`\n- Tool: `create_task`\n- **Full name:** `mcp__plugin_asana_asana__asana_create_task`\n\n### Using MCP Tools in Commands\n\nPre-allow specific MCP tools in command frontmatter:\n\n```markdown\n---\nallowed-tools: [\n  \"mcp__plugin_asana_asana__asana_create_task\",\n  \"mcp__plugin_asana_asana__asana_search_tasks\"\n]\n---\n```\n\n**Wildcard (use sparingly):**\n```markdown\n---\nallowed-tools: [\"mcp__plugin_asana_asana__*\"]\n---\n```\n\n**Best practice:** Pre-allow specific tools, not wildcards, for security.\n\n## Lifecycle Management\n\n**Automatic startup:**\n- MCP servers start when plugin enables\n- Connection established before first tool use\n- Restart required for configuration changes\n\n**Lifecycle:**\n1. Plugin loads\n2. MCP configuration parsed\n3. Server process started (stdio) or connection established (SSE\u002FHTTP\u002FWS)\n4. Tools discovered and registered\n5. Tools available as `mcp__plugin_...__...`\n\n**Viewing servers:**\nUse `\u002Fmcp` command to see all servers including plugin-provided ones.\n\n## Authentication Patterns\n\n### OAuth (SSE\u002FHTTP)\n\nOAuth handled automatically by Claude Code:\n\n```json\n{\n  \"type\": \"sse\",\n  \"url\": \"https:\u002F\u002Fmcp.example.com\u002Fsse\"\n}\n```\n\nUser authenticates in browser on first use. No additional configuration needed.\n\n### Token-Based (Headers)\n\nStatic or environment variable tokens:\n\n```json\n{\n  \"type\": \"http\",\n  \"url\": \"https:\u002F\u002Fapi.example.com\",\n  \"headers\": {\n    \"Authorization\": \"Bearer ${API_TOKEN}\"\n  }\n}\n```\n\nDocument required environment variables in README.\n\n### Environment Variables (stdio)\n\nPass configuration to MCP server:\n\n```json\n{\n  \"command\": \"python\",\n  \"args\": [\"-m\", \"my_mcp_server\"],\n  \"env\": {\n    \"DATABASE_URL\": \"${DB_URL}\",\n    \"API_KEY\": \"${API_KEY}\",\n    \"LOG_LEVEL\": \"info\"\n  }\n}\n```\n\n## Integration Patterns\n\n### Pattern 1: Simple Tool Wrapper\n\nCommands use MCP tools with user interaction:\n\n```markdown\n# Command: create-item.md\n---\nallowed-tools: [\"mcp__plugin_name_server__create_item\"]\n---\n\nSteps:\n1. Gather item details from user\n2. Use mcp__plugin_name_server__create_item\n3. Confirm creation\n```\n\n**Use for:** Adding validation or preprocessing before MCP calls.\n\n### Pattern 2: Autonomous Agent\n\nAgents use MCP tools autonomously:\n\n```markdown\n# Agent: data-analyzer.md\n\nAnalysis Process:\n1. Query data via mcp__plugin_db_server__query\n2. Process and analyze results\n3. Generate insights report\n```\n\n**Use for:** Multi-step MCP workflows without user interaction.\n\n### Pattern 3: Multi-Server Plugin\n\nIntegrate multiple MCP servers:\n\n```json\n{\n  \"github\": {\n    \"type\": \"sse\",\n    \"url\": \"https:\u002F\u002Fmcp.github.com\u002Fsse\"\n  },\n  \"jira\": {\n    \"type\": \"sse\",\n    \"url\": \"https:\u002F\u002Fmcp.jira.com\u002Fsse\"\n  }\n}\n```\n\n**Use for:** Workflows spanning multiple services.\n\n## Security Best Practices\n\n### Use HTTPS\u002FWSS\n\nAlways use secure connections:\n\n```json\n✅ \"url\": \"https:\u002F\u002Fmcp.example.com\u002Fsse\"\n❌ \"url\": \"http:\u002F\u002Fmcp.example.com\u002Fsse\"\n```\n\n### Token Management\n\n**DO:**\n- ✅ Use environment variables for tokens\n- ✅ Document required env vars in README\n- ✅ Let OAuth flow handle authentication\n\n**DON'T:**\n- ❌ Hardcode tokens in configuration\n- ❌ Commit tokens to git\n- ❌ Share tokens in documentation\n\n### Permission Scoping\n\nPre-allow only necessary MCP tools:\n\n```markdown\n✅ allowed-tools: [\n  \"mcp__plugin_api_server__read_data\",\n  \"mcp__plugin_api_server__create_item\"\n]\n\n❌ allowed-tools: [\"mcp__plugin_api_server__*\"]\n```\n\n## Error Handling\n\n### Connection Failures\n\nHandle MCP server unavailability:\n- Provide fallback behavior in commands\n- Inform user of connection issues\n- Check server URL and configuration\n\n### Tool Call Errors\n\nHandle failed MCP operations:\n- Validate inputs before calling MCP tools\n- Provide clear error messages\n- Check rate limiting and quotas\n\n### Configuration Errors\n\nValidate MCP configuration:\n- Test server connectivity during development\n- Validate JSON syntax\n- Check required environment variables\n\n## Performance Considerations\n\n### Lazy Loading\n\nMCP servers connect on-demand:\n- Not all servers connect at startup\n- First tool use triggers connection\n- Connection pooling managed automatically\n\n### Batching\n\nBatch similar requests when possible:\n\n```\n# Good: Single query with filters\ntasks = search_tasks(project=\"X\", assignee=\"me\", limit=50)\n\n# Avoid: Many individual queries\nfor id in task_ids:\n    task = get_task(id)\n```\n\n## Testing MCP Integration\n\n### Local Testing\n\n1. Configure MCP server in `.mcp.json`\n2. Install plugin locally (`.claude-plugin\u002F`)\n3. Run `\u002Fmcp` to verify server appears\n4. Test tool calls in commands\n5. Check `claude --debug` logs for connection issues\n\n### Validation Checklist\n\n- [ ] MCP configuration is valid JSON\n- [ ] Server URL is correct and accessible\n- [ ] Required environment variables documented\n- [ ] Tools appear in `\u002Fmcp` output\n- [ ] Authentication works (OAuth or tokens)\n- [ ] Tool calls succeed from commands\n- [ ] Error cases handled gracefully\n\n## Debugging\n\n### Enable Debug Logging\n\n```bash\nclaude --debug\n```\n\nLook for:\n- MCP server connection attempts\n- Tool discovery logs\n- Authentication flows\n- Tool call errors\n\n### Common Issues\n\n**Server not connecting:**\n- Check URL is correct\n- Verify server is running (stdio)\n- Check network connectivity\n- Review authentication configuration\n\n**Tools not available:**\n- Verify server connected successfully\n- Check tool names match exactly\n- Run `\u002Fmcp` to see available tools\n- Restart Claude Code after config changes\n\n**Authentication failing:**\n- Clear cached auth tokens\n- Re-authenticate\n- Check token scopes and permissions\n- Verify environment variables set\n\n## Quick Reference\n\n### MCP Server Types\n\n| Type | Transport | Best For | Auth |\n|------|-----------|----------|------|\n| stdio | Process | Local tools, custom servers | Env vars |\n| SSE | HTTP | Hosted services, cloud APIs | OAuth |\n| HTTP | REST | API backends, token auth | Tokens |\n| ws | WebSocket | Real-time, streaming | Tokens |\n\n### Configuration Checklist\n\n- [ ] Server type specified (stdio\u002FSSE\u002FHTTP\u002Fws)\n- [ ] Type-specific fields complete (command or url)\n- [ ] Authentication configured\n- [ ] Environment variables documented\n- [ ] HTTPS\u002FWSS used (not HTTP\u002FWS)\n- [ ] ${CLAUDE_PLUGIN_ROOT} used for paths\n\n### Best Practices\n\n**DO:**\n- ✅ Use ${CLAUDE_PLUGIN_ROOT} for portable paths\n- ✅ Document required environment variables\n- ✅ Use secure connections (HTTPS\u002FWSS)\n- ✅ Pre-allow specific MCP tools in commands\n- ✅ Test MCP integration before publishing\n- ✅ Handle connection and tool errors gracefully\n\n**DON'T:**\n- ❌ Hardcode absolute paths\n- ❌ Commit credentials to git\n- ❌ Use HTTP instead of HTTPS\n- ❌ Pre-allow all tools with wildcards\n- ❌ Skip error handling\n- ❌ Forget to document setup\n\n## Additional Resources\n\n### Reference Files\n\nFor detailed information, consult:\n\n- **`references\u002Fserver-types.md`** - Deep dive on each server type\n- **`references\u002Fauthentication.md`** - Authentication patterns and OAuth\n- **`references\u002Ftool-usage.md`** - Using MCP tools in commands and agents\n\n### Example Configurations\n\nWorking examples in `examples\u002F`:\n\n- **`stdio-server.json`** - Local stdio MCP server\n- **`sse-server.json`** - Hosted SSE server with OAuth\n- **`http-server.json`** - REST API with token auth\n\n### External Resources\n\n- **Official MCP Docs**: https:\u002F\u002Fmodelcontextprotocol.io\u002F\n- **Claude Code MCP Docs**: https:\u002F\u002Fdocs.claude.com\u002Fen\u002Fdocs\u002Fclaude-code\u002Fmcp\n- **MCP SDK**: @modelcontextprotocol\u002Fsdk\n- **Testing**: Use `claude --debug` and `\u002Fmcp` command\n\n## Implementation Workflow\n\nTo add MCP integration to a plugin:\n\n1. Choose MCP server type (stdio, SSE, HTTP, ws)\n2. Create `.mcp.json` at plugin root with configuration\n3. Use ${CLAUDE_PLUGIN_ROOT} for all file references\n4. Document required environment variables in README\n5. Test locally with `\u002Fmcp` command\n6. Pre-allow MCP tools in relevant commands\n7. Handle authentication (OAuth or tokens)\n8. Test error cases (connection failures, auth errors)\n9. Document MCP integration in plugin README\n\nFocus on stdio for custom\u002Flocal servers, SSE for hosted services with OAuth.\n",{"name":5,"version":55,"description":7},"0.1.0","main","e970014d895eae2572d8c434d79f2c6acea22417","plugins\u002Fclaude-plugins-official-main\u002Fplugins\u002Fplugin-dev\u002Fskills\u002Fmcp-integration",20,"https:\u002F\u002Fgithub.com\u002Fxiaoyuge886\u002Faigc","https:\u002F\u002Fgithub.com\u002Fxiaoyuge886","2026-07-14 17:19:42",{"source":9,"skillName":5,"commands":64,"prompt":74,"zipAvailable":75},[65,68,71],{"tool":66,"command":67},"npx","npx skills add xiaoyuge886\u002Faigc --skill mcp-integration",{"tool":69,"command":70},"bunx","bunx skills add xiaoyuge886\u002Faigc --skill mcp-integration",{"tool":72,"command":73},"pnpm","pnpm dlx skills add xiaoyuge886\u002Faigc --skill mcp-integration","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fxiaoyuge886\u002Faigc\u002Fblob\u002Fmain\u002Fplugins\u002Fclaude-plugins-official-main\u002Fplugins\u002Fplugin-dev\u002Fskills\u002Fmcp-integration\u002FSKILL.md",true,[77,83,87,91,95,99,103,107],{"path":78,"resourceType":79,"resourceTypeDesc":80,"sizeBytes":81,"sourceHtmlUrl":82},"examples\u002Fhttp-server.json","REFERENCE","参考文档",502,"https:\u002F\u002Fgithub.com\u002Fxiaoyuge886\u002Faigc\u002Fblob\u002Fmain\u002Fplugins\u002Fclaude-plugins-official-main\u002Fplugins\u002Fplugin-dev\u002Fskills\u002Fmcp-integration\u002Fexamples\u002Fhttp-server.json",{"path":84,"resourceType":79,"resourceTypeDesc":80,"sizeBytes":85,"sourceHtmlUrl":86},"examples\u002Fsse-server.json",413,"https:\u002F\u002Fgithub.com\u002Fxiaoyuge886\u002Faigc\u002Fblob\u002Fmain\u002Fplugins\u002Fclaude-plugins-official-main\u002Fplugins\u002Fplugin-dev\u002Fskills\u002Fmcp-integration\u002Fexamples\u002Fsse-server.json",{"path":88,"resourceType":79,"resourceTypeDesc":80,"sizeBytes":89,"sourceHtmlUrl":90},"examples\u002Fstdio-server.json",686,"https:\u002F\u002Fgithub.com\u002Fxiaoyuge886\u002Faigc\u002Fblob\u002Fmain\u002Fplugins\u002Fclaude-plugins-official-main\u002Fplugins\u002Fplugin-dev\u002Fskills\u002Fmcp-integration\u002Fexamples\u002Fstdio-server.json",{"path":92,"resourceType":79,"resourceTypeDesc":80,"sizeBytes":93,"sourceHtmlUrl":94},"references\u002Fauthentication.md",10196,"https:\u002F\u002Fgithub.com\u002Fxiaoyuge886\u002Faigc\u002Fblob\u002Fmain\u002Fplugins\u002Fclaude-plugins-official-main\u002Fplugins\u002Fplugin-dev\u002Fskills\u002Fmcp-integration\u002Freferences\u002Fauthentication.md",{"path":96,"resourceType":79,"resourceTypeDesc":80,"sizeBytes":97,"sourceHtmlUrl":98},"references\u002Fserver-types.md",10613,"https:\u002F\u002Fgithub.com\u002Fxiaoyuge886\u002Faigc\u002Fblob\u002Fmain\u002Fplugins\u002Fclaude-plugins-official-main\u002Fplugins\u002Fplugin-dev\u002Fskills\u002Fmcp-integration\u002Freferences\u002Fserver-types.md",{"path":100,"resourceType":79,"resourceTypeDesc":80,"sizeBytes":101,"sourceHtmlUrl":102},"references\u002Ftool-usage.md",11674,"https:\u002F\u002Fgithub.com\u002Fxiaoyuge886\u002Faigc\u002Fblob\u002Fmain\u002Fplugins\u002Fclaude-plugins-official-main\u002Fplugins\u002Fplugin-dev\u002Fskills\u002Fmcp-integration\u002Freferences\u002Ftool-usage.md",{"path":104,"resourceType":79,"resourceTypeDesc":80,"sizeBytes":105,"sourceHtmlUrl":106},"SOURCE.md",196,"https:\u002F\u002Fgithub.com\u002Fjiayaoqijia\u002Fcryptoskill\u002Fblob\u002Fmain\u002Fskills\u002Fanalytics\u002Faura-sight-nft\u002FSOURCE.md",{"path":108,"resourceType":79,"resourceTypeDesc":80,"sizeBytes":109,"sourceHtmlUrl":110},"TRUST.auto.yaml",2217,"https:\u002F\u002Fgithub.com\u002Fjiayaoqijia\u002Fcryptoskill\u002Fblob\u002Fmain\u002Fskills\u002Fanalytics\u002Faura-sight-nft\u002FTRUST.auto.yaml",[112,137,155,175,198,218],{"skillNo":113,"name":114,"nameZh":115,"description":116,"descriptionZh":117,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":13,"sourceHtmlUrl":118,"categories":119,"keywords":124,"publishedAt":50},"01M6C7NPNK167QMPERW14AY55J","skill-creator","技能创建与优化","Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, update or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy.","创建新技能、修改和改进现有技能，并衡量技能性能。当用户想要从零开始创建技能、更新或优化现有技能、运行评估（evals）来测试技能、通过方差分析对技能性能进行基准测试，或优化技能描述以提高触发准确性时使用。","https:\u002F\u002Fgithub.com\u002Fxiaoyuge886\u002Faigc\u002Fblob\u002Fmain\u002Fplugins\u002Fclaude-plugins-official-main\u002Fplugins\u002Fskill-creator\u002Fskills\u002Fskill-creator\u002FSKILL.md",[120,121],{"categoryNo":25,"categoryName":26,"taxonomyType":27,"taxonomyTypeDesc":28},{"categoryNo":122,"categoryName":123,"taxonomyType":22,"taxonomyTypeDesc":23},"01M8BRZZF9D7PVFN5MXSPWWD61","AI 工程师",[125,126,127,36,128,129,130,131,132,133,134,135,136],"skill creator","variance analysis","evals","improve","analysis","benchmark","update","run","create","test","run evals","performance",{"skillNo":138,"name":139,"nameZh":140,"description":141,"descriptionZh":141,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":13,"sourceHtmlUrl":142,"categories":143,"keywords":150,"publishedAt":50},"01M6C7NKXRM77AMYXSQCX8S15A","investment-due-diligence-report","投资尽调报告生成","投资尽调报告专业生成工具。当用户需要撰写投资尽调报告、尽职调查报告、投资分析报告时使用此skill。支持处理Excel财务数据、PDF文档等多种格式数据源，自动生成包含执行摘要、业务分析、财务分析、风险提示、投资建议等核心章节的专业报告。无论用户明确要求\"写报告\"还是提到\"分析投资标的\"、\"评估项目\"、\"做DD\"等相关需求时，都应使用此skill。","https:\u002F\u002Fgithub.com\u002Fxiaoyuge886\u002Faigc\u002Fblob\u002Fmain\u002Fplugins\u002Fclaude-plugins-official-main\u002Fplugins\u002Fskill-creator\u002Fskills\u002Finvestment-due-diligence-report\u002FSKILL.md",[144,147],{"categoryNo":145,"categoryName":146,"taxonomyType":27,"taxonomyTypeDesc":28},"01M8BTV4QBQYRS1HWEVGR64N4J","金融投资分析",{"categoryNo":148,"categoryName":149,"taxonomyType":22,"taxonomyTypeDesc":23},"01M8BTV4RBGF5SFPS4M35EM7YQ","金融分析师",[151,152,153,154],"investment due diligence report","report","生成","文档",{"skillNo":156,"name":157,"nameZh":158,"description":159,"descriptionZh":160,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":13,"sourceHtmlUrl":161,"categories":162,"keywords":165,"publishedAt":50},"01M6C7NGS2K1NZQ3PR3GM7VMWT","skill-development","Claude 技能开发与创建","This skill should be used when the user wants to \"create a skill\", \"add a skill to plugin\", \"write a new skill\", \"improve skill description\", \"organize skill content\", or needs guidance on skill structure, progressive disclosure, or skill development best practices for Claude Code plugins.","当用户想要\"创建技能\"、\"向插件添加技能\"、\"编写新技能\"、\"改进技能描述\"、\"组织技能内容\"，或需要有关技能结构、渐进式披露或 Claude Code 插件技能开发最佳实践的指导时，应使用此技能。","https:\u002F\u002Fgithub.com\u002Fxiaoyuge886\u002Faigc\u002Fblob\u002Fmain\u002Fplugins\u002Fclaude-plugins-official-main\u002Fplugins\u002Fplugin-dev\u002Fskills\u002Fskill-development\u002FSKILL.md",[163,164],{"categoryNo":20,"categoryName":21,"taxonomyType":22,"taxonomyTypeDesc":23},{"categoryNo":25,"categoryName":26,"taxonomyType":27,"taxonomyTypeDesc":28},[166,167,133,168,169,170,171,45,172,173,128,37,174],"development","skill development","plugins","improve skill","content","best practices","user","plugin","write",{"skillNo":176,"name":177,"nameZh":178,"description":179,"descriptionZh":180,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":13,"sourceHtmlUrl":181,"categories":182,"keywords":185,"publishedAt":50},"01M6C7NDRYM015B9B6T4YHY3NF","plugin-structure","Claude 插件结构搭建","This skill should be used when the user asks to \"create a plugin\", \"scaffold a plugin\", \"understand plugin structure\", \"organize plugin components\", \"set up plugin.json\", \"use ${CLAUDE_PLUGIN_ROOT}\", \"add commands\u002Fagents\u002Fskills\u002Fhooks\", \"configure auto-discovery\", or needs guidance on plugin directory layout, manifest configuration, component organization, file naming conventions, or Claude Code plugin architecture best practices.","当用户要求\"创建插件\"、\"搭建插件框架\"、\"理解插件结构\"、\"组织插件组件\"、\"设置 plugin.json\"、\"使用 ${CLAUDE_PLUGIN_ROOT}\"、\"添加命令\u002F智能体\u002F技能\u002F钩子\"、\"配置自动发现\"，或需要有关插件目录布局、清单配置、组件组织、文件命名规范或 Claude Code 插件架构最佳实践的指导时，应使用此技能。","https:\u002F\u002Fgithub.com\u002Fxiaoyuge886\u002Faigc\u002Fblob\u002Fmain\u002Fplugins\u002Fclaude-plugins-official-main\u002Fplugins\u002Fplugin-dev\u002Fskills\u002Fplugin-structure\u002FSKILL.md",[183,184],{"categoryNo":20,"categoryName":21,"taxonomyType":22,"taxonomyTypeDesc":23},{"categoryNo":25,"categoryName":26,"taxonomyType":27,"taxonomyTypeDesc":28},[173,186,187,34,188,36,189,190,43,191,192,193,194,171,45,133,195,42,196,197],"Plugin Structure","hooks","auto","file naming conventions","plugin architecture","component","discovery","manifest","file","architecture","components","claude code plugin",{"skillNo":199,"name":200,"nameZh":201,"description":202,"descriptionZh":203,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":13,"sourceHtmlUrl":204,"categories":205,"keywords":208,"publishedAt":50},"01M6C7NAM6KNC9NT147RJ41V2N","plugin-settings","插件配置与状态管理","This skill should be used when the user asks about \"plugin settings\", \"store plugin configuration\", \"user-configurable plugin\", \".local.md files\", \"plugin state files\", \"read YAML frontmatter\", \"per-project plugin settings\", or wants to make plugin behavior configurable. Documents the .claude\u002Fplugin-name.local.md pattern for storing plugin-specific configuration with YAML frontmatter and markdown content.","当用户询问“插件设置”、“存储插件配置”、“用户可配置插件”、“.local.md 文件”、“插件状态文件”、“读取 YAML frontmatter”、“按项目划分的插件设置”，或希望让插件行为可配置时，应使用本技能。本技能介绍 .claude\u002Fplugin-name.local.md 模式，用于通过 YAML frontmatter 和 markdown 内容存储插件专属配置。","https:\u002F\u002Fgithub.com\u002Fxiaoyuge886\u002Faigc\u002Fblob\u002Fmain\u002Fplugins\u002Fclaude-plugins-official-main\u002Fplugins\u002Fplugin-dev\u002Fskills\u002Fplugin-settings\u002FSKILL.md",[206,207],{"categoryNo":20,"categoryName":21,"taxonomyType":22,"taxonomyTypeDesc":23},{"categoryNo":25,"categoryName":26,"taxonomyType":27,"taxonomyTypeDesc":28},[173,209,210,211,212,170,172,213,214,215,216,217],"settings","Plugin Settings","state","documents","behavior","read","markdown content","markdown","yaml",{"skillNo":219,"name":220,"nameZh":221,"description":222,"descriptionZh":223,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":13,"sourceHtmlUrl":224,"categories":225,"keywords":228,"publishedAt":50},"01M6C7N3WX29W85598HRNT5XYZ","hook-development","Claude插件钩子开发","This skill should be used when the user asks to \"create a hook\", \"add a PreToolUse\u002FPostToolUse\u002FStop hook\", \"validate tool use\", \"implement prompt-based hooks\", \"use ${CLAUDE_PLUGIN_ROOT}\", \"set up event-driven automation\", \"block dangerous commands\", or mentions hook events (PreToolUse, PostToolUse, Stop, SubagentStop, SessionStart, SessionEnd, UserPromptSubmit, PreCompact, Notification). Provides comprehensive guidance for creating and implementing Claude Code plugin hooks with focus on advanced prompt-based hooks API.","当用户要求“创建钩子”、“添加 PreToolUse\u002FPostToolUse\u002FStop 钩子”、“验证工具使用”、“实现基于提示词的钩子”、“使用 ${CLAUDE_PLUGIN_ROOT}”、“设置事件驱动自动化”、“阻止危险命令”，或提及钩子事件（PreToolUse、PostToolUse、Stop、SubagentStop、SessionStart、SessionEnd、UserPromptSubmit、PreCompact、Notification）时，应使用此技能。提供关于创建和实现 Claude Code 插件钩子的全面指导，重点介绍高级的基于提示词的 hooks API。","https:\u002F\u002Fgithub.com\u002Fxiaoyuge886\u002Faigc\u002Fblob\u002Fmain\u002Fplugins\u002Fclaude-plugins-official-main\u002Fplugins\u002Fplugin-dev\u002Fskills\u002Fhook-development\u002FSKILL.md",[226,227],{"categoryNo":20,"categoryName":21,"taxonomyType":22,"taxonomyTypeDesc":23},{"categoryNo":25,"categoryName":26,"taxonomyType":27,"taxonomyTypeDesc":28},[229,166,230,231,187,34,36,172,232,41,43,233,45,133,173,234,235,236,197],"Hook Development","api","stop","prompt","tool use","validate","automation","implement"]