frontend-patterns
Skill206 starsChanged 3 months agoMITView on GitHub
Apply frontend conventions when components, pages, forms, or client state change.
46 other projects use a version of this.
Adopted by
Most recently taken up by
- templetongroup/radianttheir own version, first seen Sep 17, 2026
- themusecatcher/ai-coding-kittheir own version, first seen Sep 15, 2026
- venables/skillstheir own version, first seen Sep 12, 2026
- talayash/agentriumtheir own version, first seen Sep 11, 2026
- best-radar/bradar-everything-claude-codetheir own version, first seen Sep 6, 2026
- socialadsmentor/sam-agentic-harnesstheir own version, first seen Sep 3, 2026
Used with
Projects with it also use kotlin-testing, configure-ecc and 10 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.
tpavanipradeepSkillkotlin-testing
Kotlin testing patterns with Kotest, MockK, coroutine testing, property-based testing, and Kover coverage. Follows TDD methodology with idiomatic Kotlin practices.
Also in 6 projects that use this
saxon-ySkillconfigure-ecc
Interactive installer for Everything Claude Code — guides users through selecting and installing skills and rules to user-level or project-level directories, verifies paths, and optionally optimizes installed files.
Also in 12 projects that use this
mryeastcodeSkillnuxt4-patterns
Nuxt 4 app patterns for hydration safety, performance, route rules, lazy loading, and SSR-safe data fetching with useFetch and useAsyncData.
Also in 5 projects that use this
InfopibeSkillcontent-hash-cache-pattern
Cache expensive file processing results using SHA-256 content hashes — path-independent, auto-invalidating, with service layer separation.
Also in 11 projects that use this
InfopibeSkillralphinho-rfc-pipeline
RFC-driven multi-agent DAG execution pattern with quality gates, merge queues, and work unit orchestration.
Also in 9 projects that use this
WorldFlowAISkillproject-guidelines-example
Also in 18 projects that use this
- +3 more from Infopibe
Other versions46 projects use a version of this.
Word for word · 1
- KbWen/agent-virtual-office★ 35100% same
Edited · 0
None found.
Wrote their own version · 45
- WorldFlowAI/everything-claude-code★ 4ksame name
- xu-xiang/everything-claude-code-zh★ 2ksame name
- bybren-llc/safe-agentic-workflow★ 419same name
- loulanyue/awesome-claude-notes★ 272same name
- cloudnative-co/claude-code-starter-kit★ 151same name
- tpavanipradeep/everything-claude-code★ 134same name
- templetongroup/radiant★ 113same name
- hellangleZ/burn-in-cceverywhere-ralph★ 112same name
- Jamkris/everything-gemini-code★ 87same name
- tranhieutt/software_development_department★ 72same name
35 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository17 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- .github/copilot-instructions.mdCopilot instructions
- llms.txtllms.txt
- api-designSkill
- auth-securitySkill
- database-designSkill
- dispatching-parallel-agentsSkill
- doc-lookupSkill
- karpathy-principlesSkill
- production-readinessSkill
- red-team-adversarialSkill
- subagent-driven-developmentSkill
- systematic-debuggingSkill
- test-driven-developmentSkill
- using-git-worktreesSkill
- verification-before-completionSkill
The file
We split this skill into the rules it gives an agent
4 rules. 0 are common, 4 are distinctive, and 0 are very specific to this project.
0
Common
Most of the 10 edited versions we read keep these.
4
Distinctive
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 48
Lift state up: only when sibling components need it
- Distinctive: line 51
Never duplicate server state in client store
- Distinctive: line 55
Use data-fetching hooks (React Query, SWR, or equivalent) instead of raw fetch/axios in components
- Distinctive: line 60
Use a form library for complex forms (React Hook Form, Formik, or equivalent)
“Common” is measured: kept by at least 6 in 10 of the 10 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.
Files
<!-- This is a SCAFFOLD skill -->Frontend Patterns
When to Apply
- Classification: feature, architecture-change (if touching UI)
- Phase: /implement (component design & build), /review (pattern compliance), /test (UI state coverage)
- Trigger: Task involves creating or modifying UI components, pages, routes, or client-side state
Conventions
Customize after /app-init: Replace these generic conventions with your project's ADR and framework-specific patterns.
Component Structure
- One component per file
- Component file name matches export name (PascalCase)
- Co-locate component-specific styles, tests, and types
- Separate page-level components from reusable UI components
Suggested Directory Pattern
src/
├── components/ # Reusable UI components (Button, Modal, Card)
│ └── <Name>/
│ ├── <Name>.tsx
│ ├── <Name>.test.tsx
│ └── index.ts
├── pages/ # Page-level components (route targets)
│ └── <PageName>/
│ ├── <PageName>.tsx
│ ├── components/ # Page-specific components (not reusable)
│ └── hooks/ # Page-specific hooks
├── hooks/ # Shared custom hooks
├── services/ # API client functions
├── stores/ # State management (if applicable)
├── types/ # Shared TypeScript types
└── utils/ # Pure utility functionsState Management Principles
- Local state first: useState/useReducer for component-specific state
- Lift state up only when sibling components need it
- Global state (store) only for truly app-wide state: auth, theme, user preferences
- Server state (API data) managed by data-fetching library (React Query, SWR, etc.) — NOT in global store
- Never duplicate server state in client store
Data Fetching
- Centralize API calls in
services/directory - Use data-fetching hooks (React Query, SWR, or equivalent) instead of raw fetch/axios in components
- Handle loading, error, and empty states for every data-dependent component
- Implement optimistic updates for better UX where appropriate
Form Handling
- Use a form library for complex forms (React Hook Form, Formik, or equivalent)
- Validate on client AND server (client validation is UX, server validation is security)
- Show inline errors next to fields, not just at form top
- Disable submit button during submission (prevent double-submit)
Error Handling
- Global error boundary for unexpected crashes
- Per-component error handling for expected failures (API errors)
- User-friendly error messages (never show raw error objects)
- Retry mechanism for transient failures (network errors)
Checklist
During /implement:
- Every data-dependent component handles: loading, error, empty, and success states
- No business logic in components (extract to hooks or services)
- No hardcoded strings (use constants or i18n keys)
- Accessible: semantic HTML, aria labels on interactive elements, keyboard navigation
- Responsive: works on mobile viewport (unless spec explicitly excludes mobile)
- No direct API calls in components (use service layer)
During /review:
- No prop drilling deeper than 2 levels (use context or composition)
- No unnecessary re-renders (check memo/callback usage)
- No sensitive data stored in localStorage/client state
- Route guards for authenticated pages
- Loading indicators for async operations
Heading-Scoped Read Note
For phase-entry loading, read only:
When to ApplyChecklist
Load Conventions, Anti-Patterns, and References on full read or cache miss only.
Anti-Patterns
- God component: Component with 300+ lines doing everything. Split into smaller components.
- Prop drilling: Passing props through 3+ levels of components. Use context or composition.
- useEffect for everything: Using useEffect for derived state (use useMemo) or event handling (use event handlers).
- Index as key: Using array index as React key in dynamic lists.
- Fetch in render: Calling fetch/axios directly in component body or useEffect without a data-fetching library.
- CSS-in-JS soup: Inline styles everywhere instead of consistent styling approach.
- Ignoring empty state: Showing a blank page when data array is empty instead of a helpful message.
- Alert/Console for errors: Using
alert()or onlyconsole.error()instead of proper UI error handling.
References
- Project ADR:
docs/adr/ADR-002-project-architecture.md§ Directory Structure, Naming - Spec template:
.agentcortex/templates/spec-app-feature.md§ Frontend - Security guardrails:
.agent/rules/security_guardrails.md(A03: XSS prevention, A07: Auth)
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
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.

