| name | code-generator |
| version | 1.0.0 |
| description | 代码模板生成,支持多种语言和框架 |
| summary | 根据用户需求生成代码模板,支持 React/Vue/Express/FastAPI 等主流框架。
包含最佳实践和项目结构建议。
|
| skill_type | component |
| intent | 快速生成符合最佳实践的代码模板和脚手架 |
| type | tool |
| tags | ["code","template","scaffolding","generator"] |
| category | development |
| author | skills-manager |
| license | MIT |
功能
根据用户需求生成代码模板:
- 组件模板:React/Vue 组件
- API 模板:REST API 端点
- 测试模板:单元测试和集成测试
- 配置模板:项目配置文件
参数
| 参数 | 类型 | 必需 | 说明 |
|---|
| type | string | ✅ | 模型类型:component / api / test / config |
| framework | string | ✅ | 框架:react / vue / express / fastapi / flask |
| name | string | ✅ | 组件/模块名称 |
| language | string | ❌ | 语言:typescript / javascript / python,默认 typescript |
| features | array | ❌ | 附加功能:["styled-components", "testing", "storybook"] |
支持的模板
React 组件
import React from 'react';
interface {Name}Props {
}
export const {Name}: React.FC<{Name}Props> = (props) => {
return (
<div>
{/* 组件内容 */}
</div>
);
};
export default {Name};
Vue 组件
<!-- 生成的 Vue 组件模板 -->
<template>
<div class="{name}">
<!-- 组件内容 -->
</div>
</template>
<script setup lang="ts">
interface Props {
// 定义 props
}
const props = defineProps<Props>();
</script>
<style scoped>
.{name} {
/* 样式 */
}
</style>