com um clique
add-plugin
Add and configure a Momentum CMS plugin
Instalar com Codex ou Claude Copie este prompt, cole no Codex, Claude ou outro assistente e deixe que ele revise a página da skill e instale para você.
Menu
Add and configure a Momentum CMS plugin
Instalar com Codex ou Claude Copie este prompt, cole no Codex, Claude ou outro assistente e deixe que ele revise a página da skill e instale para você.
Baseado na classificação ocupacional 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 | add-plugin |
| description | Add and configure a Momentum CMS plugin |
| argument-hint | <plugin-name> |
Add and configure a plugin in this Momentum CMS project.
$ARGUMENTS - Plugin name: "seo", "analytics", "otel", "event-bus", or an npm package namesrc/momentum.config.tsplugins arraynpm run generate to regenerate types and admin config@momentumcms/plugins-seo)Adds SEO fields to collections, sitemap.xml, robots.txt, meta tag API, and an admin dashboard. Included by default in scaffolded projects.
npm install @momentumcms/plugins-seo
// In src/momentum.config.ts
import { seoPlugin } from '@momentumcms/plugins-seo';
const seo = seoPlugin({
collections: ['posts'], // Collection slugs to inject SEO fields into (or '*' for all)
siteUrl: BASE_URL, // Base URL for sitemaps and canonical URLs
analysis: true, // Enable SEO scoring analysis on save
sitemap: true, // Enable /sitemap.xml endpoint
robots: true, // Enable /robots.txt endpoint
metaApi: true, // Enable /api/seo/meta/:collection/:id endpoint
adminDashboard: true, // Enable SEO admin pages (dashboard, sitemap, robots)
});
const config = defineMomentumConfig({
// ...existing config
plugins: [authPlugin, seo],
});
What it adds:
@momentumcms/plugins-analytics)Adds event tracking, content performance dashboard, and block-level analytics.
npm install @momentumcms/plugins-analytics
// In src/momentum.config.ts
import { analyticsPlugin } from '@momentumcms/plugins-analytics';
const analytics = analyticsPlugin({
trackCollections: true,
});
const config = defineMomentumConfig({
// ...existing config
plugins: [authPlugin, analytics],
});
What it adds:
@momentumcms/plugins-otel)Adds distributed tracing with OpenTelemetry spans for all collection operations.
npm install @momentumcms/plugins-otel
// In src/momentum.config.ts
import { otelPlugin } from '@momentumcms/plugins-otel';
const tracing = otelPlugin({
serviceName: 'my-cms',
});
const config = defineMomentumConfig({
// ...existing config
plugins: [authPlugin, tracing],
});
What it adds:
@momentumcms/plugins-core)Pub/sub for collection lifecycle events. Already installed as a dependency.
// In src/momentum.config.ts
import { eventBusPlugin } from '@momentumcms/plugins-core';
const events = eventBusPlugin();
const config = defineMomentumConfig({
// ...existing config
plugins: [authPlugin, events],
});
// Subscribe to events anywhere:
events.bus.on('posts:afterChange', ({ doc, operation }) => {
console.log(`Post ${operation}:`, doc.title);
});
What it adds:
npm run generate # Regenerate types and admin config
npm run dev # Restart dev server
For writing your own plugin, see the Writing a Plugin documentation.
A custom plugin implements the MomentumPlugin interface:
import type { MomentumPlugin } from '@momentumcms/core';
export function myPlugin(config: MyConfig): MomentumPlugin {
return {
name: 'my-plugin',
collections: [], // Optional: add collections
adminRoutes: [], // Optional: add admin pages
modifyCollections(collections) {}, // Optional: inject fields/hooks
async onInit(context) {}, // Optional: before API init
async onReady(context) {}, // Optional: after API ready
async onShutdown(context) {}, // Optional: graceful shutdown
};
}