theokit-routes

theokit-routes is a skill for Claude Code from usetheokit/theokit. It costs 27 tokens per session (1,102 once invoked), scanned A, original, Apache-2.0.

A server route builder for defining web endpoints with access rules, URL parameters, query values, request-body validation, response status codes, and error handling. It uses schemas to check incoming data and keep it typed.

In plain words
What is it for?
Use it to create GET or POST endpoints, validate parameters and request bodies, require or customize authentication policies, configure CSRF behavior, set response codes, and connect handlers to application logic.
Why use it?
It replaces scattered endpoint setup with one structured definition. Invalid requests and access rules can be handled consistently at the route boundary.

Skill for Claude Code

Written for Claude Code: user-invocable in frontmatter.

Good fit Use it to create GET or POST endpoints, validate parameters and request bodies, require or customize authentication policies, configure CSRF behavior, set response codes, and connect handlers to application logic.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/usetheokit/theokit/theokit-routes
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add usetheokit/theokit --skill theokit-routes
Clone the repo
git clone --depth 1 https://github.com/usetheokit/theokit

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for theokit-routes

README.md
[![agentmods](https://agentmods.dev/badge/skills/usetheokit/theokit/theokit-routes/github.svg)](https://agentmods.dev/skills/usetheokit/theokit/theokit-routes)
Your own site
<a href="https://agentmods.dev/skills/usetheokit/theokit/theokit-routes"><img src="https://agentmods.dev/badge/skills/usetheokit/theokit/theokit-routes/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for theokit-routes

Your own site · 80×15
<a href="https://agentmods.dev/skills/usetheokit/theokit/theokit-routes"><img src="https://agentmods.dev/badge/skills/usetheokit/theokit/theokit-routes.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 27 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,102 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00027 $0.01102
Opus 5 $0.00014 $0.00551
Sonnet 5 $0.00005 $0.00220
Haiku 4.5 $0.00003 $0.00110

Measured 5d ago against content hash c4c15edbc1be, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

theokit-routes scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 5d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

packages/create-theokit/templates/default/dot-claude/skills/theokit-routes/SKILL.md · 114 lines

How it starts

The opening of the file, as written. The whole thing — 114 lines — stays where its author put it; the contents beside it link to each section on GitHub.

TheoKit Routes

The route() builder

import { route } from 'theokit/server/define'
import { z } from 'zod'

// GET — no body, optional params/query
export const GET = route()
  .policy('public') // who may call it — required
  .params(z.object({ id: z.coerce.number() })) // URL params
  .query(z.object({ page: z.coerce.number().optional() })) // query string
  .handler(({ params, query }) => ({ id: params.id, page: query?.page }))
  .build()

// POST — body validation + custom status
export const POST = route()
  .policy(({ subject }) => subject !== null) // any authenticated caller
  .body(
    z.object({
      title: z.string().min(3),
      done: z.boolean().default(false),
    }),
  )
  .status(201)
  .handler(({ body }) => {
    // body is fully typed from the Zod schema
    return db.insert(tasks).values(body).returning().get()
  })
  .build()

The chain is .policy(), .params(), .query(), .body(), .status(), .response(), .csrf(), .handler(), and .build() closes it. server/routes/health.ts in this project is a working one — read it rather than this block if the two ever disagree.

.csrf(false) opts a single route out of CSRF enforcement. It is for endpoints that legitimately receive third-party POSTs — a Stripe or WhatsApp webhook, an OAuth callback — which authenticate by signature rather than by session. policy('public') answers a different question (may an unauthenticated caller reach this) and does NOT lift the CSRF gate: without .csrf(false) a webhook is refused CSRF_INVALID before its signature is ever checked.

policy — who may call this route

Required on every exported method. The scanner refuses a route file that omits it and names the file, so absence is a build error rather than a route silently open to everyone.

policy: 'public' // open, and said out loud
policy: ({ subject }) => subject !== null // any authenticated caller
policy: ({ subject, params }) => requireOwner(subject, ownerOf(params.id)) // this subject owns this record

Read the full file on GitHub · 114 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 5d ago Changed c4c15edbc1be
  2. 10d ago First seen · 114 lines · 27 tokens per session scan A 8627688d53a8

Subscribe to this mod's changes

theokit-routes is a skill published in the GitHub repository usetheokit/theokit (5 stars, last pushed yesterday), licensed Apache-2.0. It adds 27 tokens to every session and 1,102 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

APIDesignArchitect

Complete API design intelligence — REST, GraphQL, gRPC, webhooks, API versioning, authentication, rate limiting, API governance, and building APIs that developers love and never want to leave.

vignesh2027/Claude-Agentic-Skills2.0-version · 44 tokens

DeveloperExperienceOS

Complete developer experience intelligence — SDK design, documentation, onboarding, developer community, API ergonomics, CLI tooling, and building products that developers love and evangelize.

vignesh2027/Claude-Agentic-Skills2.0-version · 35 tokens

StartupCTO

Complete CTO intelligence for early-stage startups — tech stack decisions, architecture, team building, technical debt management, and scaling from 0 to 10M users.

vignesh2027/Claude-Agentic-Skills2.0-version · 35 tokens

senior-dev

Activates the SeniorDev agent for full-stack software engineering. Use this skill when you need production-ready code: Next.js 14 frontends, FastAPI backends, TypeScript strict-mode components, PostgreSQL schemas, Redis caching, authentication flows, or complete REST/GraphQL APIs. SeniorDev always outputs complete…

vignesh2027/Claude-Agentic-Skills2.0-version · 86 tokens

system-architect

Activates SystemArchitect for high-level software system design and architecture review. Use when you need to design a new system from scratch (define components, APIs, data flows), review an existing architecture for scalability or reliability issues, choose between architectural patterns (monolith vs microservices…

vignesh2027/Claude-Agentic-Skills2.0-version · 80 tokens

api-integrator

Activates APIIntegrator for API design, integration, and automation workflows. Use when you need OpenAPI 3.0 specification design, OAuth 2.0 / JWT authentication flow design, webhook event-driven architecture with retry logic and HMAC verification, n8n or Zapier workflow automation design, or auto-generated client SDK…

vignesh2027/Claude-Agentic-Skills2.0-version · 71 tokens