agentleFS
srikanth-manivannansrikanth-manivannan/claude-agent-factory/skills/frontend/component-scaffold/SKILL.md

component-scaffold

Skill1 starsChanged 5 months agoMITView on GitHub

Use this to scaffold an accessible, tested UI component with markup, state, and tests.

The file

We split this skill into the rules it gives an agent

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

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Scaffold semantic, accessible markup: Use native semantic elements.

    line 49
  2. Very specific:

    Generate tests: Use testing/unit-test-generator to cover render, props, interaction, and the empty/error states (happy/edge/failure).

    line 55

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “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

Component Scaffold

Use this to scaffold an accessible, tested UI component with markup, state, and tests.

Tech profile — Technology: UI component · Language: any · Stack: any component framework · Toolchain: any · Domain: frontend (Framework-agnostic method; adapts to the project's component framework.)

When to use this skill

  • Creating a new UI component (input, card, modal, etc.).
  • Standardizing component structure (markup + state + tests + a11y) across a UI.
  • Starting the UI portion of the build-feature workflow.

When NOT to use this skill

  • Auditing accessibility of existing UI — use accessibility/a11y-auditor.
  • App-wide state architecture — use frontend/state-management-advisor.
  • Page layout — use frontend/responsive-layout-helper.

Prerequisites

  • The component's purpose, its props/inputs, and the project's framework.

Inputs

InputRequiredDescription
componentyesWhat the component is + its behavior
propsnoInputs/props and their types
frameworknoComponent framework; inferred from project if omitted

Instructions

  1. Define the component contract. Props/inputs, events/outputs, states (loading, empty, error), and visual variants.
  2. Detect framework + conventions. Match the project's component patterns, file layout, and styling approach; don't introduce a new framework.
  3. Scaffold semantic, accessible markup. Use native semantic elements; ensure keyboard operability and labels by construction (/standards/accessibility.md). Defer a full audit to accessibility/a11y-auditor.
  4. Implement state + behavior per the contract; keep the component focused and composable.
  5. Generate tests. Use testing/unit-test-generator to cover render, props, interaction, and the empty/error states (happy/edge/failure).
  6. Add a usage example/story demonstrating the variants.
  7. Document props and usage in a short component README/section.

Output

A component in the project's framework: semantic accessible markup, typed props, state handling for key states, an interaction/render test suite (via the testing primitive), a usage example, and prop documentation.

Constraints & safety

  • Accessible by construction — keyboard + semantics from the start (AA baseline).
  • Tested — no component without render + interaction tests.
  • Framework-consistent — match existing conventions, don't impose new ones.

Examples

Minimal below; full examples in EXAMPLES.md.

Given: a SearchInput component with value, onChange, and a loading state. Produces: semantic labeled input + clear button, state handling, tests for typing / clearing / loading, and a usage example.

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.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

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.