gen-types

gen-types is a skill for Claude Code, Codex from fpindej/netrock. It costs 11 tokens per session (315 once invoked), scanned A, original, MIT.

A workflow for regenerating frontend API types from a backend OpenAPI specification, a machine-readable description of an API.

In plain words
What is it for?
It helps regenerate types, detect breaking schema changes, update frontend type aliases, and fix resulting type errors.
Why use it?
It keeps frontend code aligned with backend changes and avoids manually editing generated files.

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/fpindej/netrock/gen-types
Any agent
npx skills add fpindej/netrock --skill gen-types
Clone the repo
git clone --depth 1 https://github.com/fpindej/netrock

Made for: Claude Code, Codex.

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 gen-types

README.md
[![agentmods](https://agentmods.dev/badge/skills/fpindej/netrock/gen-types.svg)](https://agentmods.dev/skills/fpindej/netrock/gen-types)
Your own site
<a href="https://agentmods.dev/skills/fpindej/netrock/gen-types"><img src="https://agentmods.dev/badge/skills/fpindej/netrock/gen-types.svg" alt="Measured on agentmods" height="20"></a>
Per session 11 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 315 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.00011 $0.00315
Opus 5 $0.00005 $0.00158
Sonnet 5 $0.00002 $0.00063
Haiku 4.5 $0.00001 $0.00032

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

Security

Grade A, and why

gen-types 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 4d 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.

.claude/skills/gen-types/SKILL.md · 33 lines

What it actually says

Regenerates frontend API types from the backend OpenAPI spec.

Recently changed backend files: !git diff --name-only HEAD~3 -- src/backend/ 2>/dev/null | grep -E '\.(cs)$' | head -20 || echo "(no recent backend changes)"

Steps

  1. Try generating types:

    cd src/frontend && pnpm run api:generate
    
  2. If generation fails: fix the cause, never the output - v1.d.ts is generated and must never be hand-edited (CLAUDE.md hard rule). Typical causes: backend does not build (dotnet build src/backend/MyProject.slnx), or the OpenAPI spec export step failed - read the generator error. If you cannot fix the cause, stop and report the blocker instead of shipping hand-written types.

  3. Check what changed - look for renamed/removed schemas (breaking) vs added schemas (safe)

  4. Update type aliases in src/frontend/src/lib/types/index.ts if schemas changed

  5. Fix type errors:

    cd src/frontend && pnpm run check
    

    If errors: the backend made a breaking API change - fix all frontend consumers

  6. Format: cd src/frontend && pnpm run format

  7. Commit v1.d.ts with the backend changes that caused the regeneration

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. 4d ago First seen · 33 lines · 11 tokens per session scan A a213c7bf3b7e

Subscribe to this mod's changes

gen-types is a skill published in the GitHub repository fpindej/netrock (231 stars, last pushed 5d ago), licensed MIT. It adds 11 tokens to every session and 315 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-30.