一键导入
migrations
Run migrations, generate schemas, and manage code generation for Momentum CMS.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Run migrations, generate schemas, and manage code generation for Momentum CMS.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Adversarial review checklist for stateful Momentum CMS features (workflow, versions, scheduled publish, permissions inheritance, branches, anything that adds writeable state + access control). Use BEFORE merging a feature that introduces new mutating routes, new system-managed columns, new access functions, or new audit trails. Trigger phrases include "red-team this", "adversarial review", "security review of <feature>", "before merging <feature>", "/cms-feature-red-team".
Set up the Momentum CMS MCP server plugin and generate Claude Code MCP config for AI tool integration. Use when connecting Claude Code (or any MCP client) to a Momentum CMS instance.
Generate a new Momentum CMS collection with fields, access control, and hooks
Generate an Angular component with signals, OnPush, and host-based styling following Momentum CMS conventions. Use when creating new UI components in any library.
Write and validate Playwright E2E tests for Momentum CMS features. UI tests ALWAYS start from /admin dashboard and navigate via sidebar/dashboard — never go directly to deep URLs. Always starts the server and inspects the actual UI before writing assertions. Triggers include "write e2e tests for...", "add e2e tests", "test the admin UI for...", or "/e2e-test <feature>".
Run migrations, generate schemas, and manage code generation for Momentum CMS. Use when working with database migrations, Drizzle schema generation, type generation, or Angular schematics.
| name | migrations |
| description | Run migrations, generate schemas, and manage code generation for Momentum CMS. |
| argument-hint | <generate|run|status|rollback|codegen> |
Reference for database migrations and type/config generation.
$ARGUMENTS - Operation: generate, run, status, rollback, or codegennpm run migrate:generate # Diff schema, create migration file
npm run migrate:run # Apply pending migrations
npm run migrate:status # Show applied vs pending
npm run migrate:rollback # Rollback latest batch
npx drizzle-kit generate # Create SQL migrations from schema diff
npx drizzle-kit migrate # Apply migrations
npx drizzle-kit push # Direct push (dev only, skips migration files)
The generator reads momentum.config.ts (server-side, Node) and outputs:
npm run generate # One-shot generation (types + admin config)
Output files (do not edit manually):
src/generated/momentum.types.ts — TypeScript interfacessrc/generated/momentum.config.ts — Browser-safe admin configsrc/collections/npm run generate to regenerate types + admin confignpm run migrate:generate to create a migration filenpm run migrate:run to apply