segment

A Vovk.ts backend segmentation guide. A segment is a separate slice of an application's backend, with its own API path, controllers, route file, and server settings.

In plain words
What is it for?
Use it when organizing API paths, catch-all routes, static API data, OpenAPI specifications, or static exports. It also covers creating segments with the Vovk.ts CLI and configuring each segment.
Why use it?
It helps you decide how to split a backend into smaller parts and how those parts should be configured and prioritized.

Skill for Claude CodeCodex

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.

agentmods
npx agentmods add skills/finom/vovk/segment
Any agent
npx skills add finom/vovk --skill segment
Clone the repo
git clone --depth 1 https://github.com/finom/vovk

Made for: Claude Code, Codex.

Per session 236 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,612 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00236 $0.03612
Opus 5 $0.00118 $0.01806
Sonnet 5 $0.00047 $0.00722
Haiku 4.5 $0.00024 $0.00361

Measured 2d ago against content hash 66ee16c7c0f8, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

segment 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 2d 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.

skills/segment/SKILL.md · 318 lines

How it starts

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

Vovk.ts segments

A segment is a backend slice. Owns API path prefix (/api, /api/admin, /api/openapi, etc.), set of controllers, own Next.js route-handler file. Each segment compiles to independent serverless function, so runtime settings (runtime, maxDuration, etc.) can differ per segment.

Think: "one segment = one mini-backend."

Scope of this skill

Covers:

  • What a segment is, when to create one, how to pick between root / named / static.
  • vovk new segment CLI.
  • initSegment() call shape and parameters.
  • Segment priority (deepest path wins).
  • Static segments: generateStaticParams, controllersToStaticParams, staticParams option on decorators, output: 'export', .json endpoints.
  • Per-segment config in vovk.config.mjs (outputConfig.segments.<name>).
  • _schema_ dev endpoint (mention only — see base skill for details).

Out of scope (do not duplicate):

  • Writing handlers / procedure() / validation / .fn() / req.vovk / decorators → procedure skill.
  • RPC client generation, composed vs. segmented clients → rpc skill.
  • OpenAPI metadata (@operation, Scalar) beyond segment-level openAPIObjectopenapi skill.
  • vovk.config.mjs global options → config skill. API surface + type inference helpers (VovkBody, VovkOutput, etc.) → base skill (registry) and procedure / rpc skills (usage).
  • Multi-tenant routing (subdomains, multitenant() proxy, per-tenant frontend pages, segmentNameOverride) → multitenant skill. This skill only mentions segment side in passing.

Core concepts

The catch-all file

Every segment is Next.js App Router optional catch-all route handler:

src/app/api/[[...vovk]]/route.ts              ← root segment (path: /api/*)
src/app/api/foo/[[...vovk]]/route.ts          ← "foo" segment (path: /api/foo/*)
src/app/api/foo/bar/[[...vovk]]/route.ts      ← "foo/bar" segment (path: /api/foo/bar/*)

Slug name (vovk) is configurable via rootEntry config option but stick with vovk unless user has reason to change it.

Read the full file on GitHub · 318 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. 2d ago First seen · 318 lines · 236 tokens per session scan A 66ee16c7c0f8

Subscribe to this mod's changes

segment is a skill published in the GitHub repository finom/vovk (52 stars, last pushed 5d ago), licensed MIT. It adds 236 tokens to every session and 3,612 once invoked, about $0.0012 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-30.

Related

Other skills, from other repositories

ocli-api

Turn any OpenAPI/Swagger API into CLI commands and call them. Search endpoints with BM25, check parameters, execute — no MCP server needed.

EvilFreelancer/openapi-to-cli · 34 tokens

react-performance

Optimize React/Next.js runtime performance — eliminate waterfalls, shrink bundles, cut unnecessary re-renders, and speed up rendering. Use when writing, reviewing, or refactoring components for speed, or chasing slow renders, large bundles, janky interactions, or high TTFB/LCP/INP.

clubpay/ronykit · 64 tokens

ronykit-framework

Orchestrates RonyKit service development using the ronyup MCP server (knowledge resources, prompts, scaffold tools). Use when the user mentions RonyKit, ronyup, EdgeServer, contracts, scaffolding a workspace or feature, implementing API handlers and services, frontend bootstrap, integration tests, or design documents…

clubpay/ronykit · 75 tokens

composition-patterns

Design reusable React component APIs that scale — compound components, lifted state, generic context, explicit variants. Use when a component is growing boolean props (isThread, isEditing…), when building a component library, or when reviewing component architecture. Includes React 19 API changes.

clubpay/ronykit · 58 tokens

storybook

Author and maintain Storybook stories with CSF 3.0 best practices — args, decorators, parameters, and config. Use when creating or editing .stories. files, configuring .storybook/, or ensuring every UI component ships with stories.

clubpay/ronykit · 50 tokens

webmcp

Build agent-friendly web apps with the W3C Web Model Context API (WebMCP). Use when exposing frontend features as structured tools for in-browser AI agents, adding document.modelContext tools to React/Next.js apps, designing tool schemas for dashboards or admin UIs, or making existing UI automatable without DOM…

clubpay/ronykit · 69 tokens