Skip to main content
subagent CX Codex

base-template-generator — Claude Code subagent: what it does

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

no license ★ 850 updated 2026-10-26

Install into Claude Code · Manually: put the files in place All methods and platforms ↓
.claude/agents/base-template-generator.md
Open on GitHub

What base-template-generator 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.

What it helps with

  • 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 for the agent

  • 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.

How to install base-template-generator

Manually: put the files in place

.claude/agents/base-template-generator.md

For all projects use ~/.claude/agents/. Claude delegates by the description field or an @-mention

Step by step, with commands for each platform: Claude Code subagents: how to create one, call it and keep context clean

Questions about base-template-generator

How do I install base-template-generator in Claude Code?

Put the agent file at .claude/agents/base-template-generator.md inside your project; Claude reads subagents from that folder.

What does base-template-generator do?

It produces starter files for a component, an API endpoint or a project config, drawing on template patterns stored earlier.

What does the pattern memory need to work?

The hooks call npx claude-flow@alpha to store and search patterns. Skip that package and generation still runs, but no patterns get recorded.

Similar subagents

All subagents for Agent setup: memory, context, orchestration →

From the same set76

The whole set →
backend-dev The backend-dev subagent builds backend APIs and draws on earlier API work. Use it for tasks involving endpoints, routes, REST, or GraphQL. CX Codex ★ 850repo stars project-board-sync project-board-sync — a command that keeps a GitHub Projects board in step with agent-swarm tasks: states, agent labels and priorities land in the right columns. CX Codex +1 ★ 850repo stars api-docs api-docs — a Claude Code subagent that inspects application endpoints to produce and maintain OpenAPI 3.0 specifications. CX Codex ★ 850repo stars examples The examples command presents pair-programming sessions for JWT auth, Node.js debugging, TDD, refactoring, React performance, and Express APIs. CX Codex +1 ★ 850repo stars planner planner is a Claude Code subagent that breaks down engineering goals, maps dependencies, and allocates agents using execution memory. CX Codex ★ 850repo stars researcher The researcher subagent examines code, documentation, and module relationships, then organizes findings into a research summary. Use it to map an unfamiliar project or spot gaps in its docs. CX Codex ★ 850repo stars v3-integration-architect v3-integration-architect — a Claude subagent that carries out ADR-001: folding claude-flow into agentic-flow@alpha as an extension and cutting 10,000+ duplicated lines. CX Codex ★ 850repo stars sync-coordinator sync-coordinator aligns versions, dependencies, and docs across linked repositories. It orchestrates agent swarms using GitHub CLI and MCP tools. CX Codex +1 ★ 850repo stars

Project sponsors

Companies that keep this analytics open