agentleFS
mmccallammccalla/coding-agent-skill-library/skills/frontend-state-and-interaction-design/SKILL.md

frontend-state-and-interaction-design

Skill4 starsChanged 5 months agoApache-2.0View on GitHub

Designs predictable states for loading, empty, error, partial, long-running and approval workflows. Use when implementing async UI, agent tasks, or multi-step forms.

The file

We split this skill into the rules it gives an agent

9 rules. About 0 are common, 8 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈8

    Distinctive · estimate

    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 this skill when implementing async flows, long-running jobs, background workflows, forms, dashboards, approval flows, optimistic …

    line 10
  2. Distinctive:

    Test transitions, not just final rendered output.

    line 27
  3. Very specific:

    Consider idle, loading, validating, submitting, running, awaiting_approval, success, partial_success, empty, warning, error, denied, …

    line 31
  4. Distinctive:

    Do not show a spinner with no context for long-running work.

    line 35
  5. Distinctive:

    Do not collapse policy denial, validation failure and system error into the same message.

    line 36
  6. Distinctive:

    Do not lose user-entered data on validation failure.

    line 37
  7. Distinctive:

    Do not use optimistic updates for irreversible or high-risk operations.

    line 38
  8. Distinctive:

    Do not allow double submission unless the action is idempotent.

    line 39
  9. Distinctive:

    Do not hide partial success where some records, rules or batches failed.

    line 40

≈ “Common” is an estimate: at least 1 in 5 of the 213,895 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

Frontend State and Interaction Design

When to use

Use this skill when implementing async flows, long-running jobs, background workflows, forms, dashboards, approval flows, optimistic updates, error recovery, retry actions, partial success states or agent task execution.

Objective

Make frontend behaviour predictable, recoverable and transparent across all meaningful states.

Procedure

  1. Identify all relevant states.
  2. Define state transitions explicitly.
  3. Make the current state visible.
  4. Provide recovery actions for errors where possible.
  5. Preserve user input during recoverable failures.
  6. Distinguish empty, loading, error, denied, partial and complete states.
  7. For long-running jobs, show progress, status, timestamps and next update behaviour.
  8. For destructive or high-risk actions, require confirmation.
  9. For optimistic updates, provide rollback or reconciliation.
  10. Test transitions, not just final rendered output.

Required states

Consider idle, loading, validating, submitting, running, awaiting_approval, success, partial_success, empty, warning, error, denied, cancelled, retrying and stale.

Rules

  • Do not show a spinner with no context for long-running work.
  • Do not collapse policy denial, validation failure and system error into the same message.
  • Do not lose user-entered data on validation failure.
  • Do not use optimistic updates for irreversible or high-risk operations.
  • Do not allow double submission unless the action is idempotent.
  • Do not hide partial success where some records, rules or batches failed.

Optional overlay

For product-specific DataOps/MCP examples, load skills_docs/overlays/mas-dataops-mcp-overlay.md.

References

Verification

  • States and transitions implemented listed.
  • Recovery options and high-risk controls documented.
  • Tests or manual checks performed.
  • Residual interaction risks stated.

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.