frontend-component-patterns

frontend-component-patterns is a skill for Claude Code from contactandrewchl-wq/turtle-mcp. It costs 63 tokens per session (2,517 once invoked), scanned A, original, MIT.

Guidance for building and refactoring user-interface components in React, Vue, and Svelte, including how to structure composition, state, properties, and asynchronous behavior.

In plain words
What is it for?
It supports designing forms, tables, modals, lists, and reusable component libraries, while choosing suitable approaches for local state, shared state, server data, and loading or error handling.
Why use it?
It helps avoid components that are difficult to reuse, test, or maintain, along with common problems such as unnecessary rerenders and unstable list keys.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the turtle plugin — 26 skills shipped together

Good fit It supports designing forms, tables, modals, lists, and reusable component libraries, while choosing suitable approaches for local state, shared state, server data, and loading or error handling.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/contactandrewchl-wq/turtle-mcp/frontend-component-patterns
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add contactandrewchl-wq/turtle-mcp --skill frontend-component-patterns
Clone the repo
git clone --depth 1 https://github.com/contactandrewchl-wq/turtle-mcp

Made for: Claude Code.

Or install turtle, the plugin that ships this one along with the rest of its 26 skills.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for frontend-component-patterns

README.md
[![agentmods](https://agentmods.dev/badge/skills/contactandrewchl-wq/turtle-mcp/frontend-component-patterns/github.svg)](https://agentmods.dev/skills/contactandrewchl-wq/turtle-mcp/frontend-component-patterns)
Your own site
<a href="https://agentmods.dev/skills/contactandrewchl-wq/turtle-mcp/frontend-component-patterns"><img src="https://agentmods.dev/badge/skills/contactandrewchl-wq/turtle-mcp/frontend-component-patterns/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for frontend-component-patterns

Your own site · 80×15
<a href="https://agentmods.dev/skills/contactandrewchl-wq/turtle-mcp/frontend-component-patterns"><img src="https://agentmods.dev/badge/skills/contactandrewchl-wq/turtle-mcp/frontend-component-patterns.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 63 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,517 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00063 $0.02517
Opus 5 $0.00032 $0.01259
Sonnet 5 $0.00013 $0.00503
Haiku 4.5 $0.00006 $0.00252

Measured 9d ago against content hash bfab2b7d00c2, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

frontend-component-patterns scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 9d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/frontend-component-patterns/SKILL.md · 139 lines

How it starts

The opening of the file, as written. The whole thing — 139 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Frontend component patterns

Cuándo usar

  • Crear un componente nuevo de UI compleja (formulario, tabla, modal, lista virtualizada).
  • Refactorizar un componente que creció a >300 líneas o tiene >5 props booleanos.
  • Resolver problemas de rerender, claves o estado compartido.

Composición

  • Slots/children sobre props de configuración. Si vas por variant="primary-large-icon-loading", partilo en partes componibles.
  • Headless + estilos para libraries reutilizables (Radix, Headless UI, shadcn): la lógica vive en un hook, el render en JSX.
  • Compound components para grupos: <Tabs><TabList><Tab/></TabList><TabPanel/></Tabs>. Mejor API que props array.

Estado

Decisión Regla
¿Local o compartido? Local hasta que tres componentes no relacionados lo necesiten.
¿Server o cliente? Server state (datos remotos) → React Query / SWR / TanStack Query. Client state → useState/signals/stores. No mezclar.
¿Global? Solo si cruza rutas o capas. Zustand/Pinia/Svelte stores antes que Redux.
¿Form? React Hook Form / VeeValidate / Felte. Nunca useState por campo en formularios >3 campos.

Controlled vs uncontrolled

  • Controlled por defecto en formularios con validación viva.
  • Uncontrolled (refs + defaultValue) para inputs simples sin reactividad — más rápido, menos rerenders.
  • Nunca mezclar: o value o defaultValue, no ambos.

Listas

  • key estable y único, nunca el índice si la lista cambia de orden.
  • Listas >100 ítems: virtualizar (react-window, vue-virtual-scroller, svelte-virtual-list).
  • Paginación o scroll infinito >50 ítems. No render todo "porque cabe".

Memoización

  • No memoizar por reflejo. useMemo/memo/computed solo cuando hay profiler que lo justifique.
  • Sí memoizar: cálculos pesados (>10 ms), referencias pasadas a React.memo, dependencias de useEffect que disparan red.
  • Vue 3 / Svelte: la reactividad fina ya memoiza; intervenir solo en cuellos medidos.

Read the full file on GitHub · 139 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 9d ago First seen · 139 lines · 63 tokens per session scan A bfab2b7d00c2

Subscribe to this mod's changes

frontend-component-patterns is a skill published in the GitHub repository contactandrewchl-wq/turtle-mcp (2 stars, last pushed 2mo ago), licensed MIT. It adds 63 tokens to every session and 2,517 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

frontend-ux-engineer

Use for frontend features, Next.js/React/Vue/Svelte UI, accessibility, responsive layout, design polish, state handling, forms, visual QA, or product workflow improvements.

DominikTobureto/awesome-grok-build · 42 tokens

artisan

A production frontend craftsman for React/Vue/Svelte. Responsible for hooks design, state management, Server Components, form handling, and data fetching. Converts Forge prototypes into production-quality code. Use when production frontend implementation is required.

onfire7777/universal-ai-skills-library · 48 tokens

web-artifacts-builder

Suite of tools for creating elaborate, multi-component claude.ai HTML artifacts using modern frontend web technologies (React, Tailwind CSS, shadcn/ui). Use for complex artifacts requiring state management, routing, or shadcn/ui components - not for simple single-file HTML/JSX artifacts.

PM-Shawn/Abu-Cowork · 64 tokens

frontend-developer

Expert frontend developer persona — React/Vue/Angular, performance optimization, Core Web Vitals, accessibility. Builds responsive web apps with pixel-perfect precision.

chandrudp29/skillhub · 34 tokens

frontend-best-practices

Coding guidance for building React or Vue front ends, where components display screens and manage user interactions. It covers component responsibilities, state placement, performance, and accessibility.

Wade-DevCode/awesome-coding-skills-cn · 29 tokens

frontend

When to use: React, Vue, or Angular work — component design, accessibility, performance, state management.

Effulgent-Point/paw · 0 tokens