Adding a New Tool
Quick Start
Section titled “Quick Start”Use the /new-tool Claude Code command to scaffold everything automatically:
/new-toolManual Steps
Section titled “Manual Steps”If adding manually, create these files:
1. Route File
Section titled “1. Route File”src/routes/<tool-name>.tsxTanStack Router file-based route with the tool’s page component.
2. Components
Section titled “2. Components”src/components/<tool-name>/├── <tool-name>-page.tsx # Main page component└── ... # Tool-specific components3. TanStack Query Hooks
Section titled “3. TanStack Query Hooks”src/hooks/use-<tool-name>.tsQuery and mutation hooks for the tool’s API endpoints.
4. API Routes
Section titled “4. API Routes”worker/routes/<tool-name>.tsHono route group with permission middleware.
5. Register Routes
Section titled “5. Register Routes”In worker/index.ts, import and register the new route group.
6. Sidebar Entry
Section titled “6. Sidebar Entry”Add the tool to the navigation array in src/components/layout/app-sidebar.tsx.
7. Database Tables
Section titled “7. Database Tables”If the tool needs data storage:
- Add tables to
db/schema.sql - Create a migration in
db/migrations/ - Update seed data in
db/seed.sql
8. Default Permissions
Section titled “8. Default Permissions”Add entries to tool_permissions in db/seed.sql for all 5 access levels.
9. Documentation
Section titled “9. Documentation”- Create
docs/src/content/docs/tools/<tool-name>.mdx - Create
docs/src/content/docs/api/<tool-name>.mdx - Add entries to
docs/astro.config.mjssidebar