원클릭으로
code-writing
Write or modify tool handlers, utilities, and core logic in the docsgrep codebase
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Write or modify tool handlers, utilities, and core logic in the docsgrep codebase
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
| name | code-writing |
| description | Write or modify tool handlers, utilities, and core logic in the docsgrep codebase |
AGENTS.md for repo conventions.Every tool must return McpToolResponse:
import type { McpToolResponse } from "../types/tools.js";
export async function handleMyTool(args: MyToolArgs): Promise<McpToolResponse> {
try {
const dirPath = validateDirPath(validateStringParam(args.dirPath, "dirPath"));
// ... do work ...
return { content: [{ type: "text", text: JSON.stringify(result, null, 2) })];
} catch (error: any) {
return { content: [{ type: "text", text: error.message }], isError: true };
}
}
Extend BaseTool<T> from tools/base.ts when you need built-in concurrency control, logging, and credential masking. Then wrap in a thin function for the registry:
class MyTool extends BaseTool<MyToolArgs> {
protected async run(args: MyToolArgs): Promise<McpToolResponse> {
// ... implementation ...
}
}
export async function handleMyTool(args: MyToolArgs): Promise<McpToolResponse> {
return new MyTool().execute(args);
}
Add the handler to ToolRegistry in tools/registry.ts. For class-based tools, pass as an override in index.ts.
Add a JSON Schema entry to src/config/tools.json with name, description, and inputSchema.
.js extensions: every local import MUST end in .js.any: use typed args from types/tools.ts.validateDirPath and validateStringParam at entry.FileScanner.findFiles() from tools/base.ts — it handles .gitignore, includePath, excludePath.AppInfo from utils/app-info.ts, never hardcode version/name.operationLimiter from utils/semaphore.js.maskSensitive in tools/base.ts.