agentleFS
atstaeffatstaeff/ai-agents/skills/languages/frontend-patterns/SKILL.md

frontend-patterns

Skill4 starsChanged 23 days agoMITView on GitHub

Implement or debug React, JavaScript and web UI behavior: state ownership, effects, forms, accessible interaction and API failure recovery.

99 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use orch-pipeline, agent-sort 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.
  • renepfSkill

    orch-pipeline

    Shared orchestration engine for the orch-* skill family. Defines the gated Research-Plan-TDD-Review-Commit pipeline, the size classifier, the agent map, and the two human gates that the orch-* operation skills delegate to. Not usually invoked directly.

    Also in 5 projects that use this

  • niloykumarbarmanSkill

    agent-sort

    Build an evidence-backed ECC install plan for a specific repo by sorting skills, commands, rules, hooks, and extras into DAILY vs LIBRARY buckets using parallel repo-aware review passes. Use when ECC should be trimmed to what a project actually needs instead of loading the full bundle.

    Also in 16 projects that use this

  • loulanyueSkill

    nuxt4-patterns

    Nuxt 4 app patterns for hydration safety, performance, route rules, lazy loading, and SSR-safe data fetching with useFetch and useAsyncData.

    Also in 14 projects that use this

  • ronmkrSkill

    vite-patterns

    Vite build tool patterns including config, plugins, HMR, env variables, proxy setup, SSR, library mode, dependency pre-bundling, and build optimization. Activate when working with vite.config.ts, Vite plugins, or Vite-based projects.

    Also in 10 projects that use this

  • royaluniondesign-sysSkill

    content-hash-cache-pattern

    Cache expensive file processing results using SHA-256 content hashes — path-independent, auto-invalidating, with service layer separation.

    Also in 23 projects that use this

  • HABUBUSSSkill

    project-guidelines-example

    Also in 20 projects that use this

The file

We split this skill into the rules it gives an agent

3 rules. 0 are common, 3 are distinctive, and 0 are very specific to this project.

  • 0

    Common

    Most of the 26 edited versions we read keep these.

  • 3

    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
  1. Distinctive:

    Keep one owner for each state.

    line 11
  2. Distinctive:

    Use semantic controls, labels, keyboard operation, visible focus and responsive layouts.

    line 14
  3. Distinctive:

    Verify the critical journey and relevant failure recovery in the running interface.

    line 15

“Common” is measured: kept by at least 6 in 10 of the 26 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 Patterns

Workflow

  1. Inspect the existing framework, router, dependency lock and design system. Trace the user journey and API contract; preserve JavaScript/TypeScript conventions. Choose a new client framework only when the interaction requires it.
  2. Keep one owner for each state. Separate local interaction, URL state and server data. Derive values instead of duplicating state; use stable item identity and immutable updates. Introduce a shared store only for actual shared ownership.
  3. In React, keep render pure and Hooks unconditional. Use Effects for external synchronization; include dependencies and cleanup subscriptions/timers or obsolete requests. Put user-triggered mutations in event handlers or the established framework action.
  4. Define loading, empty, error and success states. For forms, retain entered data after failure, show field/global errors and prevent accidental duplicate submission. Handle HTTP errors, stale responses and cache invalidation using the existing data layer.
  5. Use semantic controls, labels, keyboard operation, visible focus and responsive layouts. Render untrusted content as text or use the project's trusted sanitizer. Keep secrets out of the client; UI guards supplement server authorization.
  6. Verify the critical journey and relevant failure recovery in the running interface. Check keyboard/focus and representative viewports; add a focused interaction regression when behavior warrants it. Report browser/backend checks separately from build, lint and type checks.

Focused references

  • React state and effects: for ownership, cleanup or stale-response bugs.
  • API and interaction checks: for forms, transport failures and browser evidence.

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.