# rattles-terminal-spinners

A Claude skill covering rattles, a minimal Rust library for terminal spinners. Useful when a CLI needs a loading indicator without extra dependencies.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode · 497 installs · ★ 88
- Author: reason-machines
- License: not stated · policy=link-only · description only; the file stays with the author
- Source: https://github.com/reason-machines/trending-skills/tree/HEAD/skills/rattles-terminal-spinners/SKILL.md
- Updated: 2026-10-09
- HTML: https://affpapa.org/en/nevibecode/skills/rattles-terminal-spinners

## What it does

The skill walks through how rattles works and how to wire it into a project. A spinner here is a Rattler: a set of frames plus an interval. It holds no state, so you can build one inside a render loop, and that costs almost nothing.

Presets are grouped by category — arrows, ASCII, braille, emoji — and the `rattle!` macro defines custom keyframes at compile time. For environments without the standard library there is `TickedRattler`, which keeps state and advances on each `tick()` call. Stateless alternatives exist too: pick a frame by index, or pass an elapsed duration from your own timer. A separate section covers ratatui, where a Rattler is passed by reference and needs no `Arc<Mutex<>>` wrapper.

Add the library with `cargo add rattles`, or with `--no-default-features` for `no_std`. If the spinner freezes on its first frame, check that you flush stdout and overwrite the line with `\r` rather than `\n`.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add reason-machines/trending-skills --skill rattles-terminal-spinners -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/rattles-terminal-spinners/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/rattles-terminal-spinners/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add reason-machines/trending-skills --skill rattles-terminal-spinners -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/rattles-terminal-spinners/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add reason-machines/trending-skills --skill rattles-terminal-spinners -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/rattles-terminal-spinners/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install reason-machines/trending-skills rattles-terminal-spinners
```

2. **Manually: put the files in place**
- File: `.github/skills/rattles-terminal-spinners/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add reason-machines/trending-skills --skill rattles-terminal-spinners -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/reason-machines/trending-skills --path skills/rattles-terminal-spinners
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/rattles-terminal-spinners/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add reason-machines/trending-skills --skill rattles-terminal-spinners -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/reason-machines/trending-skills/tree/HEAD/skills/rattles-terminal-spinners/SKILL.md

## When to use it
- add a loading indicator to a Rust command-line tool
- pick a ready-made frame set instead of drawing a spinner by hand
- animate a spinner where the standard library is unavailable
- embed a spinner in a ratatui interface
- define custom keyframes and timing with a macro

## Example prompts
- Add a rattles spinner to my Rust CLI using the dots preset
- How do I set up rattles in a no_std project?
- Create a custom spinner with the rattle! macro using three frames

## Similar
- [ratatui-tui](https://affpapa.org/en/nevibecode/skills/ratatui-tui.md) — skill · 722 installs
- [terminal-screenshot](https://affpapa.org/en/nevibecode/skills/terminal-screenshot.md) — skill · 433 installs
- [tui-design](https://affpapa.org/en/nevibecode/skills/tui-design.md) — skill · 1300 installs
- [domain-cli](https://affpapa.org/en/nevibecode/skills/domain-cli.md) — skill · 3100 installs
- [domain-embedded](https://affpapa.org/en/nevibecode/skills/domain-embedded.md) — skill · 2900 installs
- [rust-no-std](https://affpapa.org/en/nevibecode/skills/rust-no-std.md) — skill · 474 installs

From the same set: [reason-machines/trending-skills](https://affpapa.org/en/nevibecode/by/reason-machines/trending-skills.md) — 49 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
