Smithery Logo
MCPsSkillsDocsPricing
Login
NewFlame, an assistant that learns and improves. Available onTelegramSlack
    aj-geddes

    code-generation-template

    aj-geddes/code-generation-template
    Coding
    59

    About

    SKILL.md

    Install

    • Telegram
      Telegram
    • Slack
      Slack
    • Claude Code
      Claude Code
    • Codex
      Codex
    • OpenClaw
      OpenClaw
    • Cursor
      Cursor
    • Amp
      Amp
    • GitHub Copilot
      GitHub Copilot
    • Gemini CLI
      Gemini CLI
    • Kilo Code
      Kilo Code
    • Junie
      Junie
    • Replit
      Replit
    • Windsurf
      Windsurf
    • Cline
      Cline
    • Continue
      Continue
    • OpenCode
      OpenCode
    • OpenHands
      OpenHands
    • Roo Code
      Roo Code
    • Augment
      Augment
    • Goose
      Goose
    • Trae
      Trae
    • Zencoder
      Zencoder
    • Antigravity
      Antigravity
    • Download skill
    ├─
    ├─
    └─
    Smithery Logo

    Give agents more agency

    Resources

    DocumentationPrivacy PolicySystem Status

    Company

    PricingAboutBlog

    Connect

    © 2026 Smithery. All rights reserved.

    About

    Generate code from templates and patterns including scaffolding, boilerplate generation, AST-based code generation, and template engines...

    SKILL.md

    Code Generation & Templates

    Table of Contents

    • Overview
    • When to Use
    • Quick Start
    • Reference Guides
    • Best Practices

    Overview

    Comprehensive guide to code generation techniques including template engines, AST manipulation, code scaffolding, and automated boilerplate generation for increased productivity and consistency.

    When to Use

    • Scaffolding new projects or components
    • Generating repetitive boilerplate code
    • Creating CRUD operations automatically
    • Generating API clients from OpenAPI specs
    • Building code from templates
    • Creating database models from schemas
    • Generating TypeScript types from JSON Schema
    • Building custom CLI generators

    Quick Start

    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>
      );
    };
    

    Reference Guides

    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

    Best Practices

    ✅ DO

    • Use templates for repetitive code patterns
    • Generate TypeScript types from schemas
    • Include tests in generated code
    • Follow project conventions in templates
    • Add comments to explain generated code
    • Version control your templates
    • Make templates configurable
    • Generate documentation alongside code
    • Validate inputs before generating
    • Use consistent naming conventions
    • Keep templates simple and maintainable
    • Provide CLI for easy generation

    ❌ DON'T

    • Over-generate (avoid unnecessary complexity)
    • Generate code that's hard to maintain
    • Forget to validate generated code
    • Hardcode values in templates
    • Generate code without documentation
    • Create generators for one-off use cases
    • Mix business logic in templates
    • Generate code without formatting
    • Skip error handling in generators
    • Create overly complex templates
    Recommended Servers
    reportflow-mcp
    reportflow-mcp
    OpenZeppelin
    OpenZeppelin
    Microsoft Learn MCP
    Microsoft Learn MCP
    Repository
    aj-geddes/useful-ai-prompts
    Files