code-generation-template by aj-geddes/useful-ai-prompts
npx skills add https://github.com/aj-geddes/useful-ai-prompts --skill code-generation-template关于代码生成技术的全面指南,包括模板引擎、抽象语法树操作、代码脚手架以及自动化样板代码生成,旨在提高生产力和代码一致性。
最小工作示例:
// 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}}">
{/* 组件实现 */}
</div>
);
};
references/ 目录下的详细实现:
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
| 指南 | 内容 |
|---|---|
| 模板引擎 | 模板引擎 |
| 基于 AST 的代码生成 | 基于 AST 的代码生成 |
| 项目脚手架 | 项目脚手架 |
| OpenAPI 客户端生成 | OpenAPI 客户端生成 |
| 数据库模型生成 | 数据库模型生成 |
| GraphQL 代码生成 | GraphQL 代码生成 |
| Plop.js 生成器 | Plop.js 生成器 |
每周安装量
126
代码仓库
GitHub 星标数
121
首次出现
2026 年 1 月 21 日
安全审计
已安装于
opencode104
gemini-cli103
codex99
cursor98
claude-code94
github-copilot87
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 |
Weekly Installs
126
Repository
GitHub Stars
121
First Seen
Jan 21, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykPass
Installed on
opencode104
gemini-cli103
codex99
cursor98
claude-code94
github-copilot87
agent-browser 浏览器自动化工具 - Vercel Labs 命令行网页操作与测试
155,300 周安装
| Plop.js Generator |