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.
npx skills add contactandrewchl-wq/turtle-mcp --skill frontend-component-patternsgit clone --depth 1 https://github.com/contactandrewchl-wq/turtle-mcpWrote 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.
[](https://agentmods.dev/skills/contactandrewchl-wq/turtle-mcp/frontend-component-patterns)<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.
<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>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.
| Model | Per session | Once 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 |
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.
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
valueodefaultValue, no ambos.
Listas
keyestable 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/computedsolo cuando hay profiler que lo justifique. - Sí memoizar: cálculos pesados (>10 ms), referencias pasadas a
React.memo, dependencias deuseEffectque disparan red. - Vue 3 / Svelte: la reactividad fina ya memoiza; intervenir solo en cuellos medidos.
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.
- 9d ago First seen · 139 lines · 63 tokens per session scan A bfab2b7d00c2
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.
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.
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.
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.
frontend-developer
Expert frontend developer persona — React/Vue/Angular, performance optimization, Core Web Vitals, accessibility. Builds responsive web apps with pixel-perfect precision.
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.
frontend
When to use: React, Vue, or Angular work — component design, accessibility, performance, state management.