원클릭으로
component
Generate an Angular component with signals, OnPush, and host-based styling following Momentum CMS conventions.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Generate an Angular component with signals, OnPush, and host-based styling following Momentum CMS conventions.
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 | component |
| description | Generate an Angular component with signals, OnPush, and host-based styling following Momentum CMS conventions. |
| argument-hint | <component-name> |
Create an Angular component following Momentum CMS conventions.
$ARGUMENTS - Component name in kebab-case (e.g., "data-table", "post-card")Create component file at src/app/components/<component>.ts (or src/app/<feature>/<component>.ts)
Use this template:
import { ChangeDetectionStrategy, Component, computed, input, output, signal, inject } from '@angular/core';
@Component({
selector: 'app-<component-name>',
host: { class: 'block' },
template: `
<!-- Template here -->
`,
changeDetection: ChangeDetectionStrategy.OnPush,
})
export class <PascalName>Component {
// Signal inputs (use proper types, never `any`)
readonly data = input.required<DataType>();
// Optional inputs with defaults
readonly disabled = input(false);
// Signal outputs
readonly valueChange = output<ValueType>();
// Internal state
private readonly _loading = signal(false);
// Computed values
readonly loading = this._loading.asReadonly();
readonly hasData = computed(() => !!this.data());
}
standalone: true — default in Angular 21, redundantany types — use proper interfacesCommonModule import — unnecessary in Angular 21ChangeDetectionStrategy.OnPushinput() and input.required() for inputsoutput() for outputssignal() for internal state, computed() for derived valuesinject() for dependency injection@for/@if/@switch control flowAngular components create a host element. Style the host directly — do NOT add wrapper divs:
@Component({
selector: 'app-button',
host: { class: 'inline-flex items-center gap-2' },
template: `<ng-content />`,
})
NOT:
// BAD: unnecessary wrapper div
template: `<div class="inline-flex items-center gap-2"><ng-content /></div>`,
Use McmsThemeService for dark mode support:
import { McmsThemeService } from '@momentumcms/admin';
@Component({...})
export class MyComponent {
private readonly theme = inject(McmsThemeService);
toggleDarkMode(): void {
this.theme.toggleTheme();
}
readonly isDark = this.theme.isDark; // computed signal
readonly currentTheme = this.theme.theme; // 'light' | 'dark' | 'system'
}
The project uses the @momentumcms/admin Tailwind preset and CSS variables for theming.
const adminPreset = require('@momentumcms/admin/tailwind.preset');
module.exports = {
presets: [adminPreset],
content: [
'./src/**/*.{html,ts}',
'./node_modules/@momentumcms/admin/**/*.{html,ts,mjs}',
'./node_modules/@momentumcms/ui/**/*.{html,ts,mjs}',
],
};
CSS variables are defined in src/styles.css with :root (light) and .dark variants. All use HSL values referenced via hsl(var(--mcms-<name>)). Key tokens:
--mcms-background/foreground — page background and text--mcms-primary/primary-foreground — primary actions (blue)--mcms-card/card-foreground — card surfaces--mcms-muted/muted-foreground — subtle backgrounds--mcms-destructive — danger/delete actions--mcms-sidebar — sidebar-specific colors--mcms-border, --mcms-input, --mcms-ring — form elements--mcms-radius — border radius baseUse Tailwind utility classes that reference these tokens (e.g., bg-background, text-foreground, border-border).