Agent skill

Create New Component

by IgniteUI in IgniteUI/igniteui-webcomponents

Create a new Lit web component following project conventions, including specification, component class, styles, tests, Storybook story, and exports

MITAuto-check passedFrontend & Design

Install Create New Component

skills CLI
$ npx skills add IgniteUI/igniteui-webcomponents --skill create-new-component -a claude-code

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

GitHub CLI
$ gh skill install IgniteUI/igniteui-webcomponents create-new-component --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/IgniteUI/igniteui-webcomponents.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/create-new-component .claude/skills/create-new-component && 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
create-new-component
GitHub stars
170
Token cost
~3k tokens
SKILL.md length
648 words
Files
1
Skills in repo
13
Repo updated
First seen
Licence
MIT

At a glance

Create a new Lit web component following project conventions, including specification, component class, styles, tests, Storybook story, and exports

  • Works in 9 steps: Write the specification → Create the component class → Create the SCSS files → …
  • Frontend & Design work in your project
  • SKILL.md covers Required Context, Steps, Validation Checklist and Common Pitfalls, plus 1 more section
  • Calls npm

What it does

Create New Component is an agent skill from IgniteUI/igniteui-webcomponents. Create a new Lit web component following project conventions, including specification, component class, styles, tests, Storybook story, and exports

Its SKILL.md is about 3k 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 Storybook and GitHub. The repository describes itself as: Ignite UI for Web Components is a complete library of UI components, giving you the ability to build modern web applications using encapsulation and the concept of reusable… The licence is MIT.

When your agent uses it

  • Frontend & Design work in your project

Example prompts

  • “/create-new-component”

Workflow steps

9 steps, taken from the step headings in SKILL.md.

  1. Write the specification
  2. Create the component class
  3. Create the SCSS files
  4. Create the theme aggregator
  5. Transpile the styles
  6. Write the tests
  7. Create the Storybook story
  8. Export and generate metadata
  9. Verify

What it can do on your machine

Read from SKILL.md and the folder at commit a6f3e2c. 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

    Shell commands in SKILL.md call:

    • npm

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

  • Network

    No URLs in SKILL.md. Its commands use npm, which can reach the network depending on how they are called.

    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

Create New Component loads about 3k tokens when it runs. Until then it costs about 42 tokens; SKILL.md has 648 words of instructions outside code blocks.

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

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 IgniteUI/igniteui-webcomponents at commit a6f3e2c, republished under its MIT licence (© IgniteUI). 648 words, ~2,965 tokens.

Download SKILL.mdSave it as .claude/skills/create-new-component/SKILL.md (or your agent's skills folder).
name
create-new-component
description
Create a new Lit web component following project conventions, including specification, component class, styles, tests, Storybook story, and exports

Create New Component

Scaffolds a component. The rules behind each step are in the Coding Guidelines.

Related: add-component-property, update-component-styles.

Required Context

Confirm with the user before you start:

  • Name: progress-bar → tag igc-progress-bar, class IgcProgressBarComponent
  • Purpose: one sentence, used as-is in the public API docs
  • Public API: initial properties, events, slots, CSS parts
  • Kind: display component, container, or form-associated control

Steps

1. Write the specification

Write src/components/[name]/spec.md first. It decides the public API, the keyboard model and the ARIA semantics. Copy the structure of src/components/splitter/spec.md and follow Specifications: one spec per directory, a hand-maintained table of contents, a revision history that starts at version 1, and no ownership sections. Fill in ## Test scenarios in step 6.

2. Create the component class

src/components/[name]/[name].ts:

ts
import { html, LitElement } from 'lit';
import { property } from 'lit/decorators.js';
import { registerComponent } from '#internals/definitions/register.js';
import { addThemingController } from '#theming/theming-controller.js';
import { styles } from './themes/[name].base.css.js';
import { styles as shared } from './themes/shared/[name].common.css.js';
import { all } from './themes/themes.js';

/**
 * [One-sentence description.]
 *
 * @element igc-[name]
 *
 * @slot - [Default slot description]
 *
 * @csspart base - [Part description]
 */
export default class Igc[Name]Component extends LitElement {
  public static readonly tagName = 'igc-[name]';
  public static override styles = [styles, shared];

  /* blazorSuppress */
  public static register(): void {
    registerComponent(Igc[Name]Component);
  }

  //#region Public attributes and properties

  /**
   * [Property description]
   * @attr some-prop
   * @default 'default-value'
   */
  @property({ reflect: true, attribute: 'some-prop' })
  public someProp = 'default-value';

  //#endregion

  constructor() {
    super();
    addThemingController(this, all);
  }

  protected override render() {
    return html`
      <div part="base">
        <slot></slot>
      </div>
    `;
  }
}

declare global {
  interface HTMLElementTagNameMap {
    'igc-[name]': Igc[Name]Component;
  }
}
  • Pass every component that the template renders to registerComponent(Self, ...deps).
  • Follow the region layout and the import rules.
  • Before you write lifecycle code, look for a controller in the controllers table or in src/internals. Examples: addRovingFocusController, addToggleController, addHostListeners, and the resizable() / draggable() directives.
  • Write JSDoc as product documentation. See API Documentation.
3. Create the SCSS files

The layout is in Styles and Theming. src/components/badge/themes/ is a complete example. Use 4-space indentation and load-path specifiers.

scss
// themes/[name].base.scss
@use 'styles/common/component';
@use 'styles/utilities' as *;

:host {
    display: block;
}
scss
// themes/light/_themes.scss (dark/_themes.scss has no $base)
@use 'styles/utilities' as *;
@use 'igniteui-theming/sass/themes/schemas/components/light/[name]' as *;

$base: digest-schema($light-[name]);
$material: digest-schema($material-[name]);
$bootstrap: digest-schema($bootstrap-[name]);
$fluent: digest-schema($fluent-[name]);
$indigo: digest-schema($indigo-[name]);
scss
// themes/light/[name].bootstrap.scss
// Dark files: add `@use '../light/themes' as light;` and use diff(light.$base, $theme).
@use 'styles/utilities' as *;
@use 'themes' as *;

$theme: $bootstrap;

:host {
    @include css-vars-from-theme(diff($base, $theme));
}

Also create light/[name].shared.scss (the full variable set from $base), shared/[name].common.scss, and, if you need them, shared/[name].[theme].scss.

[!NOTE] A new component has no schema until one is added to igniteui-theming. Until then, declare the CSS variables in shared/[name].common.scss and leave the light and dark files empty.

4. Create the theme aggregator

themes/themes.ts is the only hand-written TypeScript file in themes/:

ts
import { css } from 'lit';
import type { Themes } from '#theming/types.js';
// Dark Overrides
import { styles as bootstrapDark } from './dark/[name].bootstrap.css.js';
import { styles as fluentDark } from './dark/[name].fluent.css.js';
import { styles as indigoDark } from './dark/[name].indigo.css.js';
import { styles as materialDark } from './dark/[name].material.css.js';
// Light Overrides
import { styles as bootstrapLight } from './light/[name].bootstrap.css.js';
import { styles as fluentLight } from './light/[name].fluent.css.js';
import { styles as indigoLight } from './light/[name].indigo.css.js';
import { styles as materialLight } from './light/[name].material.css.js';
import { styles as shared } from './light/[name].shared.css.js';

const light = {
  shared: css`
    ${shared}
  `,
  bootstrap: css`
    ${bootstrapLight}
  `,
  material: css`
    ${materialLight}
  `,
  fluent: css`
    ${fluentLight}
  `,
  indigo: css`
    ${indigoLight}
  `,
};

const dark = {
  shared: css`
    ${shared}
  `,
  bootstrap: css`
    ${bootstrapDark}
  `,
  material: css`
    ${materialDark}
  `,
  fluent: css`
    ${fluentDark}
  `,
  indigo: css`
    ${indigoDark}
  `,
};

export const all: Themes = { light, dark };

If you add shared/[name].[theme].scss files, put each one before its override. For example, ${bootstrap} ${bootstrapLight} (see badge/themes/themes.ts).

5. Transpile the styles
bash
npm run build:styles

This generates the .css.ts files, which are gitignored. The build compiles only *.{base,common,shared,material,bootstrap,indigo,fluent}.scss files. It skips other names and does not warn.

6. Write the tests

src/components/[name]/[name].spec.ts:

ts
import { elementUpdated, expect, fixture, html } from '@open-wc/testing';
import { defineComponents } from '#internals/definitions/defineComponents.js';
import Igc[Name]Component from './[name].js';

describe('[Name]', () => {
  let element: Igc[Name]Component;

  before(() => {
    defineComponents(Igc[Name]Component);
  });

  beforeEach(async () => {
    element = await fixture<Igc[Name]Component>(html`<igc-[name]></igc-[name]>`);
  });

  it('passes the a11y audit', async () => {
    await expect(element).shadowDom.to.be.accessible();
    await expect(element).to.be.accessible();
  });

  it('is initialized with the proper default values', () => {
    expect(element.someProp).to.equal('default-value');
  });

  it('updates on property change', async () => {
    element.someProp = 'new-value';
    await elementUpdated(element);

    expect(element).to.have.attribute('some-prop', 'new-value');
  });
});

Use the shared helpers in #internals/testing/ for interaction and forms (see Testing). Do not import one component spec from another, because that runs the imported suite again.

Then fill in the ## Test scenarios section of the spec: one subsection per describe block, numbered contiguously. Name the shared runners that the suite uses. Put documented behavior that the suite does not test under ### Not covered by the suite.

7. Create the Storybook story

Create stories/[name].stories.ts. The filename must match the tag name. See Storybook for the full template.

ts
import type { Meta, StoryObj } from '@storybook/web-components-vite';
import { html } from 'lit';
import { defineComponents, Igc[Name]Component } from 'igniteui-webcomponents';

defineComponents(Igc[Name]Component);

// region default
const metadata: Meta<Igc[Name]Component> = {
  title: '[Name]',
  component: 'igc-[name]',
};

export default metadata;

type Story = StoryObj<Igc[Name]Component>;
// endregion

export const Basic: Story = {
  render: (args) => html`<igc-[name] .someProp=${args.someProp}>Content</igc-[name]>`,
};

Step 8 regenerates the // region default block. Write only the stories.

Show full SKILL.md (248 more words)Show less
8. Export and generate metadata

Add the export to src/index.ts in alphabetical order:

ts
export { default as Igc[Name]Component } from './components/[name]/[name].js';
bash
npm run cem        # custom-elements.json
npm run build:meta # the story's `// region default` block
9. Verify
bash
npm run check && npm run lint && npm run test

Add a CHANGELOG entry.

Validation Checklist

  • spec.md follows the splitter structure. Its API tables match the code and its test scenarios match the suite.
  • Single default export, with tagName, styles, register() and HTMLElementTagNameMap
  • addThemingController(this, all) in the constructor
  • JSDoc with @element, @slot, @csspart, @cssproperty and @event as applicable, and no igc- tag names in prose
  • Complete SCSS scaffold, with every theme file in themes.ts
  • The a11y audit covers the shadow DOM and the light DOM
  • The story is named after the tag and has the region fence
  • Exported from src/index.ts. cem and build:meta run.
  • check, lint and test pass. CHANGELOG updated.

Common Pitfalls

SymptomCause / Fix
Cannot resolve ./themes/*.css.jsbuild:styles did not run, or the .scss name is outside the build glob
Component ignores theme switchingaddThemingController is missing, or a file is missing from themes.ts
[part='base'] stops matchingpartMap emits multiple names. Use [part~='base'].
Story metadata is stale or never madeThe filename does not match the tag, the fence is missing, or the region was edited
npm run check fails on importsA relative import into internals/theming/animations
Spec anchors do not resolveA TOC entry is missing, or the slug is wrong (Undo / redo → undo--redo)

Reference Examples

KindPathShows
Specificationsrc/components/splitter/spec.mdThe reference spec structure
Displaysrc/components/badge/badge.tsTheming, slot controller, partMap, internals ARIA
Form-associatedsrc/components/input/input.tsForm mixin, validators, @coercedProperty, input-shell
Compositesrc/components/select/select.tsARIA projection, keybindings, popover
Containersrc/components/card/card.tsRegistering sub-components

© IgniteUI, 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 .agents/skills/create-new-component of IgniteUI/igniteui-webcomponents.

Open the folder on GitHubat commit a6f3e2c

Compare with similar skills

Create New Component 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.

Create New Component compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Create New Component this skillIgniteUI/igniteui-webcomponents170—~3kAutomated safety check: PassMIT
Scraps Reviewgetsentry/sentry46k—~1.2kAutomated safety check: NotesCustom licence
Readme I18nY80/bmm3442 repos~1.9kAutomated safety check: PassMIT
Uncodixfypdsuwwz/chatgpt-vue3-light-mvp5782 repos~3kAutomated safety check: PassMIT
Gimi IllustrationGiMi-Xiaomi/gimi-illustration-skill701—~1.7kAutomated safety check: PassMIT
Phoenix FrontendArize-ai/phoenix12k—~709Automated safety check: PassCustom licence

Similar skills

  • Scraps Review

    getsentry/sentry

    Official

    Filter large Sentry Scraps design-system migration PRs for review by separating mechanical import-path changes, generated baseline updates, snapshot mocks, and pure renames from substantive…

    46k GitHub stars~1.2k tokensUpdated today
    Frontend & DesignAuto-check: notes
  • A skill your agent uses when the user wants to translate a repository README, make a repo multilingual, localize docs, add a language switcher, internationalize the README, or update localized…

    344 GitHub starsUsed in 2 repos~1.9k tokens
    Frontend & DesignAuto-check passed
  • Uncodixfy

    pdsuwwz/chatgpt-vue3-light-mvp

    Prevents generic AI/Codex UI patterns when generating frontend code.

    578 GitHub starsUsed in 2 repos~3k tokens
    Frontend & DesignAuto-check passed
  • Gimi Illustration

    GiMi-Xiaomi/gimi-illustration-skill

    Multi-style illustrations from Chinese article text (配图 / illustration): quirky sketch, warm storybook, product proposal; OR custom IP enrollment (自定义 IP / 录入 IP / 上传形象 / 新建 IP).

    701 GitHub stars~1.7k tokensUpdated 2 mo ago
    Frontend & DesignAuto-check passed
  • Phoenix Frontend

    Arize-ai/phoenix

    Frontend development guidelines for the Phoenix AI observability platform.

    12k GitHub stars~709 tokensUpdated today
    Frontend & DesignAuto-check passed
  • Paper2html

    QuZhan51496/paper2anything

    Convert an academic paper PDF into a publish-ready, self-contained single-page project homepage (a self-contained index.html) — the kind of paper landing page researchers host on GitHub Pages.

    468 GitHub stars~3.3k tokensUpdated 2 mo ago
    Frontend & DesignAuto-check: notes

More from IgniteUI/igniteui-webcomponents

All 13 skills in this repo
  • Igniteui Wc Customize Component Theme

    IgniteUI/igniteui-webcomponents

    Theme and style Ignite UI Web Components (and igniteui-react) apps using CSS custom properties, optional Sass, and the igniteui-theming MCP server.

    170 GitHub stars~4.3k tokensUpdated today
    Auto-check passed
  • Igniteui Wc Generate From Image Design

    IgniteUI/igniteui-webcomponents

    Implement application views from design images (screenshots, mockups, wireframes) using Ignite UI Web Components, with the igniteui-cli and igniteui-theming MCP servers for component discovery…

    170 GitHub stars~4.6k tokensUpdated today
    Auto-check passed
  • Igniteui Wc Integrate With Framework

    IgniteUI/igniteui-webcomponents

    Install and integrate Ignite UI Web Components packages into React, Angular, Vue 3, LitElement, or vanilla JS/HTML apps, detecting the framework and applying framework-specific setup (package…

    170 GitHub stars~1.4k tokensUpdated today
    Auto-check passed
  • Add Component Property

    IgniteUI/igniteui-webcomponents

    Add a reactive property to an existing Lit web component with proper decorators, types, tests, specification updates, and documentation

    170 GitHub stars~1.9k tokensUpdated today
    Auto-check passed
  • Igniteui Wc Choose Components

    IgniteUI/igniteui-webcomponents

    Identify the right Ignite UI Web Components (igniteui-webcomponents, grids, charts, dock manager, React wrappers) for a UI requirement and point to official docs, examples, and API references.

    170 GitHub stars~4.6k tokensUpdated today
    Auto-check passed
  • Igniteui Wc Figma To App

    IgniteUI/igniteui-webcomponents

    Builds Ignite UI Web Components views from Figma designs, supporting Indigo.Design kits, third-party kits (Material 3, Fluent 2, shadcn/ui, Untitled UI, in-house), and plain frames.

    170 GitHub stars~7.2k tokensUpdated today
    Auto-check passed

Works with

Questions about Create New Component

What does Create New Component do?

Create a new Lit web component following project conventions, including specification, component class, styles, tests, Storybook story, and exports. Create New Component is an agent skill from IgniteUI/igniteui-webcomponents.

When should I use Create New Component?

Create New Component fits situations like: frontend & Design work in your project.

How do I install Create New Component in Claude Code?

Run `npx skills add IgniteUI/igniteui-webcomponents --skill create-new-component -a claude-code`. Or copy the skill folder (.agents/skills/create-new-component in IgniteUI/igniteui-webcomponents) into .claude/skills/create-new-component in your project. Claude Code loads it when a task matches its description.

How do I install Create New Component in Codex?

Run `npx skills add IgniteUI/igniteui-webcomponents --skill create-new-component -a codex`. Or copy the skill folder (.agents/skills/create-new-component in IgniteUI/igniteui-webcomponents) into .agents/skills/create-new-component in your project. Codex loads it when a task matches its description.

Can I use Create New Component 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 IgniteUI/igniteui-webcomponents --skill create-new-component -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/create-new-component, .gemini/skills/create-new-component, .github/skills/create-new-component and .opencode/skills/create-new-component in your project.

What does Create New Component need to run?

Going by SKILL.md and its folder, Create New Component needs the command-line tools its instructions call (npm).

Does Create New Component access the network?

SKILL.md contains no URLs. Its commands use npm, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Create New Component 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 Create New Component use?

Create New Component 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 Create New Component use?

About 3k tokens (SKILL.md is roughly 12k 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 Create New Component?

Skills that share tags, products or a category with Create New Component: Scraps Review (getsentry/sentry, 46k stars), Readme I18n (Y80/bmm, 344 stars), Uncodixfy (pdsuwwz/chatgpt-vue3-light-mvp, 578 stars) and Gimi Illustration (GiMi-Xiaomi/gimi-illustration-skill, 701 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Create New Component?

IgniteUI (a GitHub organization) maintains it in IgniteUI/igniteui-webcomponents, which has 170 GitHub stars. The repository holds 13 skills in this directory. The repository was last updated on October 7, 2026.

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