agentleFS
EndavaEndava/BEEQ/.agents/skills/create-component/SKILL.md

create-component

Skill162 starsChanged 11 days agoApache-2.0View on GitHub

Scaffold a new BEEQ `bq-*` StencilJS component with `pnpm g`, then implement the TSX, types, SCSS and JSDoc. Use when creating a component from scratch or resuming an in-progress scaffold. For tests, stories or docs use the write-* and doc-component skills.

12 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

12 rules. 0 are common, 8 are distinctive, and 4 are very specific to this project.

  • 0

    Common

    Most of the 11 edited versions we read keep these.

  • 8

    Distinctive

    This author's own choices. Worth a look.

  • 4

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Read the instruction files for this task:

    line 19
  2. Distinctive:

    Follow the section order, naming and prop rules in the components instructions.

    line 41
  3. Very specific:

    Only when the component has typed props.

    line 45
  4. Distinctive:

    Use the JSDoc template in the components instructions.

    line 54
  5. Very specific:

    Import variables file: @import './bq-<name>.variables'

    line 58
  6. Distinctive:

    Use native SCSS/CSS.

    line 59
  7. Very specific:

    Use BEEQ semantic classes only where stable styling hooks are needed, e.g.

    line 61
  8. Distinctive:

    Use CSS logical properties for layout, sizing, spacing, positioning, borders, and radii.

    line 62
  9. Distinctive:

    Use shared SCSS mixins for repeated focus, hover, and active patterns.

    line 63
  10. Very specific:

    Keep SCSS nesting depth at 2 or less.

    line 64
  11. Distinctive:

    Should it support any size, appearance, or variant props?

    line 75
  12. Distinctive:

    Verify that the build passes without errors:

    line 81

“Common” is measured: kept by at least 6 in 10 of the 11 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Create a BEEQ Component

When to Use

  • Adding a new bq-* web component to the design system
  • Scaffolding all required files for a component from scratch
  • Resuming work on an in-progress component scaffold

Before You Start

  1. Read the instruction files for this task:
    • Components instructions
    • Styles instructions
    • Accessibility instructions
  2. Pick a similar existing component as a reference:
    • Simple / display: packages/beeq/src/components/badge/bq-badge.tsx
    • Interactive with events: packages/beeq/src/components/button/bq-button.tsx
    • Form-associated: packages/beeq/src/components/checkbox/bq-checkbox.tsx
    • Compound (host + item): packages/beeq/src/components/accordion/ + accordion-group/

Procedure

1. Run the Plop generator

pnpm g

Answer the prompts: component name (no bq- prefix), whether to add styling, style variables, and Storybook files. This creates the scaffolded files. Then update the generated e2e.ts extension to .e2e.tsx.

2. Implement the component (bq-<name>.tsx)

Follow the section order, naming and prop rules in the components instructions. Do not reorder sections.

3. Create the types file (bq-<name>.types.ts)

Only when the component has typed props. Export type aliases and const arrays so the component (@Watch validators) and Storybook can share them:

export type TMyComponentSize = 'small' | 'medium' | 'large';
export const MY_COMPONENT_SIZE = ['small', 'medium', 'large'] as const;

4. Write the component-level JSDoc block

Use the JSDoc template in the components instructions. List every prop, event, method, slot, part and CSS custom property.

5. Style the component (scss/bq-<name>.scss)

  • Import variables file: @import './bq-<name>.variables'
  • Use native SCSS/CSS.
  • Define CSS custom properties (e.g. --bq-name--border-radius) in bq-<name>.variables.scss
  • Use BEEQ semantic classes only where stable styling hooks are needed, e.g. .bq-name and .bq-name__content.
  • Use CSS logical properties for layout, sizing, spacing, positioning, borders, and radii.
  • Use shared SCSS mixins for repeated focus, hover, and active patterns.
  • Keep SCSS nesting depth at 2 or less.

6. After all files are created and implemented, ask the user:

Ask the user:

  • What public props does this component need, and which are required?
  • Does it need form association (formAssociated: true)?
  • What events should it emit, and what detail payloads do they carry?
  • What named slots does it expose beyond the default?
  • What are the accessibility requirements — role, ARIA attributes, keyboard interactions?
  • Should it support any size, appearance, or variant props?

Then run review-component on the new component to confirm everything is in order.

7. Verify the scaffold

Verify that the build passes without errors:

pnpm exec nx run beeq:build

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.