From Darkroom Engineering
Creates React components following Darkroom conventions, auto-detecting Next.js (satus) vs React Router (novus) stacks, generating component files, CSS modules, and props interfaces.
How this skill is triggered — by the user, by Claude, or both
Slash command
/darkroom:component [ComponentName][ComponentName]The summary Claude sees in its skill listing — used to decide when to auto-load this skill
Create a React component following Darkroom conventions. **Detect the stack first** — satus (Next.js) and novus (React Router) have different conventions for client/server boundaries, image/link wrappers, and path aliases.
Create a React component following Darkroom conventions. Detect the stack first — satus (Next.js) and novus (React Router) have different conventions for client/server boundaries, image/link wrappers, and path aliases.
Read package.json:
dependencies.next present → Next.js / satus conventionsdependencies["react-router"] or devDependencies["@react-router/dev"] → React Router / novus conventions| Stack | Component path | CSS module path | Image wrapper | Link wrapper | Path alias |
|---|---|---|---|---|---|
| satus (Next.js) | components/<name>/index.tsx | components/<name>/<name>.module.css | import { Image } from '@/components/image' | import { Link } from '@/components/link' | @/ |
| novus (React Router) | components/<name>/index.tsx | components/<name>/<name>.module.css | Native <img> (or project's wrapper if it exists) | import { Link } from 'react-router' | ~/ |
// components/<name>/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>
)
}
// components/<name>/index.tsx
// React Router components are isomorphic — no directive needed.
// They run on server during SSR and on client after hydration.
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>
)
}
.<name> {
/* Component styles */
}
If this component wraps or uses an external library (Radix, Framer Motion, GSAP, etc.):
mcp__context7__resolve-library-id → get-library-docs) for the current API.bun info <package> before installing.Never implement against external library APIs from memory.
s — always import as s for consistency.className for composition.export function, not export default.'use client' if needed.import { Image } from '@/components/image'.import { Link } from '@/components/link'.'use client' directive.~/, not @/.import { Link } from 'react-router' (declarative routing).<img> with explicit width/height/fetchPriority. No project-level wrapper unless the project added one.$ARGUMENTS — Component name (e.g., "Button", "Header")--client flag (Next.js only) — Force client componentUser: "create a Button component"
→ detect stack → satus → creates components/button/index.tsx + button.module.css with @/-aliased imports
User: "create a Button component" (in novus repo)
→ detect stack → novus → creates same files but with ~/-aliased imports and no 'use client' directive
npx claudepluginhub darkroomengineering/cc-settings --plugin darkroomGenerates React/Vue components with TypeScript, tests, CSS modules, barrel exports, and project-pattern validation. Detects Next.js App Router and adjusts output accordingly.
Builds token-driven React components with TypeScript and modern patterns. Use when creating React component libraries, integrating CSS custom properties, or building Next.js design system components with forwardRef and composition.
Writes modern React components using TypeScript, hooks, Tailwind CSS, and best practices. Generates functional components, custom hooks, and composition patterns for performant UIs.