thinking-orbs
Skill337 starsChanged 5 months agoApache-2.0View on GitHub
Add accessible animated AI loading and agent-status indicators with the React thinking-orbs library. Use when a chat, copilot, voice, search, generation, or tool-running interface needs a semantic working, searching, solving, listening, composing, or shaping state; when replacing a generic spinner with an AI activity orb; or when implementing the library's size, theme, speed, pause, reduced-motion, and canvas behavior.
- Installs packages
We split this skill into the rules it gives an agent
22 rules. About 0 are common, 8 are distinctive, and 14 are 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.
14
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 10
Use thinking-orbs in React 18+ interfaces that need indeterminate AI activity feedback.
- Very specific: line 12
Use only the tuned 20 or 64 pixel size.
- Very specific: line 13
Keep theme="auto" unless the surrounding surface has a known fixed theme.
- Very specific: line 16
Use paused to freeze the current frame.
- Distinctive: line 17
Treat the orb as indeterminate feedback, never as a progress percentage or completion signal.
- Very specific: line 50
Prefer a truthful generic working state over a visually interesting but inaccurate state.
- Very specific: line 54
Use size={20} inline with text, inside buttons, or in compact status rows.
- Very specific: line 55
Use size={64} at chat-avatar scale, in an empty state, or as the main visual status.
- Very specific: line 76
All other canvas props pass through, including className, style, data-*, event handlers, and ARIA attributes.
- Distinctive: line 80
Keep product phases separate from visual states so the mapping stays explicit:
- Very specific: line 109
Remove the orb on done, error, cancellation, or idle.
- Very specific: line 126
Use aria-live="polite" for ordinary phase changes.
- Very specific: line 139
If no ancestor theme exists, auto follows prefers-color-scheme.
- Distinctive: line 184
Do not rebuild these behaviors in a wrapper.
- Very specific: line 188
Prefer <ThinkingOrb> for product UI.
- Distinctive: line 214
Use the raw API only when another renderer owns the canvas lifecycle.
- Distinctive: line 218
Run the project's typecheck, tests, production build, and git diff --check.
- Distinctive: line 222
Test dark, light, and live theme switching.
- Distinctive: line 223
Test reduced motion and confirm the orb becomes a static representative frame.
- Very specific: line 232
Type error on size: use exactly 20 or 64; do not pass arbitrary dimensions.
- Very specific: line 235
Misleading state: do not show searching during generation or composing during microphone capture.
- Distinctive: line 236
Permanent loading UI: remove the orb when work ends and render the actual terminal state.
≈ “Common” is an estimate: at least 1 in 5 of the 308,232 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.
Files
Thinking Orbs
Core Contract
- Use
thinking-orbsin React 18+ interfaces that need indeterminate AI activity feedback. - Map the real product lifecycle to one of the six shipped states.
- Use only the tuned
20or64pixel size. Do not stretch one preset into another. - Keep
theme="auto"unless the surrounding surface has a known fixed theme. - Pair the orb with concise visible status text when the activity matters to the user.
- Override
aria-labelwith a task-specific label, or hide the orb from assistive technology when adjacent live text already announces the same state. - Use
pausedto freeze the current frame. Do not simulate pause withspeed={0}. - Treat the orb as indeterminate feedback, never as a progress percentage or completion signal.
The package renders monochrome dots on a transparent 2D canvas. It does not expose custom colors, arbitrary sizes, or determinate progress.
Install
Inspect the project package manager, then install:
npm install thinking-orbsThe package declares react and react-dom version 18 or newer as peer dependencies. Import the component and exported types from the package root:
import {
ThinkingOrb,
type OrbSize,
type OrbState,
type OrbTheme,
type ThinkingOrbProps,
} from "thinking-orbs";Choose the State
working— generic tool execution, multi-step work, or an activity without a more precise state.searching— retrieval, web search, file search, or knowledge lookup.solving— reasoning, analysis, calculation, or planning.listening— microphone input, speech capture, or waiting for a spoken turn.composing— writing, summarizing, drafting, or generating a text response.shaping— creating or refining an image, layout, structured artifact, or other formed output.
Prefer a truthful generic working state over a visually interesting but inaccurate state. Change the state only when the underlying activity changes.
Choose the Size
- Use
size={20}inline with text, inside buttons, or in compact status rows. - Use
size={64}at chat-avatar scale, in an empty state, or as the main visual status.
The presets have different dot counts, dot sizes, and speed tuning. They are separate designs rather than a scale factor. If the layout needs more surrounding space, size the wrapper instead of applying CSS transforms to the canvas.
Basic Usage
import { ThinkingOrb } from "thinking-orbs";
export function AgentStatus() {
return (
<ThinkingOrb
state="searching"
size={20}
theme="auto"
aria-label="Searching project files…"
/>
);
}All other canvas props pass through, including className, style, data-*, event handlers, and ARIA attributes.
Model the Product Lifecycle
Keep product phases separate from visual states so the mapping stays explicit:
import { ThinkingOrb, type OrbState } from "thinking-orbs";
type AgentPhase =
| "idle"
| "retrieving"
| "reasoning"
| "writing"
| "creating"
| "done"
| "error";
const ORB_BY_PHASE: Partial<Record<AgentPhase, OrbState>> = {
retrieving: "searching",
reasoning: "solving",
writing: "composing",
creating: "shaping",
};
export function AgentActivity({ phase }: { phase: AgentPhase }) {
const state = ORB_BY_PHASE[phase];
if (!state) return null;
return <ThinkingOrb state={state} size={20} />;
}Remove the orb on done, error, cancellation, or idle. Show the appropriate result, retry, or error UI instead of leaving the last activity animation running.
Announce Status Once
The component defaults to role="img" with a per-state label such as “Searching…”. When visible text describes the same state, make the text the single announcement source:
export function LiveAgentStatus() {
return (
<div role="status" aria-live="polite" className="agent-status">
<ThinkingOrb state="solving" size={20} aria-hidden="true" />
<span>Reviewing the repository…</span>
</div>
);
}Use aria-live="polite" for ordinary phase changes. Avoid rapid label churn. Do not add another hidden live region when role="status" already owns the announcement.
Theme
Use one of:
<ThinkingOrb theme="auto" />
<ThinkingOrb theme="dark" />
<ThinkingOrb theme="light" />autofirst checks an ancestordata-theme="dark|light"attribute ordark/lightclass.- If no ancestor theme exists,
autofollowsprefers-color-scheme. - Theme changes update live.
darkmeans light dots intended for a dark background.lightmeans dark dots intended for a light background.
The canvas is transparent. Verify contrast against the actual surface rather than the page root alone.
Speed and Pause
<ThinkingOrb state="working" speed={0.85} />
<ThinkingOrb state="composing" paused={isWaitingForApproval} />speed multiplies the baked speed of the selected state and size. Start at 1; use roughly 0.75–1.25 for subtle product tuning. Extreme values can make the hand-tuned motion feel frantic or stalled.
paused freezes the current frame while retaining the visual status. Remove the component when the activity has actually ended.
Next.js and Client Rendering
The component uses React effects, canvas, requestAnimationFrame, media queries, and observers. Keep the package import behind a client boundary in the Next.js App Router:
"use client";
import { ThinkingOrb } from "thinking-orbs";
export function ThinkingStatus() {
return <ThinkingOrb state="working" size={20} />;
}The library is SSR-safe because it paints only on the client after resolving the theme. A client boundary is still required where the framework enforces server and client component separation.
Built-In Runtime Behavior
- Draws with plain Canvas 2D arcs; no WebGL or SVG filters.
- Caps device pixel ratio at
2. - Uses one
requestAnimationFrameloop per visible instance. - Uses the shared
performance.now()clock so multiple orbs stay in phase. - Pauses when the canvas scrolls offscreen through
IntersectionObserver. - Pauses when the browser tab is hidden.
- Renders one deterministic static frame under
prefers-reduced-motion: reduce. - Continues following live theme changes in reduced-motion mode.
Do not rebuild these behaviors in a wrapper. Add product state management and layout around the component, not a second animation loop.
Power-User Canvas API
Prefer <ThinkingOrb> for product UI. The package also exports its resolved presets and raw frame painters for a custom canvas outside React:
import { MODE_DRAWS, resolvePreset } from "thinking-orbs";
const { mode, speed, opts } = resolvePreset("searching", 64);
const drawFrame = MODE_DRAWS[mode];
drawFrame(
context,
64,
(performance.now() / 1000) * speed,
true, // true draws light ink for a dark surface
opts,
);STATE_TO_MODE exposes the internal mapping:
working→orbitssearching→globesolving→rubiklistening→wavecomposing→ribbonshaping→morph
Use the raw API only when another renderer owns the canvas lifecycle. It provides a frame painter, not component behavior. Reimplement DPR sizing, clearing, animation scheduling, pausing, theme resolution, reduced motion, visibility handling, cleanup, and accessibility when bypassing <ThinkingOrb>.
Verification
Run the project's typecheck, tests, production build, and git diff --check. Then verify in a real browser:
- Trigger every product phase and confirm the mapped orb state is truthful.
- Confirm
20and64pixel instances are crisp without CSS scaling. - Test dark, light, and live theme switching.
- Test reduced motion and confirm the orb becomes a static representative frame.
- Scroll the orb offscreen and return; confirm it resumes without visible breakage.
- Hide and restore the tab; confirm animation resumes.
- Inspect accessibility: announce the status exactly once and use a task-specific label.
- Confirm the orb disappears on success, error, cancellation, and idle.
- Confirm no console errors, hydration warnings, or layout shifts occur.
Common Pitfalls
- Type error on size: use exactly
20or64; do not pass arbitrary dimensions. - Wrong contrast: remember
darktargets dark backgrounds and therefore draws light ink. - Duplicate screen-reader output: hide the canvas when adjacent
role="status"text already announces the task. - Misleading state: do not show
searchingduring generation orcomposingduring microphone capture. - Permanent loading UI: remove the orb when work ends and render the actual terminal state.
- Hydration or server-component error: move the import into a client component.
- Brand color requested: the public API is monochrome; choose another loader or make an intentional library fork instead of relying on unsupported styling.
Handoff
Report the mapped product phases, chosen size, theme mode, accessible label strategy, reduced-motion behavior, and build/browser verification. Distinguish local implementation from a deployed release.
Other versions1 project uses a version of this.
Word for word · 1
- florattu/claude-skills★ 0100% same
Edited · 0
None found.
Wrote their own version · 0
None found.
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository70 other files it gives its agents.
- vercel-react-best-practices/AGENTS.mdAGENTS.md
- adversarial-reviewSkill
- analytics-trackingSkill
- animejsSkill
- apple-designSkill
- app-store-screenshotsSkill
- beam-glow-statesSkill
- beautiful-shadowsSkill
- better-accessibilitySkill
- better-colorsSkill
- better-interfaceSkill
- better-layoutSkill
- better-typographySkill
- better-uiSkill
- better-writingSkill
- competitor-alternativesSkill
- conductor-rewrite-performanceSkill
- container-linesSkill
- content-strategySkill
- contribute-catalogSkill
- copy-editingSkill
- copywritingSkill
- corner-diagonalsSkill
- css-animationsSkill
- css-border-gradientSkill
- documentary-brutalist-agencySkill
- editorial-portfolio-chaptersSkill
- emil-design-engSkill
- framed-grid-layoutSkill
- frontend-designSkill
- glass-dark-uiSkill
- gsapSkill
- hyperframes-cliSkill
- hyperframes-mediaSkill
- hyperframes-registrySkill
- hyperframesSkill
- impeccableSkill
- interface-reviewSkill
- landing-pageSkill
- linear-local-first-architectureSkill
- liquid-metal-borderSkill
- lottieSkill
- mesh-gradient-dark-blue-cleanSkill
- minimal-zine-posterSkill
- ogilvy-copywritingSkill
- operational-enterprise-aiSkill
- page-croSkill
- pricing-pageSkill
- product-proof-saasSkill
- programmatic-seoSkill
- progressive-blurSkill
- remotion-to-hyperframesSkill
- reveal-hover-effectSkill
- schema-markupSkill
- seo-auditSkill
- service-booking-flowSkill
- shaders-cursor-ripplesSkill
- skeuomorphic-uiSkill
- staggered-word-revealSkill
- stop-slopSkill
- The first 60 shown.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
Reviews can't be read right now.
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.

