/** * _template.md generator for new skills */ export function generateTemplateMd(): string { return `--- skill_id: SKILL_ID_HERE mcp_server: MCP_SERVER_NAME category: CATEGORY_HERE tags: [tag1, tag2, tag3] agent_db_tracking: true --- # SKILL_NAME MCP Skill ## Purpose Brief description of what this skill does and when to use it. ## MCP Server Configuration **Command:** \`npx -y \` **Required Environment Variables:** - \`API_KEY\`: Your API key for this service - \`WORKSPACE_ID\`: Optional workspace/org identifier ## Tools Available ### tool_name_1 Brief description of what this tool does. **Arguments:** \`\`\`json { "arg1": "string - description", "arg2": "number - description", "optional_arg": "string - optional description" } \`\`\` **Usage:** \`\`\`bash npx claude-flow mcp SKILL_ID_HERE \\ --tool tool_name_1 \\ --args '{"arg1":"value1","arg2":123}' \`\`\` **Returns:** \`\`\`json { "result": "description of result", "status": "success | error" } \`\`\` ### tool_name_2 Description of second tool. **Arguments:** \`\`\`json { "input": "string - what goes here" } \`\`\` **Usage:** \`\`\`bash npx claude-flow mcp SKILL_ID_HERE \\ --tool tool_name_2 \\ --args '{"input":"example input"}' \`\`\` ## Complete Examples ### Example 1: Common Use Case Description of what this example accomplishes. \`\`\`bash # Step 1: Do something npx claude-flow mcp SKILL_ID_HERE \\ --tool tool_name_1 \\ --args '{ "arg1": "example value", "arg2": 42 }' # Step 2: Use the result npx claude-flow mcp SKILL_ID_HERE \\ --tool tool_name_2 \\ --args '{"input":"result_from_step_1"}' \`\`\` ### Example 2: Advanced Pattern \`\`\`bash npx claude-flow mcp SKILL_ID_HERE \\ --tool tool_name_1 \\ --args '{ "arg1": "complex example", "arg2": 100, "optional_arg": "additional config" }' \`\`\` ## Common Issues ### Error: "Invalid API key" **Cause:** Missing or incorrect \`API_KEY\` environment variable **Fix:** Set \`API_KEY\` in your environment or \`.env\` file ### Error: "Rate limit exceeded" **Cause:** Too many requests in short time **Fix:** Add delays between calls or use batch operations ## AgentDB Integration This skill automatically tracks: - **Input patterns**: Most common argument combinations - **Success rate**: Percentage of successful calls - **Latency**: Average response time per tool - **Error patterns**: Common failure modes and their frequency - **Usage trends**: When and how often this skill is used ### Iris Evaluation Iris can analyze this skill's usage and suggest: - Better argument validation patterns - Optimal retry strategies - When to batch operations - Alternative tools for specific use cases Run evaluation with: \`\`\`bash npm run iris:evaluate -- --project --filter skill:SKILL_ID_HERE \`\`\` ## References - [Official API Docs](https://example.com/docs) - [MCP Server Repository](https://github.com/org/mcp-server) - [Internal Usage Guide](../docs/guides/SKILL_ID_HERE-guide.md) ## Maintenance **Last Updated:** YYYY-MM-DD **Maintainer:** @username **Version:** 1.0.0 Update this skill when: - MCP server is updated to new version - New tools are added - Common patterns change - Error handling improves `; }