agentleFS
buildpad-aibuildpad-ai/skills/create-component/SKILL.md

create-component

Skill1 starsChanged 27 days agoMITView on GitHub

Generate a React component following DaaS platform patterns. Performs mandatory Buildpad-first check before creating any custom component. Use when the user needs a new React component, page section, or UI element for a DaaS application.

12 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

7 rules. 0 are common, 2 are distinctive, and 5 are very specific to this project.

  • 0

    Common

    Most of the 11 edited versions we read keep these.

  • 2

    Distinctive

    This author's own choices. Worth a look.

  • 5

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Before creating ANY component, verify it's not already in Buildpad (40+ components):

    line 15
  2. Very specific:

    When creating a page or module that displays collection records in a list/table, you MUST use CollectionList.

    line 38
  3. Very specific:

    When creating form pages that use VForm, you MUST follow the controlled component pattern.

    line 45
  4. Very specific:

    Import Buildpad components from @/components/ui/

    line 64
  5. Very specific:

    Import hooks from @/lib/buildpad/hooks

    line 65
  6. Very specific:

    Import types from @/lib/buildpad/types

    line 66
  7. Distinctive:

    After generating the component, run the Buildpad-First violation check:

    line 80

“Common” is measured: kept by at least 6 in 10 of the 11 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Create React Component

Generate a React component following DaaS platform patterns.

BEFORE generating ANY .tsx files, you MUST read_file the Buildpad component reference at .github/skills/buildpad-reference/SKILL.md. This loads the full 40+ component catalog with import paths and usage patterns. Skipping this step leads to raw Mantine usage violations.

STOP: Buildpad-First Check (MANDATORY)

Before creating ANY component, verify it's not already in Buildpad (40+ components):

Component TypeBuildpad Alternative
Text inputInput, Textarea, InputCode
Rich text editorRichTextHtml, RichTextMarkdown, InputBlockEditor
Select/DropdownSelectDropdown, SelectRadio
Multi-selectSelectMultipleDropdown, SelectMultipleCheckbox, Tags
Toggle/SwitchToggle, Boolean
Date pickerDateTime
File uploadFileInterface, FileImage, Files, Upload
Color pickerColor
Relation pickerListM2O, ListM2M, ListO2M, ListM2A
Dynamic formVForm, CollectionForm
List/TableCollectionList (search, filter, permissions, pagination)
FilteringFilterPanel (DaaS-compatible filter builder)
Workflow buttonsWorkflowButton
Layout elementsDivider, Notice, GroupDetail

If Buildpad has it → Use /add-buildpad skill instead. Do NOT proceed with custom creation.

CollectionList Usage (MANDATORY for any record listing)

When creating a page or module that displays collection records in a list/table, you MUST use CollectionList. CollectionList provides: search, integrated FilterPanel toggle with badge, permission-gated create button, bulk actions with requiredPermission gating, pagination (25/50/100/250), and column management. See create-collection skill for the full-featured code pattern.

VForm Usage (CRITICAL)

When creating form pages that use VForm, you MUST follow the controlled component pattern. See the create-feature skill's VForm usage reference.

VForm has NO onSubmit prop. Pass modelValue + onUpdate and handle submission externally.

Allowed Custom Components

  • App-specific navigation, sidebars, headers
  • Custom dashboards and data visualizations
  • Composite components combining multiple Buildpad components
  • Specialized displays not covered by Buildpad

Component Standards

  • TypeScript strict mode with proper interfaces
  • JSDoc documentation on exported functions
  • 'use client' directive for client components
  • 'use client' is REQUIRED for ANY component that uses Mantine — Mantine compound components (Table.Tbody, Table.Tr, Modal, Tabs.Panel, etc.) resolve to undefined in React Server Components and crash at runtime (Bug 10). When data fetching is needed in a server component, fetch server-side and pass data as props to a 'use client' child component.
  • Mantine layout components (Stack, Group, Button, Modal, Table) are fine to use directly
  • Import Buildpad components from @/components/ui/
  • Import hooks from @/lib/buildpad/hooks
  • Import types from @/lib/buildpad/types

Required Tests

Create tests/components/[name].spec.ts with:

  • Component renders without errors
  • Displays expected content
  • User interactions work (click, type, submit)
  • Form validation (if applicable)
  • Loading/error/empty states display correctly

Post-Generation Validation (MANDATORY)

After generating the component, run the Buildpad-First violation check:

# Scan generated files for forbidden raw Mantine form/input imports
grep -rn "from '@mantine/form'\|from '@mantine/dates'\|from '@mantine/dropzone'\|<TextInput\|<NumberInput\|<Select \|<Switch \|<Checkbox \|<DatePicker\|<Dropzone" app/ components/ 2>/dev/null

If any matches are found, replace them with Buildpad equivalents before proceeding.

Quick fix reference:

ViolationReplace With
<TextInput> / <Textarea>Input / Textarea from @/components/ui
<Select>SelectDropdown from @/components/ui
<DatePicker>DateTime from @/components/ui
<Switch> / <Checkbox>Toggle / Boolean / SelectMultipleCheckbox
<Dropzone>Upload / Files from @/components/ui
useForm (@mantine/form)VForm or CollectionForm from @/components/ui
Custom <Table> for recordsCollectionList from @/components/ui

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

Reviews can't be read right now.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.