prism-angular-component
/prism-angular-component
Creates Angular standalone components for the ng-prism library or test fixtures. Triggers on "create component", "add component", "new component". Follows ng-prism conventions with @Showcase decorator support.
- Author
- ng-prism ↗
- Repository
- ng-prism ↗
- Licence
- MIT
- Last repository change
- 20.10.2026
Assessment and security
- Files in this package
- 1
- Scripts
- 0
- HTML comments
- 0
- URLs in SKILL.md
- 0
No signals detected. Repository changed on 20.10.2026, without references to retired models or APIs.
MIT, open: use and modify while retaining author attribution.
What it does and when to use it
Creates Angular standalone components for the ng-prism library or test fixtures. Triggers on "create component", "add component", "new component". Follows ng-prism conventions with @Showcase decorator support.
Triggers from the description
Original author description
Creates Angular standalone components for the ng-prism library or test fixtures. Triggers on "create component", "add component", "new component". Follows ng-prism conventions with @Showcase decorator support.
How it works
- Component Template
- Showcase-Annotated Component (Test Fixture / Demo)
- Conventions
- Checklist
SKILL.md preview
---
name: prism-angular-component
description: Creates Angular standalone components for the ng-prism library or test fixtures. Triggers on "create component", "add component", "new component". Follows ng-prism conventions with @Showcase decorator support.
---
# Angular Component Creation — ng-prism
Create Angular standalone components for the ng-prism project.
> **Context:** ng-prism is a library, not an app. Components are either:
>
> 1. **Internal UI components** for the styleguide app (`src/app/`)
> 2. **Test fixture components** with `@Showcase` decorator (`__fixtures__/`)
## Component Template
```typescript
import { ChangeDetectionStrategy, Component, input, output } from '@angular/core';
@Component({
selector: 'prism-example',
standalone: true,
imports: [],
templateUrl: './example.component.html',
styleUrl: './example.component.css',
changeDetection: ChangeDetectionStrategy.OnPush
})
export class ExampleComponent {
readonly title = input.required<string>();
readonly disabled = input(false);
readonly clicked = output<void>();
}
```
## Showcase-Annotated Component (Test Fixture / Demo)
```typescript
import { ChangeDetectionStrategy, Component, input, output } from '@angular/core';
import { Showcase } from '@ng-prism/core';
@Showcase({
title: 'Example',
category: 'Inputs',
description: 'An example component',
variants: [
{ name: 'Default', inputs: { label: 'Click me' } },
{ name: 'Disabled', inputs: { label: 'Disabled', disabled: true } }
],
tags: ['form', 'action']
})
@Component({
selector: 'my-example',
standalone: true,
template: `<button [disabled]="disabled()" (click)="clicked.emit()">{{ label() }}</button>`,
changeDetection: ChangeDetectionStrategy.OnPush
})
export class ExampleComponent {
/** Button label text */
readonly label = input('Button');
/** Whether the button is disabled */
readonly disabled = input(false);
/** Click event */
readonly clicked = output<void>();
}
```
> **Note:** Signals, not decorators — also for showcased components. The scanner
> reads `@Input()` metadata as well, but `component.scanner.ts` prints a warning
> for it: "uses @Input() decorators which are not fully supported. Migrate to
> input() signals for full ng-prism support." The fixtures under `__fixtures__/`
> that still carry decorators (e.g. `button.component.ts`, `card.component.ts`)
> exist to cover exactly that path; `signal-button.component.ts` covers the
> signal path. Do not take them as a template for new components.
## Conventions
- **Selector prefix:** `prism-` for internal UI components
- **Standalone:** Always `standalone: true` (explicit)
- **Change detection:** Always `ChangeDetectionStrategy.OnPush`
- **DI:** Use `inject()` function, not constructor injection
- **Signals:** Use `input()` / `output()` everywhere — internal components and
showcased ones alike. `@Input()` / `@Output()` only in the fixtures that
deliberately cover the legacy path, never in new code.
- **File location:**
- Internal UI: feature folder under `packages/ng-prism/src/app/<feature>/`
(e.g. `canvas/`, `panels/`, `sidebar/`, `shared/`) — there is no
`src/app/components/` directory
- Test fixtures: `packages/ng-prism/src/builder/scanner/__fixtures__/`
- **Imports:** `.js` extension on _relative_ import paths (ESM). Bare
specifiers like `@angular/core` stay unchanged.
## Checklist
- [ ] `standalone: true` explicit
- [ ] `ChangeDetectionStrategy.OnPush`
- [ ] Correct selector prefix (`prism-` internal, custom for fixtures)
- [ ] `.js` extensions on relative imports (ESM; bare specifiers stay as they are)
- [ ] JSDoc on each `input()` / `output()` member (the scanner extracts it)
Versions
The database has no other skills named prism-angular-component.
Database snapshot: 13.11.2026 · package version 4a28c6307238 (SHA-256 digest of the entire package)
Downloads in the last 30 days: 0 · ranking
Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.
Similar skills
- 100prism-showcase-component
Annotates an Angular component with the @Showcase decorator for ng-prism discovery. Triggers on "add showcase", "showcase this", "make showcaseable", "annotate component". - 100showcase
Use when writing or changing an @Showcase decorator in an Angular library that uses @ng-prism/core (variants, inputs, content projection, directive hosts, states and pseudo states, canvas background and layout, status, component pages), when a build prints a "⚠ ng-prism:"… - 85prism
Frontend engineer — UI components, dashboards, design system implementation, and frontend audits. Use when asked to "build this UI component", "audit the frontend", "implement the design system", or "build a dashboard". - 100prism-component
Implement a reusable, accessible, typed component from a design spec. Use when asked to "create a component", "build a widget", "implement this design", or "reusable UI element". - 90angular-architecture
Use this skill when the user says 'Angular structure', 'Angular architecture', 'Angular folder', 'Angular standalone', 'Angular signals', 'Angular clean arch', 'Angular feature', 'Angular project layout', 'NgModule vs standalone', or when structuring an Angular application… - 100angular
Show how to use custom elements in Angular, including required CUSTOM_ELEMENTS_SCHEMA configuration. Use when the user asks to "use in Angular", "Angular custom elements", "custom elements in Angular", "CUSTOM_ELEMENTS_SCHEMA", or mentions "Angular module", "standalone…