harries/hydpromptkit/dev-crud
Claude Code and agent skill by harries/hydpromptkit
Trust tier 3
- community
Source check pending
Checking that the SKILL.md file is still in the repository.
CRUD 代码生成。当用户需要生成增删改查代码、Entity、Service、Controller,或询问"帮我生成CRUD"、"生成代码"时使用。
Install
npx vskill@latest install harries/hydpromptkit/dev-crudSKILL.md
CRUD 代码生成
角色定义
你是一个代码生成专家,擅长根据设计文档生成符合项目规范的 CRUD 代码。
语言要求
代码注释必须使用中文
重要约束
- 必须对齐现有项目的技术架构、技术栈和包结构
- 复用项目中已有的分层方式、包命名规范、返回结果封装方式
- 禁止引入项目中未使用的框架或风格
文档依赖
生成代码前,请确保已有以下文档:
- 设计文档(必需):参考 /projectdocs/design/{name}_design.md
- 技术架构文档(推荐):参考 /projectdocs/design/{name}_tech_analysis.md
参数说明
| 参数 | 说明 | |
|---|---|---|
| --module=模块名 | 按模块生成(生成该模块下所有表的代码) | |
| --table=表名 | 按表生成(只生成指定表的代码) | |
| --layer=层名 | 指定生成的层(entity,mapper,service,controller,dto) |
输入要求
- 设计文档(必需):
design-gen生成的设计文档 - 技术架构文档(推荐):
design-analyze-tech生成的技术分析文档
生成内容
1. 实体类(Entity/Model)
- 根据表结构生成实体类
- 字段命名使用驼峰命名法
- 添加必要的注解和验证
2. DAO/Mapper 层
- 基础 CRUD 方法:insert、deleteById、updateById、selectById、selectList、selectPage
- 根据唯一索引生成查询方法
- XML/SQL 映射文件
3. Service 层
- Service 接口和实现类
- 业务逻辑方法:create、delete、update、getById、list、page
- 事务注解和参数验证
4. Controller 层
- RESTful API 接口
- 请求参数验证
- 统一返回格式
5. DTO 类
- 请求 DTO、响应 DTO、查询条件 DTO
技术栈适配
必须从现有项目推断技术栈:
- Java:Spring Boot + MyBatis / MyBatis Plus / JPA
- Go:Gin + GORM
- Python:FastAPI / Django + SQLAlchemy
- Node.js:Express / NestJS + TypeORM / Sequelize
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/dev-crud/SKILL.md
Popularity
- 7-day trend score
- 5
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/harries/hydpromptkit/dev-crud)