agentleFS
monegitmonegit/agent-skills/skills/create-component/SKILL.md

create-component

Skill0 starsChanged 4 months agoMITView on GitHub

Design, create, or refactor React components in this repository. Use when implementing component APIs, compound components, reusable component children, Tailwind CSS or tailwind-variants styles, component folders, props, or exports.

2 other projects use a version of this.

Adopted by

Most recently taken up by

  • Other versions2 projects use a version of this.

    Word for word · 0

    None found.

    Edited · 0

    None found.

    Wrote their own version · 2

    1. viknesh20-20/claude-code-tool-kit★ 7same name
    2. buildpad-ai/skills★ 1same name

    How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.

  • In this repository3 other files it gives its agents.

The file

We split this skill into the rules it gives an agent

11 rules. About 0 are common, 8 are distinctive, and 3 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈8

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 3

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Read the applicable AGENTS.md, package exports, and nearby components before choosing an API.

    line 10
  2. Distinctive:

    Use a simple component by default.

    line 11
  3. Distinctive:

    Create the component under its category and separate the root, reusable child renderers, JSX, styles, public types, state hooks, and pure …

    line 12
  4. Very specific:

    Put Tailwind classes in styles.ts.

    line 13
  5. Distinctive:

    Keep the public API typed, semantic, and accessible.

    line 14
  6. Distinctive:

    Prefer composition over boolean prop combinations that alter structure.

    line 19
  7. Distinctive:

    Keep one responsibility per file.

    line 21
  8. Very specific:

    Keep component function signatures light: accept props, then destructure it as const { ...

    line 23
  9. Distinctive:

    Keep application-specific state and data fetching outside shared UI components.

    line 25
  10. Distinctive:

    Do not introduce a compound API solely for visual grouping.

    line 26
  11. Very specific:

    Do not accept or forward className from a public component API.

    line 27

≈ “Common” is an estimate: at least 1 in 5 of the 213,895 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

Create Component

Workflow

  1. Read the applicable AGENTS.md, package exports, and nearby components before choosing an API.
  2. Use a simple component by default. Use a compound API only when related children need shared state, coordinated behavior, or a clearer semantic tree. Read references/compound-components.md first.
  3. Create the component under its category and separate the root, reusable child renderers, JSX, styles, public types, state hooks, and pure utilities by responsibility. Read references/architecture.md.
  4. Put Tailwind classes in styles.ts. Declare every supported visual style as an invariant class or a typed semantic variant; do not expose className as a styling escape hatch. Add cursor-pointer to every clickable control. For tailwind-variants, use the tailwind-variants-best-practice skill and read references/styling.md.
  5. Keep the public API typed, semantic, and accessible. Forward native element props deliberately; supply accessible labels for icon-only controls.
  6. Export the public component from its category and package barrels, then run the narrowest type and lint checks.

Guardrails

  • Prefer composition over boolean prop combinations that alter structure.
  • Name slots by responsibility (root, label, icon), not by HTML tag or incidental position.
  • Keep one responsibility per file. Extract a child only when it is independently reusable or materially simplifies its parent.
  • Define props for an extracted child in the parent component's types.ts; import that contract into the child instead of declaring it inside the child file.
  • Keep component function signatures light: accept props, then destructure it as const { ... } = props at the top of the function body.
  • Move state transitions and event handlers shared by the component tree into a dedicated hook; move pure calculations into a utility module.
  • Keep application-specific state and data fetching outside shared UI components.
  • Do not introduce a compound API solely for visual grouping.
  • Do not accept or forward className from a public component API. Omit it from native prop contracts and add a declared semantic variant when consumers need a supported visual difference.

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.