用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/testdino-hq/testdino-mcp --skill add-tool命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
正在显示 SKILL.md
| name | add-tool |
| description | Scaffold and implement a new MCP tool end-to-end — endpoint, handler, registration, docs |
| argument-hint | [tool-name and description] |
Add a new MCP tool: $ARGUMENTS
Do NOT start coding immediately. Follow this workflow.
If any of these are unclear, ask before proceeding.
List every file that needs to be created or modified:
src/lib/endpoints.ts — new endpoint URL buildersrc/tools/<category>/<tool-name>.ts — new tool filesrc/tools/index.ts — barrel exportsrc/index.ts — tool registration + routingdocs/TOOLS.md — tool documentationdocs/skill.md — if it affects AI agent workflowsGet user approval before writing code.
Follow this exact order:
Add a new method to the endpoints object. Follow the existing pattern:
toolName: (params: { projectId: string /* other params */ }): string => {
const baseUrl = getBaseUrl();
const { projectId, ...queryParams } = params;
const queryString = buildQueryString(queryParams);
return `${baseUrl}/api/mcp/${projectId}/endpoint-path${queryString}`;
};
Run: npm run typecheck
Create the tool file with exactly two exports:
export const toolNameTool = {
name: "tool_name",
description: "...", // Write for AI agents — be specific about when to use this
inputSchema: {
type: "object",
properties: { /* every property MUST have a description */ },
required: [/* required params */]
}
};
export async function handleToolName(args: Record<string, unknown>) {
// 1. Auth
const token = getApiKey(args);
if (!token) throw new Error("Missing TESTDINO_PAT...");
// 2. Validate required params
if (!args?.projectId) throw new Error("projectId is required");
// 3. Build URL
const url = endpoints.toolName({ projectId: String(args.projectId), ... });
// 4. Fetch
const response = await apiRequestJson(url, {
headers: { Authorization: }
});
{
: [{ : , : .(response, , ) }]
};
}
Run: npm run typecheck
Add export line following existing pattern:
export { toolNameTool, handleToolName } from "./<category>/<tool-name>.js";
Run: npm run typecheck
Two changes:
tools arrayRun: npm run typecheck && npm run lint
Add test file at tests/tools/<category>/<tool-name>.test.ts covering:
Run: npm run test
docs/TOOLS.md following existing formatdocs/skill.md if the tool creates a new workflow or decision pathREADME.md if applicablenpm run format && npm run typecheck && npm run lint && npm run test && npm run build
All must pass. git diff to confirm only intentional changes.
基于 SOC 职业分类