Create new Preact components following project conventions with proper file structure, TypeScript types, and Tailwind styling. Use when adding UI components, sections, or interactive elements to the site.
Create Preact components for agentconfig.org following project conventions.
Every component lives in its own folder under site/src/components/:
site/src/components/
└── {ComponentName}/
├── index.ts # Re-exports component and types
└── {ComponentName}.tsx # Main implementation
site/src/components/{ComponentName}/assets/component-template.tsxexport { ComponentName } from './ComponentName'
export type { ComponentNameProps } from './ComponentName'
See assets/component-template.tsx for the full template.
: ReactNodeinterface for props/** */any - Use proper types or unknownreadonly for array props// Good
interface ListProps {
/** Items to display in the list */
readonly items: readonly string[]
}
// Bad
type ListProps = {
items: string[];
}
cn() from @/lib/utils for conditional classesmd: and lg: for larger screens// Good - mobile first, theme aware
<div className="p-4 md:p-6 lg:p-8 bg-background text-foreground">
// Bad - desktop first
<div className="p-8 sm:p-4">
site/src/hooks/className prop for style overrideschildren for flexible contentinterface ButtonProps {
variant: 'primary' | 'secondary' | 'ghost'
className?: string
children?: ReactNode
}
on: onClick, onToggle, onSelectFunctioninterface Props {
// Good
onSelect: (id: string) => void
// Bad
onSelect: Function
}
button for buttons, nav for navigationaria-label, aria-expanded for interactive elementsfocus-visible: for focus rings<button
aria-expanded={isOpen}
aria-controls="menu-content"
className="focus-visible:ring-2 focus-visible:ring-primary"
>
Before considering the component complete:
index.tscn() for className mergingSearch for places (restaurants, cafes, etc.) via Google Places API proxy on localhost.
Interact with GitHub using the `gh` CLI. Use `gh issue`, `gh pr`, `gh run`, and `gh api` for issues, PRs, CI runs, and advanced queries.
Create or update AgentSkills. Use when designing, structuring, or packaging skills with scripts, references, and assets.
Start voice calls via the OpenClaw voice-call plugin.
Notion API for creating and managing pages, databases, and blocks.
Gemini CLI for one-shot Q&A, summaries, and generation.
Category:developer