Agent skill
component
Create React components following Darkroom standards. Use when: - User says "create component", "new component", "add component" - User wants to build a UI element, widget, or reusable piece - User mentions a component name like "Button", "Header", "Card"
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/other/other/component-darkroomengineering-cc-settings
SKILL.md
Create Darkroom Component
Create a React component following Darkroom conventions.
Structure
components/<name>/
├── index.tsx # Component implementation
└── <name>.module.css # Component styles
Template
index.tsx
// 'use client' - Only add if component needs:
// - useState, useEffect, or other hooks
// - Event handlers (onClick, onChange, etc.)
// - Browser APIs (window, document, etc.)
import s from './<name>.module.css'
interface <Name>Props {
children?: React.ReactNode
className?: string
}
export function <Name>({ children, className }: <Name>Props) {
return (
<div className={`${s.<name>} ${className ?? ''}`}>
{children}
</div>
)
}
.module.css
.<name> {
/* Component styles */
}
Before You Start
If this component wraps or uses an external library (Radix, Framer Motion, GSAP, etc.):
- Fetch docs first — run
/docs <library>to get current API via context7 - Check version — run
bun info <package>before installing
Never implement against external library APIs from memory.
Conventions
- Server Component by default - Only add
'use client'if needed - CSS Module as
s- Always import assfor consistency - Props interface - Define explicitly, include
classNamefor composition - Named export - Use
export function, notexport default - Image wrapper - Use
import { Image } from '@/components/image' - Link wrapper - Use
import { Link } from '@/components/link'
Arguments
$ARGUMENTS- Component name (e.g., "Button", "Header")--clientflag - Force client component
Example
User: "create a Button component"
→ Creates components/button/index.tsx and button.module.css
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?