원클릭으로
add-tool-module
Add a Bun-native TypeScript tool with schema, registry wiring, policy boundaries, and Bun tests.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Add a Bun-native TypeScript tool with schema, registry wiring, policy boundaries, and Bun tests.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
| name | add-tool-module |
| description | Add a Bun-native TypeScript tool with schema, registry wiring, policy boundaries, and Bun tests. |
| version | 2.0.0 |
| tags | ["tools","registry","schema","typescript","bun","xerxes"] |
| required_tools | ["ReadFile","WriteFile","FileEditTool","GlobTool"] |
Use this skill when adding an LLM-callable Xerxes tool or a native tool module.
A tool supplies a JSON-schema-compatible ToolDefinition and a typed handler
registered with ToolRegistry.
Do not use this skill for an agent YAML definition, a channel adapter, or a frontend command that has no tool-call contract.
Create a descriptive camel-case module under xerxes/src/tools/, such
as financeTools.ts. Read:
xerxes/src/executors/toolRegistry.tsxerxes/src/types/toolCalls.tsclarify.ts or mathTools.tsEvery tool definition uses the OpenAI-style native shape:
import { ToolRegistry } from '../executors/toolRegistry.js'
import type { JsonObject, ToolDefinition } from '../types/toolCalls.js'
export const MY_TOOL_DEFINITION: ToolDefinition = {
type: 'function',
function: {
name: 'my_tool',
description: 'Describe the observable operation.',
parameters: {
type: 'object',
additionalProperties: false,
properties: { input: { type: 'string' } },
required: ['input'],
},
},
}
export async function myTool(inputs: JsonObject): Promise<JsonObject> {
const input = inputs.input
if (typeof input !== 'string' || !input.trim()) {
throw new TypeError('input must be a non-empty string')
}
return { value: input.trim() }
}
export function registerMyTools(registry: ToolRegistry): void {
registry.register(MY_TOOL_DEFINITION, myTool)
}
Use JsonObject/JsonValue and validate all untrusted inputs at the boundary.
Use AbortSignal when the handler performs a cancellable asynchronous
operation. Do not swallow failures; let ToolRegistry surface a typed tool
execution error.
Export the module from xerxes/src/tools/index.ts. Add its registration
to registerCoreTools() only when it belongs to the baseline runtime surface.
Otherwise keep it opt-in behind an explicit option or host port.
Tools that access a browser, operating system, credential, remote service, or hardware must receive an explicit native port. Do not automatically discover a credential, start a child process, or report success when the port is absent.
additionalProperties: false unless arbitrary extension fields are part
of the documented protocol.WorkspacePathResolver or the equivalent
native path-safety boundary.Create or extend a focused file in xerxes/test/. Test schema
validation through ToolRegistry.execute(), the happy path, an invalid input,
and failure/cancellation behavior for external or asynchronous work.
bun test xerxes/test/<matching-tool>.test.ts
bun run --cwd xerxes check
Use injected ports, temporary directories, and deterministic fake fetchers; never call a live service from the normal test suite.
ToolRegistry picks an agent-specific registration before the default one;
add an agent ID only when that distinction is intentional.Add a Bun-native YAML agent definition with inheritance, tool policy, and subagent references.
Add a Bun-native messaging channel adapter with lifecycle, webhook, and configuration coverage.
Add a Bun-native LLM provider entry with routing, pricing, headers, limits, and Bun tests.
Author a Bun-native Xerxes SKILL.md bundle with valid metadata, safe assets, and discovery tests.
Normalize Xerxes Apache-2.0 headers with the native Bun maintenance command and verify TypeScript sources.
Manage Apple Notes via the memo CLI on macOS (create, view, search, edit).