frontend-patterns

frontend-patterns is a skill for Claude Code, Codex from mturac/everything-openai-codex. It costs 24 tokens per session (3,773 once invoked), scanned A, a copy of frontend-patterns, MIT.

A reference guide for building web interfaces with React and Next.js, including components, state, forms, data loading, accessibility, and performance. React and Next.js are tools for creating browser-based applications.

In plain words
What is it for?
Use it when creating React components, managing application state, loading data, building forms, handling navigation, or improving web-interface performance.
Why use it?
It helps keep interface code maintainable, responsive, accessible, and careful with user data.

Skill for Claude CodeCodex

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.

agentmods
npx agentmods add skills/mturac/everything-openai-codex/frontend-patterns
Any agent
npx skills add mturac/everything-openai-codex --skill frontend-patterns
Clone the repo
git clone --depth 1 https://github.com/mturac/everything-openai-codex

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-patterns

README.md
[![agentmods](https://agentmods.dev/badge/skills/mturac/everything-openai-codex/frontend-patterns.svg)](https://agentmods.dev/skills/mturac/everything-openai-codex/frontend-patterns)
Your own site
<a href="https://agentmods.dev/skills/mturac/everything-openai-codex/frontend-patterns"><img src="https://agentmods.dev/badge/skills/mturac/everything-openai-codex/frontend-patterns.svg" alt="Measured on agentmods" height="20"></a>
Per session 24 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,773 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. Scan, not verified.
Origin 91% copy Near-identical to another mod 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 $0.00024 $0.03773
Opus 5 $0.00012 $0.01886
Sonnet 5 $0.00005 $0.00755
Haiku 4.5 $0.00002 $0.00377

Measured 3d ago against content hash 8e7d5c8c5ed9, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

frontend-patterns scanned grade A with 1 finding 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 3d 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.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

fetch(url)
Origin

This is a copy

91% identical to frontend-patterns — 30 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

.agents/skills/frontend-patterns/SKILL.md · 648 lines

How it starts

The opening of the file, as written. The whole thing — 648 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Frontend Development Patterns

Modern frontend patterns for React, Next.js, and performant user interfaces.

When to Activate

  • Building React components (composition, props, rendering)
  • Managing state (useState, useReducer, Zustand, Context)
  • Implementing data fetching (SWR, React Query, server components)
  • Optimizing performance (memoization, virtualization, code splitting)
  • Working with forms (validation, controlled inputs, Zod schemas)
  • Handling client-side routing and navigation
  • Building accessible, responsive UI patterns

Privacy and Data Boundaries

Frontend examples should use synthetic or domain-generic data. Do not collect, log, persist, or display credentials, access tokens, SSNs, health data, payment details, private emails, phone numbers, or other sensitive personal data unless the user explicitly requests a scoped implementation with appropriate validation, redaction, and access controls.

Avoid adding analytics, tracking pixels, third-party scripts, or external data sinks without explicit approval. When handling user data, prefer least-privilege APIs, client-side redaction before logging, and server-side validation for every boundary.

Component Patterns

Composition Over Inheritance

// PASS: GOOD: Component composition
interface CardProps {
  children: React.ReactNode
  variant?: 'default' | 'outlined'
}

export function Card({ children, variant = 'default' }: CardProps) {
  return <div className={`card card-${variant}`}>{children}</div>
}

export function CardHeader({ children }: { children: React.ReactNode }) {
  return <div className="card-header">{children}</div>
}

export function CardBody({ children }: { children: React.ReactNode }) {
  return <div className="card-body">{children}</div>
}

// Usage
<Card>
  <CardHeader>Title</CardHeader>
  <CardBody>Content</CardBody>
</Card>

Compound Components

interface TabsContextValue {
  activeTab: string
  setActiveTab: (tab: string) => void
}

const TabsContext = createContext<TabsContextValue | undefined>(undefined)

export function Tabs({ children, defaultTab }: {
  children: React.ReactNode
  defaultTab: string
}) {
  const [activeTab, setActiveTab] = useState(defaultTab)

  return (
    <TabsContext.Provider value={{ activeTab, setActiveTab }}>
      {children}
    </TabsContext.Provider>
  )
}

export function TabList({ children }: { children: React.ReactNode }) {
  return <div className="tab-list">{children}</div>
}

export function Tab({ id, children }: { id: string, children: React.ReactNode }) {
  const context = useContext(TabsContext)
  if (!context) throw new Error('Tab must be used within Tabs')

  return (
    <button
      className={context.activeTab === id ? 'active' : ''}
      onClick={() => context.setActiveTab(id)}
    >
      {children}
    </button>
  )
}

// Usage
<Tabs defaultTab="overview">
  <TabList>
    <Tab id="overview">Overview</Tab>
    <Tab id="details">Details</Tab>
  </TabList>
</Tabs>

Read the full file on GitHub · 648 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 3d ago First seen · 648 lines · 24 tokens per session scan A 8e7d5c8c5ed9

Subscribe to this mod's changes

frontend-patterns is a skill published in the GitHub repository mturac/everything-openai-codex (90 stars, last pushed 10d ago), licensed MIT. It adds 24 tokens to every session and 3,773 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). It is 91% identical to frontend-patterns, differing in 30 lines, and is treated as a copy.

Related

Other skills, from other repositories

architecture-diagram

Dark-themed SVG architecture/cloud/infra diagrams as HTML.

mateaix/mateclaw · 15 tokens

browser_cdp

通过 Chrome DevTools Protocol (CDP) 连接已运行的浏览器,或扫描本机 CDP 端口,用于远程调试与多工具共享浏览器实例。.

mateaix/mateclaw · 44 tokens

validate-harness

Release-readiness umbrella check for a scaffolded harness — runs doctor, witness verify, hardcoded-path scan, MCP server config, and GCP Secret Manager validation in one shot. Exits non-zero if any sub-check fails.

ruvnet/metaharness · 50 tokens

debug

Interactive debugging workflow with hypothesis-driven probe loop. Use when: unknown bugs, script errors, silent failures, troubleshooting. Not for: known bugs (use bug-fix), GitHub issue analysis (use issue-analyze), code understanding (use code-explore). Output: debug report with probe journal + root cause + fix.

sd0xdev/sd0x-harness · 67 tokens

deep-review

Parallel competency-based code review. Launches independent Agent reviewers per competency (security, performance, architecture, database, concurrency, error-handling, frontend, testing), each with a focused checklist and isolated context. Synthesizes findings into unified report with FIX/DEFER/ACCEPT triage. Use…

AnastasiyaW/codex-claude-code-config · 166 tokens

quality-gate

Production quality gate for agent sessions. Activates on session stop to evaluate work quality using 4-dimension weighted scoring (completeness, honesty, deferral ratio, work evidence). Catches rationalization patterns, verifies test claims, and generates handoff artifacts for session continuity. Use sprint contracts…

0xNyk/lacp · 71 tokens