Skip to content

Adding a New Tool

Use the /new-tool Claude Code command to scaffold everything automatically:

/new-tool

If adding manually, create these files:

src/routes/<tool-name>.tsx

TanStack Router file-based route with the tool’s page component.

src/components/<tool-name>/
├── <tool-name>-page.tsx # Main page component
└── ... # Tool-specific components
src/hooks/use-<tool-name>.ts

Query and mutation hooks for the tool’s API endpoints.

worker/routes/<tool-name>.ts

Hono route group with permission middleware.

In worker/index.ts, import and register the new route group.

Add the tool to the navigation array in src/components/layout/app-sidebar.tsx.

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

Add entries to tool_permissions in db/seed.sql for all 5 access levels.

  • Create docs/src/content/docs/tools/<tool-name>.mdx
  • Create docs/src/content/docs/api/<tool-name>.mdx
  • Add entries to docs/astro.config.mjs sidebar