.opencode/skills/nop-codegen-master/SKILL.md
使用 nop-cli gen 命令从 ORM 模型文件生成 Nop 平台初始项目脚手架(仅初次生成)。生成后通过 mvn install 迭代。触发词:代码生成、gen、生成项目、脚手架、初始化项目。
npx skillsauth add entropy-cloud/nop-entropy nop-codegen-masterInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
使用 Nop 平台的代码生成器从 ORM 模型文件初次生成项目脚手架。
| 场景 | 触发关键词 | |------|-----------| | 从零开始创建新项目 | "生成项目", "脚手架", "初始化" | | 有 ORM 模型,需要生成完整工程 | "gen", "代码生成" |
nop-climodel/xxx.orm.xmlnop-cli gen <模型文件> -t=/nop/templates/orm [-o=<输出目录>]
| 参数 | 必填 | 说明 |
|------|------|------|
| <模型文件> | 是 | ORM 模型文件路径 |
| -t | 是 | 模板路径,初次生成用 /nop/templates/orm |
| -o | 否 | 输出目录(默认当前目录) |
| -F | 否 | 强制覆盖已存在文件 |
# 从 XML 模型生成完整项目
nop-cli gen model/app-demo.orm.xml -t=/nop/templates/orm -o=.
├─app-demo-api # 对外接口定义和消息定义
├─app-demo-codegen # 代码生成辅助工程(后续迭代用)
├─app-demo-dao # 数据库实体定义和 ORM 模型
├─app-demo-service # GraphQL 服务实现
├─app-demo-web # AMIS 页面文件以及 View 模型定义
├─app-demo-app # 测试使用的打包工程
└─deploy # 数据库建表语句
在执行目录下创建 _vfs 目录,放入自定义模板:
├─ _vfs/
│ └─ my/
│ └─ templates/
│ └─ orm/ # 自定义模板
# 使用自定义模板
nop-cli gen model/app-demo.orm.xml -t=/my/templates/orm -o=.
初次生成后,不再需要 nop-cli
1. 修改模型文件 → model/app-demo.orm.xml
2. 执行构建 → cd app-demo-codegen && mvn install
3. 自动重新生成 → _gen/ 目录更新,手写代码保留
| 类型 | 规则 | 行为 |
|------|------|------|
| 自动生成 | _gen/ 目录、_ 前缀文件 | 始终覆盖,禁止编辑 |
| 手写代码 | 无下划线前缀 | 永久保留 |
不会。手写代码放在非 _ 前缀的文件中即可。
修改模型后执行 mvn install,xxx-codegen 模块会自动触发代码生成。
_vfs/ 下tools
Use when work should span one or more detached tasks but still behave like one job with a single owner context. TaskFlow is the durable flow substrate under authoring layers like Lobster, ACPX, plugins, or plain code. Keep conditional logic in the caller; use TaskFlow for flow identity, child-task linkage, waiting state, revision-checked mutations, and user-facing emergence.
tools
# Lobster Lobster executes multi-step workflows with approval checkpoints. Use it when: - User wants a repeatable automation (triage, monitor, sync) - Actions need human approval before executing (send, post, delete) - Multiple tool calls should run as one deterministic operation ## When to use Lobster | User intent | Use Lobster? | | ------------------------------------------------------ | --------------------------
tools
# Lobster Lobster executes multi-step workflows with approval checkpoints. Use it when: - User wants a repeatable automation (triage, monitor, sync) - Actions need human approval before executing (send, post, delete) - Multiple tool calls should run as one deterministic operation ## When to use Lobster | User intent | Use Lobster? | | ------------------------------------------------------ | --------------------------
tools
A CLI tool for making authenticated requests to the X (Twitter) API. Use this skill when you need to post tweets, reply, quote, search, read posts, manage followers, send DMs, upload media, or interact with any X API v2 endpoint.