Agent skill

Generate Swim From Angular

by swimlane in swimlane/ngx-ui

Generate Lit Component from Angular Implementation. An agent skill from swimlane/ngx-ui.

MITAuto-check passedFrontend & Design

Install Generate Swim From Angular

skills CLI
$ npx skills add swimlane/ngx-ui --skill generate-swim-from-angular -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install swimlane/ngx-ui generate-swim-from-angular --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/swimlane/ngx-ui.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.cursor/skills/generate-swim-from-angular .claude/skills/generate-swim-from-angular && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
generate-swim-from-angular
GitHub stars
735
Token cost
~4.2k tokens
SKILL.md length
2,006 words
Files
1
Skills in repo
3
Repo updated
First seen
Licence
MIT

At a glance

Generate Lit Component from Angular Implementation. An agent skill from swimlane/ngx-ui.

  • Works in 4 steps: Event listeners → Timers → Pattern → …
  • Frontend & Design work in your project
  • SKILL.md covers Input, Output Location and Structure, Reference Implementations… and Angular → Lit Mapping, plus 9 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Generate Swim From Angular is an agent skill from swimlane/ngx-ui. Generate Lit Component from Angular Implementation

Its SKILL.md is about 4.2k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Frontend & Design. It works with Angular. The repository describes itself as: 🚀 Style and Component Library for Angular. The licence is MIT.

When your agent uses it

  • Frontend & Design work in your project

Example prompts

  • “/generate-swim-from-angular”

Workflow steps

4 steps, taken from the first numbered list in SKILL.md.

  1. Event listeners
  2. Timers
  3. Pattern
  4. Components that add listeners on other elements

What it can do on your machine

Read from SKILL.md and the folder at commit c98542d. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Generate Swim From Angular loads about 4.2k tokens when it runs. Until then it costs about 19 tokens; SKILL.md has 2,006 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~19
When it runs · the whole SKILL.md, loaded when a task matches
~4.2k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from swimlane/ngx-ui at commit c98542d, republished under its MIT licence (© swimlane). 2,006 words, ~4,162 tokens.

Download SKILL.mdSave it as .claude/skills/generate-swim-from-angular/SKILL.md (or your agent's skills folder).
name
generate-swim-from-angular
description
Generate Lit Component from Angular Implementation
disable-model-invocation
true

Generate Lit Component from Angular Implementation

Generate a Lit web component in @swimlane/swim-ui that mirrors the design and behavior of an Angular component from @swimlane/ngx-ui. The output must match existing Lit patterns and design system parity.

Input

  • Use the Angular component the user has provided, has open, or @-mentioned. If the user typed a component name or path after this command (e.g. /generate-swim-from-angular checkbox), use that as the target.
  • Include the component class file (.component.ts), template (.html), and styles (.scss) when converting.

Output Location and Structure

  • All new files go under projects/swimlane/swim-ui/src/components/<name>/.
  • Generate:
    • <name>.component.ts – main Lit class
    • <name>.styles.ts – component styles (Lit css template)
    • index.ts – re-exports for the component and any enums/interfaces
    • Optional: *.enum.ts, *.interface.ts when the Angular component defines enums or shared types
  • Update projects/swimlane/swim-ui/src/index.ts to export the new component (add export * from './components/<name>';).

Reference Implementations (Quality Bar)

Follow these existing Lit components for structure, patterns, and style:

  • Button (simpler): projects/swimlane/swim-ui/src/components/button/ – props, state, promise handling, styles
  • Input (form control): projects/swimlane/swim-ui/src/components/input/ – form-associated, validation, slots, ElementInternals
  • Select (complex): projects/swimlane/swim-ui/src/components/select/ – options, dropdown, filter, form association

Read their .component.ts, .styles.ts, and index.ts to match style and API documentation.

Angular → Lit Mapping

Apply these mappings consistently:

AngularLit
@Input()@property() with correct type, reflect: true where needed, attribute for kebab-case
@Output() x = new EventEmitter<T>()In handlers: this.dispatchEvent(new CustomEvent('x', { detail: value, bubbles: true })) and document with JSDoc @fires x
<ng-content> / <ng-content select="..."><slot></slot> / <slot name="..."></slot>
@ContentChild / @ViewChild@query('selector') for DOM refs; use slots for content projection
Template (.html)render() returning html template literal
Styles (.scss)Separate *.styles.ts with css tagged template; compose baseStyles and component styles in static styles = [baseStyles, componentStyles]. Use BEM for class names (see CSS section below).
Host classes (e.g. [class.in-progress]):host([state='in-progress']) in styles and/or reflected attributes on the host
ngOnInit / ngOnChangesconnectedCallback(), updated(), firstUpdated() as appropriate
Angular coercion (@angular/cdk/coercion, etc.)Use projects/swimlane/swim-ui/src/utils/coerce.ts: coerceBooleanProperty, coerceNumberProperty
Enums (e.g. in button-state.enum.ts)Keep as *.enum.ts in the component folder and export from index.ts

CSS: Colors and Variables

  • Do not copy hex or raw color values from the Angular styles. Always use CSS variables from the ngx-ui design system. These are defined in projects/swimlane/swim-ui/src/styles/base.ts (and tokens) and mirror ngx-ui (e.g. var(--blue-500), var(--grey-600), var(--red-500), var(--radius-4), var(--font-size-m)). Refer to ngx-ui's SCSS variables/tokens to pick the correct variable names.
  • Never hardcode #..., rgb(...), or rgba(...) for design tokens; use var(--...) so theming and consistency are preserved.

CSS: BEM Naming

  • Use BEM (Block__element--modifier) for class names in the Lit component template and styles.
  • Block: The component root (e.g. swim-button → class like swim-button or a short block name).
  • Element: Descendant, double underscore: block__element (e.g. swim-button__content, swim-button__icon).
  • Modifier: State/variant, double hyphen: block__element--modifier or block--modifier (e.g. swim-button--primary, swim-button__icon--spinning).
  • Apply BEM classes in the render() template and style them in *.styles.ts so selectors are clear and predictable.

Design System and Quality

  • Tokens and base: Use design tokens and baseStyles from projects/swimlane/swim-ui/src/styles/ (and styles/base.ts). Rely on CSS variables (see above); do not introduce new hardcoded colors or spacing that contradict ngx-ui.
  • Custom element name: Map ngx-<name> to swim-<name> (e.g. ngx-button → swim-button). Use @customElement('swim-<name>').
  • JSDoc: Document public API with @slot, @fires, and @csspart where applicable.
  • Form controls: If the Angular component is used in forms, implement static formAssociated = true and use ElementInternals for value and validation (see input and select).
  • Follow Accessibility (WCAG) and Performance sections below.

Accessibility (WCAG)

Components must meet WCAG 2.1 expectations so they are usable by keyboard, screen readers, and assistive tech. Apply these consistently:

  • Semantics: Use the correct HTML element or ARIA role (e.g. role="button" only when not a <button>, role="tablist" / role="tab" / role="tabpanel", role="combobox", role="listbox").
  • ARIA: Preserve or add ARIA from the Angular implementation: aria-label, aria-labelledby, aria-describedby, aria-expanded, aria-selected, aria-controls, aria-disabled, aria-invalid, aria-required, aria-hidden where they convey state or relationships. Keep id / aria-controls / aria-labelledby links valid and stable.
  • Keyboard: Full keyboard operation: Tab into the component, Enter/Space to activate buttons and options, Arrow keys for lists/tabs/combos, Escape to close/cancel where appropriate. No keyboard traps; focus moves logically (e.g. roving tabindex or focus management in modals/dropdowns).
  • Focus: Visible focus indicator (e.g. :focus-visible with outline) and no outline: none without a visible replacement. When opening overlays or changing active item, move focus as needed (e.g. to first focusable or selected item).
  • Labels: All form controls and interactive regions have an accessible name (label, aria-label, or aria-labelledby). Use <label> + id or ElementInternals for form-associated controls.
  • State: Expose state to assistive tech (e.g. aria-selected, aria-checked, aria-expanded, aria-disabled) and keep it in sync with the component.
  • Contrast: Rely on design tokens for colors; ensure focus/active/disabled states meet contrast requirements (design system should already align with WCAG where applicable).

Performance

Keep components efficient and avoid unnecessary work:

  • Property vs state: Use @property() for public API and @state() for internal UI state. Avoid reflecting internal state as attributes unless needed for styling or accessibility.
  • Updates: Only trigger requestUpdate() or change properties when data actually changes. In setters, guard with if (this._x !== next) before assigning and dispatching.
  • Slot/children: Prefer slot.assignedElements() / slot.assignedNodes() in firstUpdated() or in response to slotchange; avoid querying on every render() or in tight loops.
  • Event listeners: Attach in firstUpdated() or connectedCallback(); always remove in disconnectedCallback() (e.g. slotchange, document/window click-outside, resize, drag). Use bound handler references (e.g. this._slotChangeBound = () => this._onSlotChange();) so the same reference can be passed to removeEventListener. Prefer one delegated listener over many per-item listeners where practical.
  • Heavy work: Defer non-critical work (e.g. requestAnimationFrame, setTimeout(..., 0)) so initial render stays fast. Avoid synchronous layout thrash (e.g. reading then writing layout properties repeatedly).
  • Styles: Keep static styles as shared css template literals; avoid defining new style objects per instance. Reuse baseStyles and component-level css blocks.
  • Re-renders: Use updated(changedProperties) to run logic only when specific properties change; avoid side effects in render().

Memory leaks: clean up in disconnectedCallback

To avoid leaks when components are removed from the DOM (e.g. navigation, conditional rendering), every component must clean up in disconnectedCallback():

  1. Event listeners

    • Remove any listener added to document, window, or other elements (e.g. slot, child components): use the same bound reference for addEventListener and removeEventListener.
    • Examples: document click-outside, window resize, slot slotchange, handle drag/dblclick, panel mouseenter/mouseleave.
    • If you attach in firstUpdated() to a slot or element from @query, store the element and the bound handler so you can remove in disconnectedCallback().
  2. Timers

    • Clear any setTimeout or setInterval (and requestAnimationFrame if recurring): call clearTimeout / clearInterval and set the stored id to undefined.
    • Clear throttle/debounce timeouts so no callback runs after disconnect.
  3. Pattern

    • Store handlers as bound class fields (e.g. private _slotChangeBound = () => this._onSlotChange();) so the same reference is used for add and remove.
    • In disconnectedCallback(), remove listeners and clear timers before calling super.disconnectedCallback().
  4. Components that add listeners on other elements

    • If the component adds listeners to slotted children or to elements created in firstUpdated() (e.g. overlay panel), keep a reference to that element and the bound handlers, and remove them in disconnectedCallback() (and optionally when the overlay closes, to avoid duplicate listeners on re-open).
Show full SKILL.md (871 more words)Show less

Demo design: match Angular demos

Before writing the Lit demo, read the corresponding Angular demo page under the repo root src/app/ so the Lit demo is very close to how the Angular demo is designed.

  • Structure: Mirror section order and titles. Angular demos use <ngx-tabs> with "Examples" and "API"; Lit uses <swim-section section-title="..."> for each logical block. Use the same section titles where applicable (e.g. "Demo", "Disabled", "Events and FormGroup", "Usage").
  • Content: Use the same labels, option sets, and example text as the Angular demo (e.g. "Alert the SOC" for checkbox, "Attack Type" / Breach, DDOS, Physical for select, button variants in the same order).
  • Sections: Include every subsection the Angular demo has (Basic, Variants, Sizes, States table, Interactive, Usage/API). Do not omit variants or states.

Finding the Angular demo (do this dynamically):

Do not rely on a fixed list of component paths. For the component you are converting (e.g. button, checkbox, tooltip):

  1. Discover demo pages: Search under the repo root src/app/ for directories named *-page (e.g. src/app/forms/, src/app/components/, src/app/dialogs/, src/app/elements/ contain such folders).
  2. Match to this component: Find the demo that showcases the corresponding ngx component by either:
    • Matching folder name to the component (e.g. checkbox → checkbox-page, button → buttons-page, button-group → button-group-page, tooltip → tooltip-page), or
    • Searching for ngx-<name> (e.g. ngx-checkbox, ngx-button) in *.component.html files under src/app/ and opening the file that contains it.
  3. Use that Angular demo page's template file (e.g. *-page.component.html) as the single source for section structure, titles, and example content.

This way every component's demo is found the same way and the command stays valid as new Angular demo pages are added.

Steps

  1. Identify the target Angular component (from context or user message).
  2. Read its class, template, and styles; list all inputs, outputs, content projection, and behavior.
  3. Read the corresponding Angular demo page (see Demo design: match Angular demos above) to plan section titles, example content, and interactive behavior.
  4. Create the component folder under projects/swimlane/swim-ui/src/components/<name>/.
  5. Implement the Lit component, styles, and any enums/interfaces following the mapping, reference components, Accessibility (WCAG), Performance, and Memory leaks: clean up in disconnectedCallback sections.
  6. Add index.ts exports and update projects/swimlane/swim-ui/src/index.ts.
  7. Add a declare global { interface HTMLElementTagNameMap { 'swim-<name>': ComponentClass; } } block for TypeScript.
  8. Add a demo for the new component so it is very close to the Angular demo (see Demo design: match Angular demos):
    • Avoid any inline styles, even in demo templates. Use demo CSS classes from index.html (e.g. .section-divider, .page-title, .section-desc, .demo-row--column, .demo-label--after, .demo-pre).
    • Collapsible panels (swim-section): Use <swim-section section-title="..."> with the same titles as the Angular demo's <ngx-section sectionTitle="..."> blocks. Wrap each <section class="section"> content in <swim-section section-title="...">. Use section-collapsible="false" only when the Angular demo does. Ensure section component is imported in demo/src/main.ts if used.
    • In demo: Add the new component block in projects/swimlane/swim-ui/demo/public/sections/<name>.html. Start the file with <hr class="section-divider"> then <h1 id="component-id" class="page-title">...</h1> and <p class="subtitle">...</p> so the nav link (e.g. href="#checkbox") works. Add <name> to the SECTION_FILES array in demo/src/main.ts. Add a nav link in demo/index.html (e.g. <a class="sub-nav-item" href="#component-id">Label</a> under the appropriate group). Structure of the section file:
      • Divider, then main heading (with id for nav) and subtitle.
      • One or more <section class="section"> with <swim-section section-title="..."> matching Angular section titles, showing: basic usage, all variants/sizes, states (e.g. disabled), interactive example, then Usage with <pre class="demo-pre"><code>...</code></pre> (import + minimal HTML).
    • In demo/src/main.ts: Add component import(s); add <name> to SECTION_FILES if using section files; add any DOMContentLoaded setup (e.g. event listeners, option data) so every interactive demo works.
  9. Validate in the browser (see Browser validation below). Fix any broken behavior, then re-validate until the demo works.

Produce a complete, usable Lit component that mirrors the Angular implementation with best quality. Components must be accessible (WCAG 2.1) and efficient in performance; the demo must match the Angular demo design and all demo functionality must work after validation.

Browser validation

After generating the component and demo:

  1. Request or use browser access to open the swim-ui demo app (e.g. the URL where the demo runs, such as the dev server for projects/swimlane/swim-ui/demo). If you have a way to open or inspect a browser tab (e.g. Cursor's browser tools or user opening the page), use it.
  2. Check every functionality on the new component's demo section:
    • Each variant/size/state renders correctly.
    • All interactive examples work (clicks, form changes, keyboard, toggles, selects, etc.).
    • Any demo logic in demo/src/main.ts (e.g. buttons that set promise, select options, event handlers) is wired correctly and runs without errors in the console.
  3. Fix any issues found: correct selectors (e.g. getElementById), event names, property names, or component API usage so the demo behaves as in the Angular version.
  4. If browser access is not available or not granted: Tell the user explicitly: "Browser access was not provided, so I could not validate the demo in the browser. Please open the swim-ui demo page, go to the [Component Name] section, and verify that every example and interaction works. If something is broken, share what you see and I'll fix it. You can also grant browser access so I can validate and fix issues directly."
  5. Do not mark the task complete until the demo has been validated (by you in the browser or by the user) and any reported issues are fixed.

© swimlane, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .cursor/skills/generate-swim-from-angular of swimlane/ngx-ui.

Open the folder on GitHubat commit c98542d

Compare with similar skills

Generate Swim From Angular next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Generate Swim From Angular compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Generate Swim From Angular this skillswimlane/ngx-ui735—~4.2kAutomated safety check: PassMIT
Boneyard0xGF/boneyard7.5k—~2.2kAutomated safety check: NotesMIT
Abp Angularabpframework/abp14k—~1.2kAutomated safety check: PassLGPL-3.0
Spartan UI Angular Componentsspartan-ng/spartan2.9k—~2.4kAutomated safety check: PassMIT
Angular Developermxtommy/Kip1274 repos~2.4kAutomated safety check: PassMIT
Feature SyncNG-ZORRO/ng-zorro-antd9.2k—~840Automated safety check: PassMIT

Similar skills

  • Boneyard

    0xGF/boneyard

    Use boneyard-js to add, configure, debug, or rebuild skeleton screens.

    7.5k GitHub stars~2.2k tokensUpdated 1 mo ago
    Frontend & DesignAuto-check: notes
  • Abp Angular

    abpframework/abp

    ABP Angular UI patterns - generate-proxy, ListService, PermissionGuard, abpLocalization pipe, ConfirmationService, ToasterService, ConfigStateService.

    14k GitHub stars~1.2k tokensUpdated yesterday
    Frontend & DesignAuto-check passed
  • Helps add, compose, debug and style spartan/ui components in Angular projects, using its Brain headless primitives and Helm styled layer through the @spartan-ng/cli generators.

    2.9k GitHub stars~2.4k tokensUpdated yesterday
    Frontend & DesignAuto-check passed
  • Generates Angular code and provides architectural guidance. An agent skill from mxtommy/Kip.

    127 GitHub starsUsed in 4 repos~2.4k tokens
    Frontend & DesignAuto-check passed
  • Feature Sync

    NG-ZORRO/ng-zorro-antd

    Sync an Ant Design React component or feature into NG-ZORRO.

    9.2k GitHub stars~840 tokensUpdated yesterday
    Frontend & DesignAuto-check passed
  • Markstream Install

    Simon-He95/markstream-vue

    Install and wire markstream-vue, markstream-react, markstream-vue2, markstream-angular, or markstream-svelte into an existing repository.

    3k GitHub stars~2.2k tokensUpdated 4 days ago
    Frontend & DesignAuto-check passed

More from swimlane/ngx-ui

  • Use Swim UI

    swimlane/ngx-ui

    Use Swimlane swim-ui (swim- custom elements) when building custom solutions, record widgets, or report widgets for Turbine.

    735 GitHub stars~2.6k tokensUpdated yesterday
    Auto-check passed
  • Generate Swimlane Lit Element Solution (CDN). An agent skill from swimlane/ngx-ui.

    735 GitHub stars~3.4k tokensUpdated yesterday
    Auto-check passed

Works with

Questions about Generate Swim From Angular

What does Generate Swim From Angular do?

Generate Lit Component from Angular Implementation. An agent skill from swimlane/ngx-ui. Generate Swim From Angular is an agent skill from swimlane/ngx-ui.

When should I use Generate Swim From Angular?

Generate Swim From Angular fits situations like: frontend & Design work in your project.

How do I install Generate Swim From Angular in Claude Code?

Run `npx skills add swimlane/ngx-ui --skill generate-swim-from-angular -a claude-code`. Or copy the skill folder (.cursor/skills/generate-swim-from-angular in swimlane/ngx-ui) into .claude/skills/generate-swim-from-angular in your project. Claude Code loads it when a task matches its description.

How do I install Generate Swim From Angular in Codex?

Run `npx skills add swimlane/ngx-ui --skill generate-swim-from-angular -a codex`. Or copy the skill folder (.cursor/skills/generate-swim-from-angular in swimlane/ngx-ui) into .agents/skills/generate-swim-from-angular in your project. Codex loads it when a task matches its description.

Can I use Generate Swim From Angular in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add swimlane/ngx-ui --skill generate-swim-from-angular -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/generate-swim-from-angular, .gemini/skills/generate-swim-from-angular, .github/skills/generate-swim-from-angular and .opencode/skills/generate-swim-from-angular in your project.

What does Generate Swim From Angular need to run?

SKILL.md names no scripts, command-line tools or credentials: Generate Swim From Angular is instructions for the agent only.

Does Generate Swim From Angular access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Generate Swim From Angular safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Generate Swim From Angular use?

Generate Swim From Angular is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Generate Swim From Angular use?

About 4.2k tokens (SKILL.md is roughly 17k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Generate Swim From Angular?

Skills that share tags, products or a category with Generate Swim From Angular: Boneyard (0xGF/boneyard, 7.5k stars), Abp Angular (abpframework/abp, 14k stars), Spartan UI Angular Components (spartan-ng/spartan, 2.9k stars) and Angular Developer (mxtommy/Kip, 127 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Generate Swim From Angular?

swimlane (a GitHub organization) maintains it in swimlane/ngx-ui, which has 735 GitHub stars. The repository holds 3 skills in this directory. The repository was last updated on October 9, 2026.

Source: swimlane/ngx-ui on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.