authoring-components
Skill115 starsChanged 55 days agoApache-2.0View on GitHub
Guide for creating new Elements components with all required files, base classes, metadata patterns, and test boilerplate. Use this skill whenever the user wants to create, scaffold, or set up a new component from scratch, needs to understand the required 10-file structure, asks about base classes and mixins (LitElement vs ButtonFormControlMixin), define.ts vs index.ts patterns, static metadata, component registration, or sub-component parent relationships. Also trigger when the user mentions creating test boilerplate for all 5 test types.
In this repository46 other files it gives its agents.
- AGENTS.mdAGENTS.md
- projects/starters/angular/AGENTS.mdAGENTS.md
- projects/starters/bundles/AGENTS.mdAGENTS.md
- projects/starters/eleventy/AGENTS.mdAGENTS.md
- projects/starters/eleventy-ssr/AGENTS.mdAGENTS.md
- projects/starters/go/AGENTS.mdAGENTS.md
- projects/starters/go-htmx/AGENTS.mdAGENTS.md
- projects/starters/hugo/AGENTS.mdAGENTS.md
- projects/starters/importmaps/AGENTS.mdAGENTS.md
- projects/starters/lit-library/AGENTS.mdAGENTS.md
- projects/starters/mcp-app/AGENTS.mdAGENTS.md
- projects/starters/mpa/AGENTS.mdAGENTS.md
- projects/starters/nextjs/AGENTS.mdAGENTS.md
- projects/starters/nuxt/AGENTS.mdAGENTS.md
- projects/starters/react/AGENTS.mdAGENTS.md
- projects/starters/solidjs/AGENTS.mdAGENTS.md
- projects/starters/sphinx/AGENTS.mdAGENTS.md
- projects/starters/svelte/AGENTS.mdAGENTS.md
- projects/starters/typescript/AGENTS.mdAGENTS.md
- projects/starters/vue/AGENTS.mdAGENTS.md
- agent-availability-reportSkill
- agent-debug-ciSkill
- agent-dependenciesSkill
- agent-startersSkill
- agent-upkeepSkill
- agent-web-modernizationSkill
- audit-accessibilitySkill
- audit-ciSkill
- audit-codeSkill
- audit-consolidationSkill
- audit-simplificationSkill
- authoring-benchmarksSkill
- authoring-documentationSkill
- authoring-examplesSkill
- authoring-patternsSkill
- authoring-projectsSkill
- authoring-testsSkill
- authoring-typescriptSkill
- elementsSkill
- github-dependabotSkill
- guidance-api-designSkill
- guidance-buildSkill
- guidance-webgpu-performanceSkill
- summarize-releasesSkill
- summarize-video-releasesSkill
- troubleshootingSkill
The file
We split this skill into the rules it gives an agent
5 rules. About 0 are common, 2 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 21
Read the component creation guide to get critical context for component creation guidance.
- Distinctive: line 26
Study a reference: read the closest reference component listed below to understand the pattern in practice.
- Very specific: line 39
Add only import '@nvidia-elements/core/<component-name>/define.js' to projects/core/src/bundle.ts in alphabetical order.
- Very specific: line 40
Add the definition import to the js-modules list in projects/core/src/index.test.lighthouse.ts so the combined direct-import benchmark …
- Very specific: line 41
Measure payloads: run mise exec -- pnpm run test:lighthouse from projects/core.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Authoring Components
You MUST review the component creation guideline before creating or modifying components.
When to Use This Skill
- Creating a new component from scratch
- Understanding the required file structure for components
- Setting up test boilerplate for all 5 test types
- Choosing the appropriate base class or mixin (ButtonFormControlMixin vs LitElement)
- Understanding component metadata and registration patterns
- Setting up JSDoc comments for components
Must Read File
Read the component creation guide to get critical context for component creation guidance.
Workflow
- Gather requirements: confirm the component name (kebab-case), purpose, and whether to use
LitElementdirectly or applyButtonFormControlMixinfor button-like interactive components. - Study a reference: read the closest reference component listed below to understand the pattern in practice.
- Create the 10 required files in
projects/core/src/<component-name>/:component-name.ts:component class with metadata, JSDoc, and render methodcomponent-name.css:styles using CSS custom propertiescomponent-name.examples.ts:example templates with@summaryJSDoccomponent-name.test.ts:unit testscomponent-name.test.axe.ts:accessibility testscomponent-name.test.visual.ts:visual regression testscomponent-name.test.ssr.ts:SSR testscomponent-name.test.lighthouse.ts:lighthouse testsdefine.ts:registration usingdefine()helper withHTMLElementTagNameMapindex.ts:side-effect-free export
- Update shared entry points:
- Add only
import '@nvidia-elements/core/<component-name>/define.js'toprojects/core/src/bundle.tsin alphabetical order. Keep this registration bundle import-only. Export the public API from the componentindex.tsand expose its entry point through the packageexportsmap. - Add the definition import to the
js-moduleslist inprojects/core/src/index.test.lighthouse.tsso the combined direct-import benchmark measures the component.
- Add only
- Measure payloads: run
mise exec -- pnpm run test:lighthousefromprojects/core. Increase a bundle-size limit only when the measured payload exceeds the current limit. - Verify: confirm all files follow the templates in the component creation guide, then run
mise exec -- pnpm run lintandmise exec -- pnpm run testfromprojects/core.
References
- Component Creation Guide - Complete component creation workflow
- TypeScript Guidelines - Type safety patterns
- Examples Guidelines - Example file structure
- Testing Guidelines - Testing strategy
- API Design - Properties - Property design patterns
- API Design - Styles - CSS custom properties
Reference Components
/projects/core/src/button/- ButtonFormControlMixin pattern example/projects/core/src/badge/- LitElement pattern example/projects/core/src/card/- Composition with slots example
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
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.

