skills/angular-awesome-new-component/SKILL.md
Create a new Angular Awesome wrapper directive or component for a Web Awesome web component. Use when adding a new wa-* component wrapper, scaffolding a directive with its spec/rules/example files, wiring it into public-api.ts, updating the changelog, and regenerating docs. Covers the full end-to-end flow from llms.txt API extraction through to build verification.
npx skillsauth add gedmarc/angular-awesome angular-awesome-new-componentInstall 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.
End-to-end workflow for adding a new wa-* component wrapper to Angular Awesome.
llms.txt — find the <wa-name> entry; note properties, slots, events, CSS parts, CSS custom properties.src/directives/<name>/<name>.directive.ts.src/directives/<name>/<name>.directive.spec.ts.src/directives/<name>/<name>.rules.md.src/directives/<name>/<name>.example.md.src/public-api.ts.npx ng build must succeed.npx ng test --no-watch --browsers=ChromeHeadless --include="**/<name>*.spec.ts" must pass.node docs/generate-docs.js.Search llms.txt for #### \<wa-name>`` to find:
@Input() fields@Output() fields with dual aliasesnativeElement or wrapper methodsimport { Directive, ElementRef, EventEmitter, Input, OnInit, OnChanges, OnDestroy, Output, SimpleChanges, Renderer2, inject } from '@angular/core';
@Directive({
selector: 'wa-<name>',
standalone: true
})
export class Wa<Name>Directive implements OnInit, OnChanges, OnDestroy {
// Map each Property from llms.txt to an @Input()
@Input() propertyName?: string;
// Map each Event from llms.txt to dual @Output()
@Output() waEventName = new EventEmitter<Event>();
@Output('wa-event-name') waEventNameHyphen = this.waEventName;
private el = inject(ElementRef);
private renderer = inject(Renderer2);
private eventCleanups: (() => void)[] = [];
ngOnInit() { this.applyInputs(); this.setupEventListeners(); }
ngOnChanges(_: SimpleChanges) { this.applyInputs(); }
ngOnDestroy() { this.eventCleanups.forEach(fn => fn()); }
private applyInputs() {
// this.setAttr('property-name', this.propertyName); for each input
}
private setupEventListeners() {
const n = this.el.nativeElement;
// this.eventCleanups.push(this.renderer.listen(n, 'wa-event-name', e => this.waEventName.emit(e)));
}
public get nativeElement(): HTMLElement { return this.el.nativeElement; }
private setAttr(name: string, value: string | null | undefined) {
if (value != null) this.renderer.setAttribute(this.el.nativeElement, name, value);
}
}
@Component({
selector: 'test-host', standalone: true,
imports: [Wa<Name>Directive],
template: `<wa-<name> [propertyName]="prop"></wa-<name>>`
})
class TestHostComponent { prop = 'value'; }
describe('Wa<Name>Directive', () => {
let fixture: ComponentFixture<TestHostComponent>;
beforeEach(async () => {
await TestBed.configureTestingModule({ imports: [TestHostComponent] }).compileComponents();
fixture = TestBed.createComponent(TestHostComponent);
});
it('should create element', () => { /* ... */ });
it('should bind attributes', () => { /* ... */ });
it('should update on change', () => { /* ... */ });
});
# <Name>
<Description from llms.txt>
## Overview
## Getting Started
## API Reference
### Inputs / Outputs / Slots / Methods
## Styling
### CSS Custom Properties / CSS Parts
# <Name> Examples
## Basic Usage
## Variants / Sizes
## Events
## Slots
src/public-api.tsnpx ng build)node docs/generate-docs.js)$angular-awesome skill → references/directive-patterns.md$angular-awesome skill → references/testing-conventions.mddevelopment
Use Angular Awesome wrapper directives for Web Awesome web components in Angular 20+ projects. Trigger when tasks mention wa-* components (wa-button, wa-input, wa-dialog, wa-toast, wa-select, wa-checkbox, etc.), Angular Awesome directives, Web Awesome Angular integration, component variants/appearance/size tokens, slot projection, form control binding, or angular-awesome imports. Covers component usage, layout utilities, services (toast), theming, and accessibility.
development
Theme and style Angular Awesome components using Web Awesome design tokens, CSS custom properties, CSS parts, variant/appearance/size tokens, and layout utilities. Use when customizing component appearance, applying brand colors, overriding default styles, using CSS shadow parts, or configuring layout directives (cluster, stack, grid, gap, align, flank, frame, split).
development
Write and maintain tests for Angular Awesome wrapper directives, components, and services. Use when creating spec files for wa-* components, testing form control integration, testing event emission, testing toast/service behavior, running headless or BrowserStack tests, or debugging test failures in Angular Awesome.
development
Migrate Angular Awesome component wrappers when the upstream Web Awesome API changes. Use when replacing custom implementations with official web components, updating property names or types, removing deprecated fields, aligning placement/position values, updating tests for new APIs, and updating docs/changelog for breaking changes.