guidance-api-design
Skill115 starsChanged 55 days agoApache-2.0View on GitHub
Component API design patterns following Elements conventions for properties, attributes, CSS custom properties, slots, and events. Use this skill whenever the user is designing or deciding on a component API, choosing between properties vs attributes vs slots, naming CSS custom properties, designing events, avoiding impossible states, deciding whether to reflect to an attribute, using CSS Parts, implementing the DataElement interface, or applying the internal-host pattern. Also trigger when the user asks about shorthand vs granular CSS properties or event naming conventions.
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-componentsSkill
- authoring-documentationSkill
- authoring-examplesSkill
- authoring-patternsSkill
- authoring-projectsSkill
- authoring-testsSkill
- authoring-typescriptSkill
- elementsSkill
- github-dependabotSkill
- guidance-buildSkill
- guidance-webgpu-performanceSkill
- summarize-releasesSkill
- summarize-video-releasesSkill
- troubleshootingSkill
The file
We split this skill into the rules it gives an agent
8 rules. About 0 are common, 8 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈8
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 22
When creating new components or features that may contain user state review the Stateless Components Guidelines.
- Distinctive: line 26
When working with JavaScript properties and HTML attributes review the Properties & Attributes Guidelines.
- Distinctive: line 30
When working with CSS, CSS Custom Properties or Design Tokens review the Styles & CSS Custom Properties Guidelines.
- Distinctive: line 34
When creating a new API or determining API design of parent child relationships between components review the Component Composition …
- Distinctive: line 38
When working with user provided content or container-like components review the Slots Guidelines.
- Distinctive: line 42
When creating new events or listening to existing event review the Custom Events Guidelines.
- Distinctive: line 46
When creating new components or using components as dependencies review the Component Registration Guidelines.
- Distinctive: line 50
When creating a new component or package review the Packaging & Exports Guidelines.
≈ “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
Guidance API Design
You MUST review the relevant API design guidelines before designing or modifying component APIs.
When to Use This Skill
- Designing properties and attributes for new components
- Creating CSS custom properties for theming
- Avoiding impossible states in component APIs
- Choosing between properties, attributes, and slots
- Designing custom events
- Planning component composition patterns
- Setting up package exports and dependencies
Stateless Components
When creating new components or features that may contain user state review the Stateless Components Guidelines.
Properties vs Attributes
When working with JavaScript properties and HTML attributes review the Properties & Attributes Guidelines.
Styles & CSS Custom Properties
When working with CSS, CSS Custom Properties or Design Tokens review the Styles & CSS Custom Properties Guidelines.
Component Composition
When creating a new API or determining API design of parent child relationships between components review the Component Composition Guidelines.
Slots
When working with user provided content or container-like components review the Slots Guidelines.
Custom Events
When creating new events or listening to existing event review the Custom Events Guidelines.
Component Registration
When creating new components or using components as dependencies review the Component Registration Guidelines.
Packaging & Exports
When creating a new component or package review the Packaging & Exports Guidelines.
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.

