agentleFS
salmandevsalmandev/everything-gemini/skills/agent-ui-micro-components/SKILL.md

agent-ui-micro-components

Skill2 starsChanged 33 days agoApache-2.0View on GitHub

Implements responsive, accessible UI micro-components and interactive feedback states (determinate/indeterminate progress bars, circular gauges, skeleton shimmer loaders, streaming LLM cursors, and CLI terminal spinners). Use when implementing loading states, progress bars, zero-CLS skeleton loaders, or terminal progress indicators.

The file

We split this skill into the rules it gives an agent

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

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 7

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Do NOT use hardcoded fake percentages.

    line 17
  2. Very specific:

    Use a traveling gradient shimmer or oscillating pulse bar (@keyframes astryx-indeterminate).

    line 19
  3. Very specific:

    Subtle Shimmer: Use a 90-degree gradient wave passing across a muted surface background (background-size: 200% 100%).

    line 23
  4. Very specific:

    A11y: Add aria-hidden="true" so screen readers ignore placeholder geometry, accompanied by an aria-live="polite" region describing the …

    line 24
  5. Very specific:

    SVG Stroke Dasharray: Use strokeDasharray and strokeDashoffset on an SVG circle element for sub-pixel accuracy: $$\text{offset} = C - (C …

    line 31
  6. Very specific:

    GPU Accelerated: Ensure transform: rotate(-90deg) to start from the top (12 o'clock).

    line 33
  7. Very specific:

    Use ANSI escape characters (\r carriage return) and UTF-8 frames (⠋⠙⠹⠸⠼⠴⠦⠧⠇⠏).

    line 37
  8. Very specific:

    When authoring CLI scripts in bin/ or scripts/:

    line 70

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

Agent UI Micro-Components: Progress, Loaders & Feedback Engineering

The agent-ui-micro-components skill instructs autonomous AI agents on engineering realistic, accessible, and delightful micro-interaction feedback states. When AI agents build applications, they frequently output static pages that feel frozen during asynchronous operations. This skill enforces deterministic patterns for progress bars, loaders, skeleton screens, and terminal spinners across both web and CLI environments.

1. The 5 Core Micro-Feedback Patterns

A. Determinate vs. Indeterminate Progress Bars

  • Determinate (Known duration/percentage, e.g. file uploads, multi-stage pipelines):
    • Requires aria-valuenow, aria-valuemin="0", aria-valuemax="100".
    • Animate width transitions with linear or ease-out curves (transition: width 200ms ease-out).
  • Indeterminate (Unknown duration, e.g. waiting for API or LLM cold start):
    • Do NOT use hardcoded fake percentages.
    • Omit aria-valuenow (or set aria-busy="true").
    • Use a traveling gradient shimmer or oscillating pulse bar (@keyframes astryx-indeterminate).

B. Skeleton Loaders (Eliminating Cumulative Layout Shift)

  • Zero-CLS Mandate: The skeleton loader's dimensions must match the expected content's bounding box ($1:1$ ratio).
  • Subtle Shimmer: Use a 90-degree gradient wave passing across a muted surface background (background-size: 200% 100%).
  • A11y: Add aria-hidden="true" so screen readers ignore placeholder geometry, accompanied by an aria-live="polite" region describing the background fetch.

C. Streaming LLM Token Loaders

  • Pulsing Caret: A 2px blinking cursor (animation: blink 1s step-end infinite) attached directly to the last stream token.
  • Optimistic Chunk Rendering: Render streamed tokens into an existing container without repainting the entire card or viewport.

D. Circular Progress & Gauges

  • SVG Stroke Dasharray: Use strokeDasharray and strokeDashoffset on an SVG circle element for sub-pixel accuracy: $$\text{offset} = C - (C \times \text{percentage}) \quad \text{where } C = 2\pi r$$
  • GPU Accelerated: Ensure transform: rotate(-90deg) to start from the top (12 o'clock).

E. Terminal & CLI Multi-Step Spinners

  • In CLI tools, never leave the terminal silent for more than 500ms.
  • Use ANSI escape characters (\r carriage return) and UTF-8 frames (⠋⠙⠹⠸⠼⠴⠦⠧⠇⠏).
  • Clear the line upon completion and print a green checkmark ✔ or red cross ✖.

2. Standard CSS Animation Keyframes

/* Indeterminate Progress Bar Oscillator */
@keyframes astryx-indeterminate {
  0% { transform: translateX(-100%); }
  50% { transform: translateX(50%); }
  100% { transform: translateX(200%); }
}

/* Skeleton Shimmer Wave */
@keyframes astryx-shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

/* Spinner Rotation */
@keyframes astryx-spin {
  to { transform: rotate(360deg); }
}

/* Streaming Caret Blink */
@keyframes astryx-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

3. Terminal Node.js CLI Spinner Blueprint

When authoring CLI scripts in bin/ or scripts/:

class TerminalSpinner {
  constructor(text) {
    this.frames = ['⠋', '⠙', '⠹', '⠸', '⠼', '⠴', '⠦', '⠧', '⠇', '⠏'];
    this.text = text;
    this.index = 0;
    this.timer = null;
  }
  start() {
    process.stdout.write('\x1B[?25l'); // Hide cursor
    this.timer = setInterval(() => {
      process.stdout.write(`\r\x1b[36m${this.frames[this.index]}\x1b[0m ${this.text}`);
      this.index = (this.index + 1) % this.frames.length;
    }, 80);
  }
  stop(success = true, message = null) {
    clearInterval(this.timer);
    process.stdout.write('\r\x1b[K'); // Clear line
    process.stdout.write('\x1B[?25h'); // Show cursor
    const icon = success ? '\x1b[32m✔\x1b[0m' : '\x1b[31m✖\x1b[0m';
    console.log(`${icon} ${message || this.text}`);
  }
}

Invariants Checklist

  • No layout shift when loading transitions to loaded state (CLS $< 0.1$).
  • Progress bars have semantic role="progressbar" with valid ARIA attributes.
  • Spinners include an off-screen accessible label (.sr-only) for screen readers.
  • Animations honor prefers-reduced-motion: reduce.
  • CLI commands provide active heartbeat feedback during operations $>500$ms.

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.