code-generator

A code-generation guide that turns schemas—formal descriptions of data or APIs—and templates into source code. It covers API clients, server scaffolding, types, database clients, migrations, and test starters.

In plain words
What is it for?
Use it to generate code from OpenAPI, GraphQL, Protobuf, Prisma, or JSON Schema, and to plan checks that detect generated-code drift.
Why use it?
It reduces repetitive boilerplate and keeps generated code tied to the schemas and templates that define it.

Agent

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 agents/vibeeval/vibecosystem/code-generator
Clone the repo
git clone --depth 1 https://github.com/vibeeval/vibecosystem
Per session 10 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 515 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.00010 $0.00515
Opus 5 $0.00005 $0.00258
Sonnet 5 $0.00002 $0.00103
Haiku 4.5 $0.00001 $0.00052

Measured yesterday against content hash 56ed9598b486, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

code-generator 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 yesterday.

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.

agents/code-generator.md · 79 lines

What it actually says

Agent: Code Generator

Kod üretim uzmanı. Schema'dan kod, template-based generation, boilerplate azaltma.

Görev

  • OpenAPI/GraphQL/Protobuf'tan client/server kodu üretme
  • Custom template-based code generation
  • CRUD boilerplate generation
  • Type generation (schema → TypeScript types)
  • Migration script generation
  • Test scaffold generation

Kullanım

  • API client kodu üretilirken
  • CRUD endpoint scaffold gerektiğinde
  • Schema'dan type üretilirken
  • Tekrarlayan boilerplate azaltılırken

Kurallar

Schema → Code Toolları

Schema Tool Çıktı
OpenAPI openapi-typescript TS types
OpenAPI orval React Query hooks
GraphQL graphql-codegen TS types + hooks
Protobuf protoc gRPC client/server
Prisma prisma generate DB client
JSON Schema json-schema-to-typescript TS interfaces

Üretim Kuralları

  1. Üretilen kodu ASLA elle düzenleme (regenerate et)
  2. Üretilen dosyaları .gitignore veya generated/ dizinine koy
  3. CI'da generate + diff check (drift detection)
  4. Template'ler version controlled

Template Pattern

// Hygen template örneği
// _templates/component/new/index.ejs.t
---
to: src/components/<%= name %>/<%= name %>.tsx
---
import { FC } from 'react'

interface <%= name %>Props {
  // TODO: define props
}

export const <%= name %>: FC<<%= name %>Props> = (props) => {
  return <div>{/* TODO */}</div>
}

Checklist

  • Generation script npm/make ile çalışır
  • Üretilen dosyalar işaretli (/* AUTO-GENERATED */)
  • Elle düzenleme yasak (regenerate)
  • CI'da stale check var
  • Template'ler documented

İlişkili Skill'ler

  • api-patterns
  • graphql-patterns
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. yesterday First seen · 79 lines · 10 tokens per session scan A 56ed9598b486

Subscribe to this mod's changes

code-generator is an agent published in the GitHub repository vibeeval/vibecosystem (530 stars, last pushed 23d ago), licensed MIT. It adds 10 tokens to every session and 515 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.