agentleFS
kriscardkriscard/Skills/skills/dev/frontend/SKILL.md

frontend

Skill14 starsChanged 4 months agoMITView on GitHub

Frontend engineering audit for TypeScript, UI accessibility, Next.js boundaries, Tailwind/component patterns, and browser security. Use when reviewing .ts/.tsx/.jsx frontend code, designing UI components, checking type/runtime boundaries, handling XSS/CSP/token storage, or deciding frontend file structure. For React runtime/rendering pitfalls, use the react skill.

37 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use backend, programming and 9 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • xiaobei930Skill

    backend

    Backend development patterns for services, error handling, logging, caching. Use when building backend services, APIs, or microservices.

    Also in 10 projects that use this

  • Xia-AtaraxiaSkill

    programming

    Guides correctness-first, type-strict Python and TypeScript implementation. Use when asked to write a `.py` or `.ts` file, scaffold a Python/TypeScript project, add strict types, assess an implementation diff for correctness or type holes, or fix a reproducible defect. Not for smell-only assessment or behavior-preserving restructuring — use refactor; not for suite-level test architecture — use testing.

    Also in 3 projects that use this

  • iankikuSkill

    data

    (forwward) Designs analytics systems, writes SQL queries, plans event tracking, and builds dashboards for product and user metrics. Triggers on SQL, analytics, dashboards, tracking, data pipelines, or user behavior analysis.

    Also in 3 projects that use this

  • GoogleSkill

    quality

    Evaluates whether a GitHub issue is spam, empty, needs more information, or is OK to proceed.

    Also in 3 projects that use this

  • 0xSeroSkill

    security

    Also in 7 projects that use this

  • AnthropicSkill

    architecture

    Create or evaluate an architecture decision record (ADR). Use when choosing between technologies (e.g., Kafka vs SQS), documenting a design decision with trade-offs and consequences, reviewing a system design proposal, or designing a new component from requirements and constraints.

    Also in 6 projects that use this

The file

We split this skill into the rules it gives an agent

2 rules. 0 are common, 1 is distinctive, and 1 is very specific to this project.

  • 0

    Common

    Most of the 29 edited versions we read keep these.

  • 1

    Distinctive

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Keep 'use client' boundaries narrow.

    line 53
  2. Distinctive:

    If multiple references match, load in priority order.

    line 88

“Common” is measured: kept by at least 6 in 10 of the 29 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Frontend Engineering

TypeScript + Next.js + UI/UX + frontend security. The philosophy: write inevitable code — type-safe enough that wrong usage won't compile, obvious enough that the next reader doesn't need comments, effortless to compose. Measure before optimizing. Accessibility from day one, not a retrofit.

Core Philosophy

  • Composition over inheritance — hooks and small focused components beat HOCs and class hierarchies when React is involved
  • Types are documentation that never lies — if the types are right, the logic is constrained; if the logic is wrong, the types will tell you
  • Runtime boundaries matter — TypeScript types disappear at runtime. Zod / Valibot / ArkType at every external boundary (API responses, form inputs, URL params)
  • Measure before optimizing — premature memoization adds noise without benefit; the Profiler tells you what's actually slow
  • Accessibility is correctness — semantic HTML, keyboard nav, and ARIA are not polish; they are correctness constraints like type safety

Universal Checks

These checks take seconds to scan and catch the most common frontend mistakes. Inspect project files first; ask the user only when project state cannot answer the question.

  1. any without justification — any disables type checking for the entire expression tree below it. Prefer unknown and narrow explicitly. Legitimate uses: third-party lib without types, catch (e) (use e instanceof Error), genuine escape hatch with a comment explaining why.
  2. No runtime validation at external boundaries — TypeScript types exist only at compile time. Add Zod/Valibot/ArkType at every network call, form submit, URL param parse, and localStorage read.
  3. Unsafe type assertions at trust boundaries — as SomeApiResponse or JSON.parse(...) as T turns untrusted data into trusted state. Replace casts with schema validation or explicit narrowing.
  4. Client/server boundary drift — Next.js Server Components should stay server-only unless they need event handlers, state, effects, or browser APIs. Keep 'use client' boundaries narrow.
  5. Accessibility at the call site — semantic HTML (<button> not <div onClick>), keyboard nav for custom controls, ARIA only when native HTML semantics are insufficient.
  6. Browser security footguns — flag dangerouslySetInnerHTML, unsanitized URL construction, missing CSP considerations, and auth tokens in localStorage unless justified by the threat model.

Ownership Boundary with React

Frontend owns TypeScript, runtime boundaries, browser security, accessibility, Next.js boundaries, Tailwind/component API patterns, and file structure. The react skill owns React runtime/rendering issues: useEffect, re-renders, Context provider values, keys, Server Actions, React 19 APIs, hydration, and waterfalls.

References — Priority Table

Load the reference that matches the issue. Security and type correctness issues are CRITICAL (silent bugs at runtime); UI and optimization issues are lower.

PriorityLoad whenReference
1 — CriticalXSS, dangerouslySetInnerHTML, CSP headers, input sanitization, localStorage security, auth token storage, CORS, third-party scriptsreferences/security.md
2 — HighTypeScript types, generics, branded types, discriminated unions, DistributiveOmit, Zod/Valibot/ArkType, tsconfig, TypeScript 6.x/7.0references/type-system.md
3 — HighNext.js App Router, RSC vs Client Components, Server Actions, hydration mismatch, rendering model choice (SSR/SSG/ISR/CSR/RSC)references/nextjs.md
4 — MediumComponent composition, compound components, asChild, CVA variants, Tailwind patterns, animation, prefers-reduced-motion, accessibility deep-dive, design tokens, dark mode, formsreferences/ui-patterns.md
5 — MediumProject structure, feature folders, "where should this file go", cross-feature imports, barrel files causing pain, scaling the codebasereferences/feature-architecture.md

When to load a reference

  • Load the highest-priority matching reference first — security issues before optimization issues
  • If multiple references match, load in priority order; they don't repeat each other
  • The body above (universal checks) is always active — references add depth, load only when the checklist surface is insufficient

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.