agentleFS
TarasTsavolykTarasTsavolyk/claude-code-frontend/.claude/skills/scaffold-component/SKILL.md

scaffold-component

Skill1 starsChanged 4 months agoMITView on GitHub

Create a new Vue 3 component the project's way — props/emits contracts (typed in TS), correct placement, styling with tokens, a11y baseline, and a unit test. Use when adding a new component or UI element.

1 other project uses a version of this.

Adopted by

Most recently taken up by

  • Other versions1 project uses a version of this.

    Word for word · 0

    None found.

    Edited · 0

    None found.

    Wrote their own version · 1

    1. ea-toolkit/architecture-catalog★ 38same 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 repository6 other files it gives its agents.

The file

We split this skill into the rules it gives an agent

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

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    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:

    Decide placement: Put it where your layout keeps components — src/components/ (layer-first), a feature's components/ (feature-first), or a …

    line 12
  2. Distinctive:

    Keep it presentational: state in, events out.

    line 15
  3. Distinctive:

    Export: if it's a shared component (barrel/index per project convention).

    line 20
  4. Very specific:

    Keep it focused: split on a decomposition signal — ≥3 responsibilities, prop/boolean explosion, deep template nesting, logic dwarfing the …

    line 22

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

Scaffold a component

Read the rules first, don't scaffold from memory. Path-scoped rules fire when you read a matching file, so a create-first pass can run with none of them loaded. Open architecture.md, styling.md, and accessibility.md before step 2, and testing.md before step 5.

  1. Decide placement. Put it where your layout keeps components — src/components/ (layer-first), a feature's components/ (feature-first), or a shared components/ if it's reused widely. Confirm a similar component doesn't already exist (search first; reuse beats rebuild).
  2. Create <Name>.vue with <script setup> (add lang="ts" in TS projects):
    • TS: define a Props type and defineProps<Props>(), defaults via reactive props destructure; type emits with defineEmits<{ ... }>(). JS: use runtime validators — defineProps({ ... }) with type/required/default/validator — and defineEmits([...]). (Full form in code-style.md → Vue SFC.)
    • Keep it presentational: state in, events out. No data fetching here.
  3. Template — semantic native elements; labels for any control; keyboard-operable; visible focus. Style with the project's design tokens — no magic values (Tailwind utilities by default; Sass variables or var(--token) custom properties otherwise).
  4. Logic — if there's non-trivial logic, extract a useX composable instead of inlining it.
  5. Test — add <Name>.test.ts (.test.js in JS projects): render with props, assert visible output and emitted events, cover an edge/error state. Query by role/label/text (see testing.md).
  6. Verify — <pm> run lint && <pm> run test (add <pm> run typecheck in TS projects). Run a quick axe check if interactive.
  7. Export if it's a shared component (barrel/index per project convention).

Keep it focused: split on a decomposition signal — ≥3 responsibilities, prop/boolean explosion, deep template nesting, logic dwarfing the template, or a repeated block — not on a line count alone (see architecture.md → Decomposition & reuse).

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.