bitovi/ai-enablement-prompts/create-react-modlet
Claude Code and agent skill by bitovi/ai-enablement-prompts
- community
- ext:[{"type":"hook","description":"Pre/post lifecycle hooks"},{"type":"context","description":"Custom context provider definitions"}]
Checking that the SKILL.md file is still in the repository.
Create React components, hooks, or utilities following the modlet pattern. Use when creating any component in packages/client/src/components/. Modlets are self-contained folders with index.ts, implementation, tests, stories (for visual), and optional types.
Install
npx vskill@latest install bitovi/ai-enablement-prompts/create-react-modletSemi-extensibleMentions customization, but needs skill-specific knowledge. Read the extensible skills standard
SKILL.md
Skill: Creating React Modlets
This skill teaches how to create React components, hooks, and utilities following the modlet pattern in this project.
What Is a Modlet?
A modlet is a self-contained folder that houses everything related to a specific module. Each modlet includes its implementation, tests, stories (for visual components), and types—all in one place.
When to Use This Skill
Use this skill when:
- Creating any new React component
- Creating a custom hook
- Creating a utility/helper function
- Breaking down a complex component into sub-components
Modlet Locations
Components are organized in packages/client/src/components/:
Naming Conventions
- PascalCase for component folders:
EditableTitle/,Header/,Button/ - kebab-case for grouping folders:
inline-edit/,common/ - lowercase for standard folders:
components/,hooks/,helpers/
Modlet Types
Visual Modlet (React Component)
Non-Visual Modlet (Hook/Utility)
Core Rules
- Folder naming: Name the modlet folder after its main export (e.g.,
/ButtonexportsButton) - index.ts only re-exports: Never define logic in
index.ts, only re-export from within the modlet - Tests are mandatory: Every modlet must have tests in
<modlet-name>.test.tsx - Stories for visual modlets: All visual components must have Storybook stories
- Sub-organization: Additional components go in
/componentssubfolder, hooks in/hooks, helpers in/helpers- each as its own modlet
Creation Process
Step 1: Plan with Todos
Use manage_todo_list to track progress:
Step 2: Create Files
index.ts (Required)
ComponentName.tsx (Required)
ComponentName.test.tsx (Required)
ComponentName.stories.tsx (Required for Visual)
types.ts (Optional)
Step 3: Verify
Run these commands from the project root:
Project-Specific Patterns
Import Aliases
Use the @/ alias for imports:
Shadcn UI Components
Reuse components from @/components/ui/:
Tailwind CSS
Use Tailwind classes for styling. Use cn() for conditional classes:
Story Decorators
When components need context providers:
Sub-Modlet Organization
For complex components with internal sub-components:
Quality Checklist
Before completing any modlet:
- [ ] Folder name matches main export
- [ ]
index.tsexists and only contains re-exports - [ ] Main module file exists
- [ ] Test file exists and passes (
npm run test) - [ ] (Visual only) Story file exists
- [ ] Types file exists if custom types are defined
- [ ] Sub-folders follow modlet structure
- [ ]
npm run typecheckpasses - [ ] Modlet can be imported from its
index.ts
Common Mistakes to Avoid
- ❌ Missing
index.tsfile - ❌ Defining logic directly in
index.tsinstead of re-exporting - ❌ Skipping tests
- ❌ Missing Storybook stories for visual components
- ❌ Not verifying tests pass after creation
- ❌ Folder name doesn't match main export name
Existing Examples
Reference these existing modlets for patterns:
Full modlet with types:
components/Header/- Has index.ts, component, test, story, types
Modlet in grouping folder:
components/inline-edit/EditableText/- Inline edit component
Common component:
components/common/ConfirmationDialog/- Dialog component in common folder
Testing Notes
This project uses:
- Vitest for test runner
- @testing-library/react for component testing
- @testing-library/user-event for user interaction testing
- @testing-library/jest-dom for DOM matchers
Tests are configured via vitest.config.ts with jsdom environment.
Security
- Security scanPassed, 100 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 repositoryCheckingfigma/create-react-modlet/SKILL.md
Popularity
- Repository stars
- 120
- Repository forks
- 63
- 7-day trend score
- 24
Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 3 Aug 2026, 3 months ago.
Extension points
hookPre/post lifecycle hookscontextCustom context provider definitions
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/bitovi/ai-enablement-prompts/create-react-modlet)