agentleFS
malinskibeniaminmalinskibeniamin/skills/frontend-invariants/SKILL.md

frontend-invariants

Skill4 starsChanged 12 days agoMITView on GitHub

Apply stack-independent frontend invariants. Use when writing or reviewing React, TypeScript, or UI code across routing, state, data, and design systems.

The file

We split this skill into the rules it gives an agent

6 rules. About 0 are common, 4 are distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈4

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Never lie: no fake defaults, lossy display of undecodable data, or truthiness hiding numeric zero.

    line 20
  2. Distinctive:

    Put machine truth beside human labels where operators need it.

    line 21
  3. Very specific:

    Use color/spacing/type tokens.

    line 35
  4. Distinctive:

    Search first; fix APIs repeatedly misused by consumers.

    line 37
  5. Distinctive:

    Keep PRs single-purpose; migrations migrate.

    line 50
  6. Very specific:

    Use precise names: no route/file/label acronyms.

    line 51

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “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

For interface, type or shared-state changes, read Poteto.

Override conflicting /stack-registry mechanics. Fix at source; suppress only with a same-line reason: escapes train later sessions.

For TypeScript assertions/widened contracts, use anti-slop: preserve type evidence; safety comments do not justify casts.

Imports: checks.

Rendering

  1. Never lie: no fake defaults, lossy display of undecodable data, or truthiness hiding numeric zero. Degraded states name possible causes, preserve the reported reason, and offer retry.
  2. Put machine truth beside human labels where operators need it; derive labels, never present keys as labels.
  3. Hide unready features; reserve loading layout to prevent CLS.
  4. Handle loading, empty, error, no-permission, disabled and stuck states. Hide empty chrome only on authoritative loaded data: zero diff totals or disabled actions do not prove no work. Preserve errors, untracked work, progress and recovery.

State

  1. URL holds shareable tabs/filters/sort/page; local/session storage holds preferences; server cache holds server data; component state dies with its component.
  2. Push history on section entry; replace within sections.
  3. Scope async state by environment/org/user; await teardown before navigation. Abort stale work or use last-write-wins; read defaults after providers resolve.

Editable server defaults: read override guidance.

Design system

  1. Use color/spacing/type tokens; round one-offs to scale, never hardcode existing tokens.
  2. Fix shared components at source; no forks, inline restyles, or deep selectors. Keep feature rows local, not as single-consumer primitive variants. Verify computed styles across layers and combined flag/theme/interaction variants; low specificity alone does not guarantee utility precedence. Temporary forks need a named defect and upstream ticket.
  3. Search first; fix APIs repeatedly misused by consumers.

Interaction

  1. Buttons act; links navigate and support command-click. Disabled controls expose a reason.
  2. Destructive flows fail closed: enable confirmation only after a fresh zero-reference check; X/Escape/Enter/back respect dirty and in-flight state.
  3. Motion only clarifies state; honor prefers-reduced-motion.

Process

  1. Mock minimally at boundary seams and only for unhappy paths; factories build real types by assignment, not deep merge.
  2. Tests prove user-caused side effects, not rendering; wait for conditions, never durations.
  3. Migrations mechanically freeze old patterns. Feature-flag removal is definition of done.
  4. Keep PRs single-purpose; migrations migrate; deferrals link tickets; dependency bumps and registry syncs ship separately.
  5. Use precise names: no route/file/label acronyms; booleans are predicates.
  6. Cite owners for domain inheritance, units, names and SLAs; never assume UI truth.
  7. Security: no secrets in history; redact logs/replays/dumps; authz fails closed; reads never mutate; audit URL persistence leaks.

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.