agentleFS
adymireadymire/CraftLayer/skills/frontend-engineering/SKILL.md

frontend-engineering

Skill0 starsChanged 3 days agoMITView on GitHub

Implement frontend features reliably within the existing application architecture, conventions, and accessibility requirements.

14 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use observability, api-design and 1 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.
  • OpenAISkill

    observability

    Vercel Observability expert guidance — Drains (logs, traces, speed insights, web analytics), Web Analytics, Speed Insights, runtime logs, custom events, OpenTelemetry integration, and monitoring dashboards. Use when instrumenting, debugging, or optimizing application performance and user experience on Vercel.

    Also in 3 projects that use this

  • MicrosoftSkill

    api-design

    Guide for designing and documenting RESTful APIs. Use when asked to design an API, create endpoints, or document an API.

    Also in 4 projects that use this

  • Microsoft AzureSkill

    git-workflow

    Squad branching model: dev-first workflow with insiders preview channel

    Also in 3 projects that use this

The file

Show its rules and text

We split this skill into the rules it gives an agent

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

  • 0

    Common

    Most of the 10 edited versions we read keep these.

  • 13

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

    Use for user-facing web changes involving UI architecture, routing, state, forms, data loading, API integration, or frontend reliability.

    line 10
  2. Distinctive:

    Do not introduce a new framework or state library for a small feature when the current stack already solves the problem.

    line 15
  3. Distinctive:

    Read package scripts and lockfile, app entry points, routes, components, state/data patterns, API contracts, test setup, styling, and …

    line 21
  4. Distinctive:

    Keep view rendering separate from side effects where the codebase does so.

    line 30
  5. Distinctive:

    Use semantic HTML, labels, keyboard behavior, and visible focus.

    line 34
  6. Distinctive:

    Add or update focused tests for behavior, not implementation details.

    line 37
  7. Distinctive:

    Run the project's relevant lint, type-check, tests, and build.

    line 38
  8. Very specific:

    Avoid any, unsafe casts, duplicated source-of-truth state, and success-shaped error fallbacks.

    line 43
  9. Distinctive:

    Do not silently swallow exceptions or hide failed actions.

    line 46
  10. Distinctive:

    Do not add a dependency without a concrete capability gap.

    line 47
  11. Distinctive:

    Use typed results and explicit error handling at an API boundary:

    line 51
  12. Distinctive:

    Use the project's runtime schema library for larger response contracts.

    line 74
  13. Distinctive:

    Check correct behavior for success and failure, request races where applicable, keyboard and screen-reader semantics, responsive states, …

    line 85
  14. Distinctive:

    Use the frontend execution guide for a feature spanning data flow, async state, or multiple UI states.

    line 91

“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.

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

Frontend Engineering

When to use

Use for user-facing web changes involving UI architecture, routing, state, forms, data loading, API integration, or frontend reliability.

When not to use

Do not introduce a new framework or state library for a small feature when the current stack already solves the problem. Do not broaden a visual task into an unrelated application rewrite.

Inputs and assumptions

Read package scripts and lockfile, app entry points, routes, components, state/data patterns, API contracts, test setup, styling, and accessibility conventions before editing.

Workflow

  1. Trace the existing feature flow and define expected input, output, loading, empty, error, and success behavior.
  2. Choose the narrowest module boundary and use existing typed contracts.
  3. Keep view rendering separate from side effects where the codebase does so; centralize repeated business rules in an established domain layer.
  4. Handle async cancellation, stale results, errors, and duplicate submits according to existing patterns.
  5. Use semantic HTML, labels, keyboard behavior, and visible focus.
  6. Preserve responsive behavior; test long text, empty data, and narrow screens when the UI is affected.
  7. Add or update focused tests for behavior, not implementation details.
  8. Run the project's relevant lint, type-check, tests, and build.

Decision rules

  • Respect the existing framework and package manager.
  • Avoid any, unsafe casts, duplicated source-of-truth state, and success-shaped error fallbacks.
  • Validate untrusted data at system boundaries.
  • Do not silently swallow exceptions or hide failed actions.
  • Do not add a dependency without a concrete capability gap.

JavaScript and TypeScript example

Use typed results and explicit error handling at an API boundary:

type UserSummary = { id: string; displayName: string };

async function loadUser(id: string): Promise<UserSummary> {
  const response = await fetch(`/api/users/${encodeURIComponent(id)}`);
  if (!response.ok) throw new Error(`User request failed: ${response.status}`);
  const data: unknown = await response.json();
  if (
    typeof data !== "object" ||
    data === null ||
    !("id" in data) ||
    typeof data.id !== "string" ||
    !("displayName" in data) ||
    typeof data.displayName !== "string"
  ) {
    throw new Error("User response has an invalid shape");
  }
  return { id: data.id, displayName: data.displayName };
}

Use the project's runtime schema library for larger response contracts.

Common failures

  • Fetching the same data in multiple components with conflicting state.
  • Ignoring rejected promises or returning fake defaults.
  • Adding interaction handlers to non-semantic elements.
  • Testing only the happy path or only snapshots.

Validation

Check correct behavior for success and failure, request races where applicable, keyboard and screen-reader semantics, responsive states, type safety, and project-standard tests/build.

Supporting guide

Use the frontend execution guide for a feature spanning data flow, async state, or multiple UI states; keep small changes within the established local pattern.

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.