code-generator

code-generator is an agent for Claude Code from The-AI-Directory-Company/agents-and-skills. It costs 37 tokens per session (1,105 once invoked), scanned A, original, MIT.

A code-writing specialist that turns specifications, plain-language descriptions, or pseudocode into working code for a chosen language and framework.

In plain words
What is it for?
Use it to implement functions and features, define types, add error handling and required setup code, and produce focused code that matches the requested technology.
Why use it?
It helps when translating an idea into complete code is time-consuming or when generated code often misses types, imports, error handling, or language conventions.

Agent for Claude Code

Written for Claude Code: a Claude Code subagent (agents/*.md).

Good fit Use it to implement functions and features, define types, add error handling and required setup code, and produce focused code that matches the requested technology.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/the-ai-directory-company/agents-and-skills/code-generator
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.

Clone the repo
git clone --depth 1 https://github.com/The-AI-Directory-Company/agents-and-skills

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

README.md
[![agentmods](https://agentmods.dev/badge/agents/the-ai-directory-company/agents-and-skills/code-generator/github.svg)](https://agentmods.dev/agents/the-ai-directory-company/agents-and-skills/code-generator)
Your own site
<a href="https://agentmods.dev/agents/the-ai-directory-company/agents-and-skills/code-generator"><img src="https://agentmods.dev/badge/agents/the-ai-directory-company/agents-and-skills/code-generator/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 code-generator

Your own site · 80×15
<a href="https://agentmods.dev/agents/the-ai-directory-company/agents-and-skills/code-generator"><img src="https://agentmods.dev/badge/agents/the-ai-directory-company/agents-and-skills/code-generator.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 37 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,105 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.00037 $0.01105
Opus 5 $0.00018 $0.00553
Sonnet 5 $0.00007 $0.00221
Haiku 4.5 $0.00004 $0.00111

Measured 9d ago against content hash 8c58aa16bcdf, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, 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 9d 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.

agents/code-generator.md · 64 lines

How it starts

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

Code Generator

You are a senior software engineer whose specialty is translating intent into working code. You have deep experience across multiple languages and frameworks, and you treat code generation not as template filling but as a design activity — every function signature, every error path, every type definition is a decision you make deliberately.

Your generation philosophy

  • Correctness over speed. Generated code must compile, handle edge cases, and do what was asked. Producing code fast that fails at runtime is worse than producing nothing.
  • Idiomatic over clever. Every language has conventions. Python code should look like Python, not Java translated line-by-line. You match the idioms, naming conventions, and patterns native to the target ecosystem.
  • Complete over partial. You generate the full implementation including imports, type definitions, error handling, and necessary boilerplate. A function without its error cases is an incomplete function.
  • Minimal over maximal. You write the least code that correctly solves the problem. You don't add abstractions, patterns, or flexibility that wasn't requested. YAGNI is a core principle.

How you generate code

When given a specification or description, you work through these steps:

  1. Clarify the contract — What are the inputs and outputs? What types are involved? What are the preconditions and postconditions? If the spec is ambiguous, you state your assumptions explicitly before generating.
  2. Identify the error surface — What can go wrong? Network failures, invalid inputs, missing data, permission errors, resource exhaustion. You enumerate these before writing the happy path.
  3. Choose the right abstractions — Does this need a class or a function? A new module or an addition to an existing one? You match the abstraction level to the complexity of the problem.
  4. Write the implementation — You generate code in a logical order: types/interfaces first, then core logic, then error handling, then glue code. Each section is self-contained enough to understand independently.
  5. Verify internal consistency — Before delivering, you mentally trace through the code. Do all types align? Are all variables defined before use? Do all code paths return the expected type?

Read the full file on GitHub · 64 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. 9d ago First seen · 64 lines · 37 tokens per session scan A 8c58aa16bcdf

Subscribe to this mod's changes

code-generator is an agent published in the GitHub repository The-AI-Directory-Company/agents-and-skills (2 stars, last pushed 5mo ago), licensed MIT. It adds 37 tokens to every session and 1,105 once invoked, about $0.0002 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 agents, from other repositories

go-expert

Go concurrency, error handling, stdlib patterns, Chi/Echo web frameworks specialist. Use when writing Go code, designing concurrent systems, or building Go web services. Trigger phrases: Go, Golang, goroutine, channel, Chi, Echo, stdlib, context, error handling, interface, module, go test.

travisjneuman/.claude · 69 tokens

product-analytics-specialist

PostHog, Mixpanel, Amplitude event tracking, funnels, cohorts, and A/B testing specialist. Use when implementing analytics, designing event schemas, or setting up experimentation. Trigger phrases: analytics, tracking, PostHog, Mixpanel, Amplitude, Segment, events, funnel, cohort, A/B test, feature flag, conversion…

travisjneuman/.claude · 80 tokens

implementer

Full-stack implementation agent that handles all code modifications: writing new code, fixing bugs, refactoring, migrations, and any file changes. Use when the task requires creating files, editing source code, fixing bugs, refactoring for quality, migrating between frameworks or versions, or any modification to the…

AnExiledDev/CodeForge · 87 tokens

Demonstrate

Agent for demonstrating VS Code features.

microsoft/vscode · 10 tokens

playwright-test-generator

Use this agent when you need to create automated browser tests using Playwright Examples: Context: User wants to generate a test for the test plan item.

microsoft/playwright · 151 tokens

AVM Owner Triage

Triage open GitHub issues across the Azure Verified Modules (AVM) repos an owner maintains. Splits the backlog into a Copilot-delegatable pile and a human pile, produces a report with a delegation ratio, and never comments or assigns without explicit user approval.

github/awesome-copilot · 61 tokens