agentsclimarketplace

Scaffold component

Skill TarasTsavolyk/claude-code-frontend/.claude/skills/scaffold-component

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.From its SKILL.md

Install
npx -y skills add TarasTsavolyk/claude-code-frontend --skill scaffold-component

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 1 stars1 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

SKILL.md

2.3 KB, as published. Nobody here has run it

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).

Keep looking

Skills are one crate of 627,801. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.