Skip to main content

monolith-generator-workflows

Use when adding app features via the built-in generator (model/controller/resource/authentication/job/admin), including expected file mutations and post-generation validation.

来源信息

仓库
cggonzal/monolith
最近来源活动
2026年2月14日 03:11
检测到的 SKILL.md 语言
英语
星标
0
分支
0

安装方式

默认使用会先检查来源的 Prompt;你也可以切换为直接命令,或下载本地副本。

检查来源文件

决定是否安装前,请先阅读 SKILL.md,以及 SkillsMP 当前展示的配套文件。

正在显示 SKILL.md

SKILL.md
来源说明 · 只读预览
name
monolith-generator-workflows
description
Use when adding app features via the built-in generator (model/controller/resource/authentication/job/admin), including expected file mutations and post-generation validation.
# Monolith Generator Workflows ## Use this skill when - You need to scaffold features quickly and safely. - You need to know all supported generator subcommands. ## Generator surface `make generator <command> [args]` Supported commands: - `model` - `controller` - `resource` - `authentication` - `job` - `admin` ## Behavior summary - `model`: creates model + model test; updates `db/db.go` AutoMigrate. - `controller`: creates controller + controller test + views; optionally injects routes. - `resource`: combines `model` + pluralized controller with full CRUD actions. - `authentication`: scaffolds user model, session helpers, auth middleware/controller/templates/routes. - `job`: creates job file + test, updates job enum and queue registration. - `admin`: scaffolds dashboard/middleware/routes, and auto-runs auth generation if `User` model is missing. ## Safe scaffolding checklist 1. Run generator command. 2. Inspect modified files for route collisions/import order. 3. Fill TODO placeholders in generated handlers/jobs. 4. Run `gofmt` if needed and `go test ./...`. 5. Start app and manually hit generated routes. ## Practical patterns - Greenfield CRUD: `make generator resource post title:string body:string` - Existing model + UI: `make generator controller posts index show new create edit update destroy` - Async task: `make generator job SendDigest` - Auth bootstrap: `make generator authentication` - Admin/profiling: `make generator admin`
在 GitHub 查看