skills/frontend-patterns/SKILL.md
Generally-applicable frontend/UI best practices. Use whenever building, modifying, or reviewing UI — adding a form/button/dialog/modal, wiring keyboard shortcuts, creating any interactive surface that submits a form, or any time TSX/JSX is being written or edited. Consult BEFORE writing the code so the patterns are baked in, not retrofitted. If a scenario described in the skill body matches the work, apply the pattern — don't ask, just follow it (call out the choice in one line so the user can override).
npx skillsauth add ilamanov/skills frontend-patternsInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Generally-applicable best practices for frontend work. Read every pattern below. If any matches what you're about to build, apply it. Don't ask permission for things that are codified here — just follow the rule and note in one line that you did.
Any time you are:
If none of the patterns below match the scenario, return to the original task without comment.
Cmd+Enter should always "submit" — be it save, create, send, confirm, or any other primary action. Cmd+Enter should behave exactly as if clicking on the primary button manually (same disabled/loading/validation behavior, same side effects). Use Ctrl+Enter on Windows/Linux (e.metaKey || e.ctrlKey).ResponsiveDialog instead, which shows a Dialog on desktop and a Drawer on mobile. This is better UX for mobile because dialogs on mobile are not that great. If this component doesn't exist, then create one by using the Dialog and Drawer components from shadcn (mirror shadcn's Dialog API so it's a drop-in — Content, Header, Title, Description, Footer, Trigger, Close).<div> or <p> with {text} or whitespace-pre-wrap. Use a real markdown renderer. Default to react-markdown with remark-gfm (tables, strikethrough, task lists, autolinks) and remark-breaks (so single \n becomes a <br> — without this, single newlines collapse and the output looks like a wall of run-on text, which is the failure mode agents repeatedly ship). For code blocks add rehype-highlight or react-syntax-highlighter. Install: npm i react-markdown remark-gfm remark-breaks. Minimal usage:
import ReactMarkdown from 'react-markdown';
import remarkGfm from 'remark-gfm';
import remarkBreaks from 'remark-breaks';
<ReactMarkdown remarkPlugins={[remarkGfm, remarkBreaks]}>{text}</ReactMarkdown>
Do not use dangerouslySetInnerHTML with a hand-rolled regex replacer (.replace(/\n/g, '<br>') etc.) — it's an XSS hole and misses every other markdown construct. If the project already standardizes on a different renderer (marked, markdown-it, MDX), use that — but verify single-newline-to-<br> behavior is on (breaks: true in marked/markdown-it).'use client' only when the component genuinely needs the browser — interactive state/effects (useState, useEffect, refs), event handlers, or browser-only APIs. Keep client boundaries as low in the tree as possible: push interactivity into small leaf components rather than marking a whole page/route 'use client'.style={{…}} unless there's something Tailwind genuinely can't express (call out why in one line when you do).components/ui/*. Generic, app-wide building blocks (buttons, inputs, dialogs, etc.) live there; feature-specific components do not (co-locate those with the feature — see the codebase-conventions skill).ResponsiveDialog doesn't exist and you had to create it, mention that too.This skill will grow over time. New patterns should be added as bullet points in the Patterns section above, phrased as rules the agent can apply mechanically.
tools
Generally-applicable conventions for how code is written and arranged — tooling/package manager, import style, file & component naming, comments, and where files live (colocation vs. global folders). Use whenever creating, naming, moving, or importing a file, running project commands, or deciding where a new module belongs. Consult BEFORE writing the code so the conventions are baked in, not retrofitted. If a convention below matches the work, apply it — don't ask, just follow it (call out the choice in one line so the user can override).
tools
Generally-applicable backend/data best practices. Use whenever writing or modifying backend/data code — API routes, server actions, DB writes, background jobs, agent tools, import flows, webhooks, paste handlers, or anywhere data enters the system. Consult BEFORE writing the code so the patterns are baked in, not retrofitted. If a scenario described in the skill body matches the work, apply the pattern — don't ask, just follow it (call out the choice in one line so the user can override).
development
Runs on a schedule to mine recent Codex and Claude Code conversations across configured projects, find moments where things went off plan (the user had to steer, correct, abort, or re-explain), and propose targeted improvements to the specific skills that were in use at the time. Opens one pull request per run against the skills repo, with each proposed edit annotated with the concrete steering moment that motivated it. Also analyzes its own runs (the `skills` repo is one of the configured projects) so it iteratively improves itself. Use this skill when the user asks to "analyze recent conversations", "find what went wrong", "improve skills based on past runs", or sets up a scheduled run of skill-improver. Make sure to use this skill whenever the user mentions recursive skill improvement, post-mortem analysis of agent conversations, or automating skill quality based on real usage.
development
Improves how an existing skill reads and flows — tightens wording, removes redundancy, fixes structure, and resolves instructions that contradict each other across sections — so it's easy to follow for both humans and the agent executing it. Reducing length is incidental, not the aim; a skill that's long because it carries important detail can stay long. Edits the skill in place, then reports what changed and why. Use when the user asks to "clean up", "simplify", "tighten", "refactor", or "improve the flow/structure" of a skill, says it's "too long", "bloated", "cumbersome", "hard to follow", or "has conflicting instructions", or when another skill (e.g. skill-improver) flags a target for a cleanup pass. Also use when the user wants a second opinion on whether a skill reads well or is doing too much.