skill_crud
Create, list, search, get, validate, and delete reusable skills stored locally for the Skill Management MCP Server.
Instructions
Unified CRUD tool for skill management.
IMPORTANT NOTES:
Skills are stored in ~/.skill-mcp/skills directory
All file paths in responses are relative to the skill directory (e.g., 'main.py', not full paths)
To execute scripts, use the 'run_skill_script' tool, NOT external bash/shell tools
Operations:
create: Create a new skill with templates (basic, python, bash, nodejs)
list: List all skills with optional search (supports text and regex)
search: Search for skills by pattern (text or regex)
get: Get detailed information about a specific skill
validate: Validate skill structure and get diagnostics
delete: Delete a skill directory (requires confirm=true)
list_templates: List all available skill templates with descriptions
Examples:
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| operation | Yes | Operation to perform: 'create', 'list', 'get', 'validate', 'delete' | |
| skill_name | No | Name of the skill (required for get, validate, delete, create) | |
| description | No | Skill description (optional for create) | |
| template | No | Template to use for create: 'basic', 'python', 'bash', 'nodejs' | basic |
| search | No | Search pattern for list (text or regex) | |
| include_content | No | Include SKILL.md content in get operation | |
| confirm | No | Confirm delete operation (required for delete) |
Implementation Reference
- src/skill_mcp/tools/skill_crud.py:71-98 (handler)Main handler `skill_crud` dispatching to operation-specific private methods.async def skill_crud(input_data: SkillCrudInput) -> list[types.TextContent]: """Handle skill CRUD operations.""" operation = input_data.operation try: if operation == "list": return await SkillCrud._handle_list(input_data) elif operation == "search": return await SkillCrud._handle_search(input_data) elif operation == "get": return await SkillCrud._handle_get(input_data) elif operation == "validate": return await SkillCrud._handle_validate(input_data) elif operation == "delete": return await SkillCrud._handle_delete(input_data) elif operation == "create": return await SkillCrud._handle_create(input_data) elif operation == "list_templates": return await SkillCrud._handle_list_templates(input_data) else: return [ types.TextContent( type="text", text=f"Unknown operation: {operation}. Valid operations: create, list, search, get, validate, delete, list_templates", ) ] except Exception as e: return [types.TextContent(type="text", text=f"Error: {str(e)}")]
- src/skill_mcp/models_crud.py:15-40 (schema)Pydantic input schema `SkillCrudInput` used by the tool.class SkillCrudInput(BaseModel): """Unified input for skill CRUD operations.""" operation: str = Field( description="Operation to perform: 'create', 'list', 'get', 'validate', 'delete'" ) skill_name: Optional[str] = Field( default=None, description="Name of the skill (required for get, validate, delete, create)" ) description: Optional[str] = Field( default=None, description="Skill description (optional for create)" ) template: Optional[str] = Field( default="basic", description="Template to use for create: 'basic', 'python', 'bash', 'nodejs'", ) search: Optional[str] = Field( default=None, description="Search pattern for list (text or regex)" ) include_content: bool = Field( default=False, description="Include SKILL.md content in get operation" ) confirm: bool = Field( default=False, description="Confirm delete operation (required for delete)" )
- src/skill_mcp/tools/skill_crud.py:19-68 (registration)Tool definition including name, description, and inputSchema reference.def get_tool_definition() -> list[types.Tool]: """Get tool definition.""" return [ types.Tool( name="skill_crud", description="""Unified CRUD tool for skill management. IMPORTANT NOTES: - Skills are stored in ~/.skill-mcp/skills directory - All file paths in responses are relative to the skill directory (e.g., 'main.py', not full paths) - To execute scripts, use the 'run_skill_script' tool, NOT external bash/shell tools **Operations:** - **create**: Create a new skill with templates (basic, python, bash, nodejs) - **list**: List all skills with optional search (supports text and regex) - **search**: Search for skills by pattern (text or regex) - **get**: Get detailed information about a specific skill - **validate**: Validate skill structure and get diagnostics - **delete**: Delete a skill directory (requires confirm=true) - **list_templates**: List all available skill templates with descriptions **Examples:** ```json // List available templates {"operation": "list_templates"} // Create a Python skill {"operation": "create", "skill_name": "my-skill", "description": "My skill", "template": "python"} // List all skills {"operation": "list"} // Search skills by text {"operation": "search", "search": "weather"} // Search skills by regex pattern {"operation": "search", "search": "^api-"} // Get skill details {"operation": "get", "skill_name": "my-skill", "include_content": true} // Validate skill {"operation": "validate", "skill_name": "my-skill"} // Delete skill {"operation": "delete", "skill_name": "my-skill", "confirm": true} ```""", inputSchema=SkillCrudInput.model_json_schema(), ) ]
- src/skill_mcp/server.py:30-38 (registration)MCP server registration: adds skill_crud to list_tools via get_tool_definition()@app.list_tools() # type: ignore[misc] async def list_tools() -> list[types.Tool]: """List available tools.""" tools = [] tools.extend(SkillCrud.get_tool_definition()) tools.extend(SkillFilesCrud.get_tool_definition()) tools.extend(SkillEnvCrud.get_tool_definition()) tools.extend(ScriptTools.get_script_tools()) return tools
- src/skill_mcp/server.py:46-48 (registration)MCP server call_tool dispatch: handles calls to skill_crud tool.if name == "skill_crud": skill_input = SkillCrudInput(**arguments) return await SkillCrud.skill_crud(skill_input)