param087/saas-ui-skills/component-architecture
Claude Code and agent skill by param087/saas-ui-skills
- community
Checking that the SKILL.md file is still in the repository.
Use when structuring React components in a SaaS app — composing shadcn/ui, cva variants, compound components, controlled vs uncontrolled state, and knowing when to abstract versus inline.
Install
npx vskill@latest install param087/saas-ui-skills/component-architectureSKILL.md
The same SKILL.md was published earlier as param087/saas-ui-skills/component-architecture.
Component Architecture
Overview
shadcn/ui gives you owned components (copied into your repo, not imported from a package). That means architecture is your job: build a thin layer of app-specific components on top of the primitives, use cva for variants, and resist abstracting until a pattern repeats. Good structure keeps a SaaS UI consistent without a maze of props.
When to use
- Deciding how to structure or compose UI components.
- A component has grown a dozen boolean props.
- You're copy-pasting the same markup across pages.
Variants with cva, not boolean soup
One variant prop scales better than isSuccess, isError, isMuted booleans that can contradict each other.
Compound components for related parts
Expose structure, not a config object, when parts vary:
This beats <Card title="…" description="…" footer={<Button/>} /> — consumers compose freely.
asChild to compose without wrapper soup
Radix's asChild merges props onto your element instead of rendering an extra node — great for making a link look like a button:
Controlled vs uncontrolled
- Uncontrolled (component owns state) by default — simpler, less re-render.
- Controlled only when the parent needs the value (e.g. a filter that syncs to the URL). Support both like Radix: optional
value+onValueChange, with internal fallback state.
When to abstract
Follow the rule of three: inline the markup the first two times; extract a component on the third repetition, when the shared shape is clear. Premature abstractions calcify the wrong API.
File structure
Pitfalls
- Boolean prop explosion instead of a
variantenum. - Mega-components taking a
configobject — prefer composition/children. - Abstracting too early — one usage is not a pattern.
- Editing shadcn primitives in place for app logic — wrap them instead, keep
ui/upgradeable. - `cn()` not used — conditional class strings collide instead of merging.
Hand-off
A clean component layer that forms-and-validation, data-tables, and the SaaS-flow skills build their screens from.
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/component-architecture/SKILL.md
Popularity
- Repository stars
- 3
- 7-day trend score
- 7
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/param087/saas-ui-skills/component-architecture)