senior-frontend
You MUST use this whenever you build, change or review user interface code, including small UI tweaks and when the user is in a hurry: pages, components…
от davila7★ 34 631 звезда на GitHub
Установить senior-frontend в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Об этом скилле
Senior Frontend
A senior frontend engineer is not faster at typing JSX. They read the codebase before writing, they think about the states nobody asked for, they use the keyboard to try what they built, and they look at it in a browser before they say it works. This skill is that habit, written down.
Core rule: the UI is not done until you have seen it work in a browser, including the unhappy paths. A passing typecheck says nothing about whether the button can be reached with Tab or whether a long name breaks the layout on a phone.
1. Read the project before you write
Spend the first minutes reading, not writing. Find and use:
- The stack and its versions: framework, router, React version (18 vs 19
changes
forwardRef,use, actions), TypeScript strictness. - The existing components: if the project has a
Button,Input,Dialogor design-system package, use it. Never hand-roll a second button. - The tokens: colors, spacing, radius and type scale already defined (CSS variables, Tailwind theme, theme object). New hex values or magic pixel numbers in a project that has tokens are a bug.
- The data layer: the API helpers, query library (TanStack Query, SWR, server components, loaders) and how errors are already handled.
- The scripts:
typecheck,lint,test,build,dev. You will run them. - A sibling page or component that does something similar. Match its structure and naming.
Ask the user before you add a dependency (UI kit, icon set, state library, date library). The platform and the project usually already have what you need.
2. List the states before you build
Every piece of UI that shows data or takes input has more states than the happy path. Write them down for the feature, then build each one:
| State | What the user must see |
|---|---|
| Loading | A placeholder or "Loading…" with aria-busy or role="status"; no layout jump when data arrives |
| Empty | A sentence that says why it is empty and what to do ("No members match "zz". Clear the search.") |
| Error | What failed, in plain words, and a way out (Retry, or a link). Never a blank area or a console-only error |
| Success / done | Confirmation that the action happened, announced to screen readers |
| Pending action | The control shows progress and is disabled only while the request runs; no double submit |
| Long and odd content | Very long names, emails and words wrap or truncate; 0, 1 and 500 items all look right |
| Partial failure | One row's action failing does not break the rest of the list |
If the API helper can fail (it always can), the UI must handle the rejection. Look for a way the project lets you force failures (a mock flag, a query parameter, a dev toggle) so you can see the error state yourself.
3. Build with the platform first
Semantic HTML gives you keyboard support, focus, and screen-reader names for free. Reach for ARIA only when no element does the job.
<button>for actions,<a href>/ the router'sLinkfor navigation. Never<div onClick>.- Every input has a visible
<label>(or at minimumaria-label), the righttype(email,tel,url,search),nameandautocomplete. - Inputs that submit live inside a
<form>withonSubmit, so Enter works. - Icon-only buttons need an accessible name that says what and which:
aria-label="Remove Ada Lovelace", not"Delete"repeated twelve times. The icon itself getsaria-hidden="true". - One
<h1>per page, headings in order, lists as<ul>/<ol>, tables as<table>with<th scope>. - Async results (saved, removed, failed) go in an
aria-live="polite"region orrole="status"; blocking errors inrole="alert". - Visible focus on everything interactive (
:focus-visible); never remove an outline without a replacement. - Images have
alt(empty for decorative ones) and explicitwidth/height. - Destructive actions need a confirmation or an undo window, never an
immediate irreversible delete. After a removal, move focus somewhere sensible
(the next row or the list heading), not to
<body>.
The full checklist, with forms, motion, typography, i18n and touch rules, is in
references/ui-checklist.md. Use it when reviewing UI code.
4. State and data: keep it boring
- Derive, do not sync. A filtered list is
items.filter(...)during render, not a seconduseStateupdated by an effect. - Effects are for talking to the outside world (fetching, subscriptions, timers), not for reacting to your own state. Event logic goes in the event handler.
- Fetching in an effect needs cleanup: ignore stale responses (an
ignoreflag orAbortController) and handle React 18 Strict Mode's double mount. If the project has a query library or server components, use those instead. - Never define a component inside another component. It remounts on every render and loses state and focus.
- **Composition over boolean p
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
- references/NOTICE.md
- references/react-patterns.md
- references/ui-checklist.md
- scripts/check_ui.mjs
- scripts/page-audit.mjs
FAQ
Что делает скилл senior-frontend?
You MUST use this whenever you build, change or review user interface code, including small UI tweaks and when the user is in a hurry: pages, components, forms, lists, tables, modals, navigation, layout or styling in React, Next.js, Vue, Svelte, Astro or plain HTML/CSS/Tailwind. Reuse the project's own components and tokens, design every state (loading, empty, error, long content), make it work with a keyboard and a screen reader and at phone width, then open it in a real browser and check it before saying it is done.
Как установить скилл senior-frontend?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл senior-frontend запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
doc-coauthoring
AnthropicGuide users through a structured workflow for co-authoring documentation. Use when user wants to write documentation, proposals, technical specs, decision…
academy-guide
AnthropicStop and check this skill before finishing any reply to a question about how to use Claude or a Claude product — it recommends matching courses, tutorials…
internal-comms
AnthropicA set of resources to help me write all kinds of internal communications, using the formats that my company likes to use. Claude should use this skill…
skill-development
AnthropicThis skill should be used when the user wants to "create a skill", "add a skill to plugin", "write a new skill", "improve skill description", "organize skill…