From aj-geddes-useful-ai-prompts-4
Generates code from templates and patterns including scaffolding, boilerplate generation, AST-based code generation, and template engines. Use when generating code, scaffolding projects, creating boilerplate, or using templates.
How this skill is triggered — by the user, by Claude, or both
Slash command
/aj-geddes-useful-ai-prompts-4:code-generation-templateThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
- [Overview](#overview)
Comprehensive guide to code generation techniques including template engines, AST manipulation, code scaffolding, and automated boilerplate generation for increased productivity and consistency.
Minimal working example:
// templates/component.hbs
import React from 'react';
export interface {{pascalCase name}}Props {
{{#each props}}
{{this.name}}{{#if this.optional}}?{{/if}}: {{this.type}};
{{/each}}
}
export const {{pascalCase name}}: React.FC<{{pascalCase name}}Props> = ({
{{#each props}}{{this.name}},{{/each}}
}) => {
return (
<div className="{{kebabCase name}}">
{/* Component implementation */}
</div>
);
};
Detailed implementations in the references/ directory:
| Guide | Contents |
|---|---|
| Template Engines | Template Engines |
| AST-Based Code Generation | AST-Based Code Generation |
| Project Scaffolding | Project Scaffolding |
| OpenAPI Client Generation | OpenAPI Client Generation |
| Database Model Generation | Database Model Generation |
| GraphQL Code Generation | GraphQL Code Generation |
| Plop.js Generator | Plop.js Generator |
npx claudepluginhub joshuarweaver/cascade-code-languages-misc-1 --plugin aj-geddes-useful-ai-prompts-4Guides creating reusable angreal project templates for `angreal init`, covering angreal.toml config, Tera templating, variables, prompts, validation, and publishing.
Generates boilerplate for common project types (API, web app, CLI, library, monorepo) with best-practice defaults. Includes decision trees and stack selection matrices.
Applies agentic design patterns to Claude Code for universal project templating and scaffold automation using engines like Handlebars, Cookiecutter, Copier, Maven Archetype, and MCP servers.