# base-template-generator

base-template-generator writes the starting file set for a new component, endpoint or project config, then reuses templates that worked before.

- subagent · `type=agent` · Claude Code, Codex, Cursor · ★ 850 repo stars
- Author: ruvnet
- License: not stated · policy=link-only · description only; the file stays with the author
- Source: https://github.com/ruvnet/agentic-flow/tree/HEAD/agentic-flow/.claude/agents/base-template-generator.md
- Updated: 2026-10-26
- Security check: automated, 2026-11-16 (text) — no signs of malicious code found.
- HTML: https://affpapa.org/en/nevibecode/agents/base-template-generator

## What it does

Point it at a new component or endpoint and it lays out the starting files. React work comes back as `Component.tsx`, `Component.test.tsx`, `Component.module.css` and `index.ts`; a REST endpoint as `routes.ts`, `controller.ts`, `service.ts`, `types.ts` and `tests.ts`.

Before writing, the agent looks up earlier templates that scored well and borrows their shape. Afterwards it saves the result with a quality score. Similar project structures are found by walking a graph of linked nodes: component, API, tests, config.

The hooks shell out to `npx claude-flow@alpha` to read and write those patterns, and they swallow any error. Without that package you still get the files, but nothing gets learned from them. The agent is at `2.0.0-alpha`.

## Install

### Claude Code (native platform)

**Manually: put the files in place**
- File: `.claude/agents/base-template-generator.md` — For all projects use ~/.claude/agents/. Claude delegates by the description field or an @-mention

### Codex

**Manually: put the files in place**
- File: `.codex/agents/base-template-generator.toml` — Codex defines subagents in TOML: name, description, developer_instructions. Move the Markdown text into developer_instructions by hand. For all projects use ~/.codex/agents/

### Cursor

**Manually: put the files in place**
- File: `.cursor/agents/base-template-generator.md` — Cursor also reads .claude/agents/

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/ruvnet/agentic-flow/tree/HEAD/agentic-flow/.claude/agents/base-template-generator.md

## When to use it
- scaffold a React component with tests and styling
- split a new REST endpoint into controller, service and repository layers
- get a starter config for a project from scratch
- reuse templates that scored well in earlier sessions
- find a similar project structure before generating files

## Example prompts
- Generate the skeleton for a `UserProfile` component with types, tests and styles.
- Create a REST endpoint template for user management with validation and tests.
- Put together a starter config for a new TypeScript project.

## Similar
- [migrate-radix-to-base](https://affpapa.org/en/nevibecode/skills/migrate-radix-to-base.md) — skill · 37800 installs
- [mui-base](https://affpapa.org/en/nevibecode/skills/mui-base.md) — skill · 341 installs
- [base-ui](https://affpapa.org/en/nevibecode/skills/base-ui.md) — skill · 238 installs
- [base-ui-migrator](https://affpapa.org/en/nevibecode/skills/base-ui-migrator.md) — skill · 144 installs
- [component-template-generator](https://affpapa.org/en/nevibecode/skills/component-template-generator.md) — skill · 139 installs
- [base-vs-radix](https://affpapa.org/en/nevibecode/rules/base-vs-radix.md) — rule · ★ 7523 repo stars

From the same set: [ruvnet/agentic-flow](https://affpapa.org/en/nevibecode/by/ruvnet/agentic-flow.md) — 76 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
