add-tool
Use when adding a new built-in tool to ra.
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Menu
Use when adding a new built-in tool to ra.
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Based on SOC occupation classification
System design and architecture decisions. Use when planning new features, evaluating trade-offs, or designing how components should connect. Proposes 2-3 approaches and recommends one.
Smart commit workflow. Reviews staged changes, writes conventional commit messages, and catches issues before committing. Use when ready to commit work.
Quality review of completed work. Use after making changes and before claiming completion. Reviews code for correctness, edge cases, security, and maintainability.
Systematic debugging workflow. Use when diagnosing bugs, test failures, or unexpected behavior. Follows a rigorous reproduce → isolate → hypothesize → fix → verify cycle.
Systematic multi-agent research. Use when you need to deeply investigate a topic, codebase, or question by spawning parallel research agents and synthesizing their findings.
Deep code explanation. Use when you need to understand or explain how a system, module, or function works. Traces data flow, maps dependencies, and explains design decisions.
| name | add-tool |
| description | Use when adding a new built-in tool to ra. |
See src/tools/CLAUDE.md for the full file map. Use read-file.ts as a minimal template.
src/tools/<name>.tsimport type { ITool } from '../providers/types'
export function myNewTool(): ITool {
return {
name: 'my_tool',
description: 'What this tool does. Be specific — the model reads this.',
inputSchema: {
type: 'object',
properties: {
param: { type: 'string', description: 'What this param is for' },
},
required: ['param'],
},
async execute(input: unknown) {
const { param } = input as { param: string }
return result // string preferred; objects get JSON.stringify()'d
},
}
}
src/tools/index.tsimport { myNewTool } from './my-tool'
// Inside registerBuiltinTools():
registry.register(myNewTool())
tests/tools/import { test, expect } from 'bun:test'
import { myNewTool } from '../../src/tools/my-tool'
test('my_tool does the thing', async () => {
const tool = myNewTool()
const result = await tool.execute({ param: 'value' })
expect(result).toBe('expected')
})
bun tsc → bun test → bun run ra "Use the my_tool tool to ..."description drives model behavior — be specific about when to use vs alternativesinputSchema is JSON Schema — include description on every propertyinput as { param: string }, never as anyisError: true — the model sees themtoolTimeout (default 30s)