frontend-best-practices

frontend-best-practices is a skill for Claude Code, Codex from ApexIQ/skillsmith. It costs 29 tokens per session (542 once invoked), scanned A, original, MIT.

A guide to building and modifying React frontend components, which are reusable pieces of a web interface. It covers interaction design, component structure, styling, keyboard controls, animation, and data loading.

In plain words
What is it for?
Use it when creating React screens or components, organizing shared UI, handling application state and API data, adding optimistic updates, and supporting dark mode.
Why use it?
It helps keep interfaces consistent, responsive, accessible to keyboard users, and easier to maintain as they grow.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it when creating React screens or components, organizing shared UI, handling application state and API data, adding optimistic updates, and supporting dark mode.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/apexiq/skillsmith/frontend_best_practices
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 ApexIQ/skillsmith --skill frontend_best_practices
Clone the repo
git clone --depth 1 https://github.com/ApexIQ/skillsmith

Made for: Claude Code, Codex.

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-best-practices

README.md
[![agentmods](https://agentmods.dev/badge/skills/apexiq/skillsmith/frontend_best_practices/github.svg)](https://agentmods.dev/skills/apexiq/skillsmith/frontend_best_practices)
Your own site
<a href="https://agentmods.dev/skills/apexiq/skillsmith/frontend_best_practices"><img src="https://agentmods.dev/badge/skills/apexiq/skillsmith/frontend_best_practices/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-best-practices

Your own site · 80×15
<a href="https://agentmods.dev/skills/apexiq/skillsmith/frontend_best_practices"><img src="https://agentmods.dev/badge/skills/apexiq/skillsmith/frontend_best_practices.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 29 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 542 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.00029 $0.00542
Opus 5 $0.00015 $0.00271
Sonnet 5 $0.00006 $0.00108
Haiku 4.5 $0.00003 $0.00054

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

Security

Grade A, and why

frontend-best-practices 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 10d 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.

.agent/skills/frontend_best_practices/SKILL.md · 58 lines

What it actually says

⚛️ Frontend Best Practices

1. Premium UX Principles

Principle Implementation Example
Optimistic UI Mutate state instantly, sync with server later. Revert on error. Delete item -> Remove from list immediately -> Call API.
Physics-Based Motion Use animation libraries with spring physics. No linear eases. framer-motion with type: "spring".
Keyboard First Every action has a hotkey. Command palette for power users. Global Cmd+K for navigation/actions.

2. React Architecture

  • Hooks: Logic lives in custom hooks (useAuth, useApi), not in components.
  • Context: Use for global state (User, Theme). Avoid props drilling.
  • Components: Small, single-responsibility. Shared UI in components/ui/.

3. Styling (Tailwind or CSS-in-JS)

  • Utility First: Prefer utility classes over custom CSS.
  • Conditional Styles: Use a utility like clsx or cn() for conditionals.
    <div className={cn("p-4", isActive && "bg-primary")} />
    
  • Design Tokens: Use semantic colors (bg-background, text-foreground) for dark mode.

4. Data Fetching

  • SWR / TanStack Query: Never use raw useEffect for API calls.
  • Stale-While-Revalidate: Show cached data while fetching fresh data.

5. Project Structure

src/
  features/       # Domain logic (Auth, Dashboard)
  components/     # Shared UI (Button, Modal)
  hooks/          # Custom hooks (useAuth, useKeyboard)
  lib/            # Utilities (API client, formatters)
  pages/          # Route components

Examples

  • New component: Create in components/ui/ -> Use utility classes -> Export from index.

Guidelines

  • Test with testing-library (see frontend_testing skill).
  • Accessibility first: use semantic HTML and ARIA attributes.
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. 10d ago First seen · 58 lines · 29 tokens per session scan A edc59ac950c0

Subscribe to this mod's changes

frontend-best-practices is a skill published in the GitHub repository ApexIQ/skillsmith (5 stars, last pushed 5mo ago), licensed MIT. It adds 29 tokens to every session and 542 once invoked, about $0.0001 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

shadcn

Manages shadcn components and projects — adding, searching, fixing, debugging, styling, and composing UI, including chat interfaces. Provides project context, component docs, and usage examples. Applies when working with shadcn/ui, component registries, presets, --preset codes, or any project with a components.json…

shadcn-ui/ui · 94 tokens

component-search

Search 21st.dev component registry for production-ready React components. Finds components by natural language description, filters by framework and style system, returns ranked results with install instructions. Use when looking for UI components, finding alternatives to existing components, or sourcing design system…

yonatangross/orchestkit · 57 tokens

frontend-design

Create distinctive, production-grade Stellar dApp UI. Combines bold aesthetic direction with smart contract integration patterns — wallet connection flows, transaction UX, contract data displays, and agentic kit hook wiring. No generic "AI slop" aesthetics.

rylsherdamz-rgb/stellar-forge · 51 tokens

frontend-ui-design

Use when design and build production-grade UI components using React, Vue, or vanilla HTML/CSS. Create responsive layouts, design systems, and accessible interfaces. Use when designing and build production-grade ui components using react, vue, or.

oyi77/1ai-skills · 51 tokens

dev-shadcn

Integration and customization of shadcn/ui (copy-paste React components, Radix + Tailwind). Trigger when the user wants to install shadcn, add components, customize the theme, or when shadcn/ui usage is detected in the project.

christopherlouet/claude-base · 57 tokens

design

Use when designing or refreshing a web UI or landing page — visual concept, type/color/spacing/motion tokens, composition, rescuing a UI that reads AI-generic, or a graded design review. Brand-grounded and research-first; ships Tailwind v4 + Next.js 15 under WCAG 2.2 AA and Core Web Vitals budgets. NOT the words on…

ericrisco/rsc-harness · 100 tokens