Agent skill Frontend
Web Component Design
Build or refine reusable components for a web interface.
Install the skill
Run the command from your project root with Node.js and npm.
npx skills@latest add https://github.com/wshobson/agents/tree/main/plugins/ui-design/skills/web-component-design --skill web-component-design --agent claude-code --yesCheck this file in your project.claude/skills/web-component-design/SKILL.md
Other ways to install
Choose an assistant interactively
npx skills@latest add https://github.com/wshobson/agents/tree/main/plugins/ui-design/skills/web-component-design --skill web-component-designSelect your assistant and choose the project installation scope.
Official instructions
The tested Skills CLI 1.10.0 requires Node.js 22.20 or later. Bring a coding assistant with project access, a local preview, test data and the tools needed for the exercise.
View operation manualWhat this skill helps with
- Build or refine reusable components for a web interface.
Good for
- Component implementation
- Exercise
- Refactor a dashboard panel into a composable component
- Inputs
- Two existing call sites, public props and supported component states
- Acceptance
- Mount each caller and check named slots, empty content, long titles and keyboard access. Confirm existing component state and tokens still reach the right DOM.
- Skill name
web-component-design- Repository
wshobson/agents
Give the assistant a target, conditions and an acceptance action
Open-ended request
Review the whole website and fix anything you see.
The prompt does not define a target, test conditions or a verifiable outcome.
A scoped pilot
- Refactor a dashboard panel into a composable component
- Two existing call sites, public props and supported component states
Web Component Design operation manual
Refactor a dashboard panel into a composable component
Two existing call sites, public props and supported component states
Confirm the surface and scope
Two existing call sites, public props and supported component states
Prompt · Step 1Use wshobson’s web-component-design and read the installed SKILL.md. Scope the work to [Target project and local route]. Review [Panel component] and its two call sites. Identify shared roles, slots and current props. Choose the publisher’s composition pattern that fits the actual project framework.Follow the installed workflow
Refactor a dashboard panel into a composable component
Prompt · Step 2Use wshobson’s web-component-design and read the installed SKILL.md. Scope the work to [Target project and local route]. Propose a small [Panel] API, then apply the approved version to the two call sites. Preserve state and semantics. Use explicit components or slots for the pieces that vary and keep unrelated behavior in place.Validate with reproducible steps
Mount each caller and check named slots, empty content, long titles and keyboard access. Confirm existing component state and tokens still reach the right DOM.
Prompt · Step 3Use wshobson’s web-component-design and read the installed SKILL.md. Scope the work to [Target project and local route]. Mount each caller and check named slots, empty content, long titles and keyboard access. Confirm existing component state and tokens still reach the right DOM.
Look up a specific workflow question
Tie each result to an actual surface, interaction, or source location.
Identify the right inputsSKILL.md
- Command or reference
Refactor a dashboard panel into a composable component- Examples
- Two existing call sites, public props and supported component states
Check real evidenceVerify
- Command or reference
Refactor a dashboard panel into a composable component- Examples
- Mount each caller and check named slots, empty content, long titles and keyboard access. Confirm existing component state and tokens still reach the right DOM.
Troubleshooting and FAQ
What can I do with source access alone?
Review the implementation, cite evidence and list the required environment. Leave interaction claims pending where you cannot run them.
How do I confirm the task is complete?
Mount each caller and check named slots, empty content, long titles and keyboard access. Confirm existing component state and tokens still reach the right DOM.