#601

Global Rank · of 601 Skills

tanstack-pacer AI Agent Skill

View Source: oakoss/agent-skills

Safe

Installation

npx skills add oakoss/agent-skills --skill tanstack-pacer

42

Installs

TanStack Pacer

Overview

TanStack Pacer is a lightweight, type-safe library for controlling function execution timing through debouncing, throttling, rate limiting, queuing, and batching. It provides framework-agnostic core classes with dedicated React hooks at multiple abstraction levels (instance, callback, state, value).

When to use: Debouncing search input, throttling scroll/resize handlers, enforcing API rate limits, queuing async tasks with concurrency control, batching multiple operations into single requests.

When NOT to use: Simple one-off delays (use setTimeout), server-side rate limiting at the infrastructure level (use middleware/API gateway), complex job scheduling (use a task queue like BullMQ).

Quick Reference

Pattern API Key Points
Debounce function Debouncer / debounce(fn, opts) Waits for inactivity; no maxWait option by design
Throttle function Throttler / throttle(fn, opts) Even spacing; leading and trailing both default true
Rate limit RateLimiter / rateLimit(fn, opts) Fixed or sliding window; rejects calls over limit
Queue items Queuer / queue(fn, opts) FIFO default; supports LIFO, priority, expiration
Async queue AsyncQueuer / asyncQueue(fn, opts) Concurrency control, retry, error callbacks
Async batch AsyncBatcher / asyncBatch(fn, opts) Collects items, processes as batch after wait/maxSize
React debounce useDebouncer / useDebouncedCallback Instance hook vs simple callback hook
React throttle useThrottler / useThrottledCallback Instance hook vs simple callback hook
React rate limit useRateLimiter / useRateLimitedCallback Instance hook vs simple callback hook
React queue useQueuer / useQueuedState Instance hook vs state-integrated hook
React async queue useAsyncQueuer / useAsyncQueuedState Concurrency + state management
React batch useBatcher / useAsyncBatcher Sync and async batching hooks
State hooks useDebouncedState, useThrottledState Integrate with React state directly
Value hooks useDebouncedValue, useThrottledValue Create derived debounced/throttled values

Common Mistakes

Mistake Correct Pattern
Using maxWait on Debouncer Debouncer has no maxWait; use Throttler for evenly spaced execution
Creating instances inside render Create with hooks (useDebouncer, useThrottler) to manage lifecycle
Ignoring maybeExecute return Rate limiter and throttler may reject calls; check state or use callbacks
Using debounce when throttle is needed Debounce waits for pause; throttle guarantees max-once-per-interval
Not cleaning up on unmount React hooks handle cleanup automatically; manual instances need cancel()
Using Queuer when items can be dropped Queuers process every item; use throttle/debounce if dropping is acceptable
Fixed window when sliding is needed Fixed windows allow bursts at boundaries; sliding window gives smoother rate
Forgetting onReject on RateLimiter Rejected calls are silent by default; add onReject for user feedback
Not passing enabled: false to disable All utilities support enabled option to temporarily disable processing

Delegation

If the tanstack-query skill is available, delegate data fetching and cache management tasks to it. TanStack Pacer complements Query for controlling request frequency.
Otherwise, recommend: npx skills add oakoss/agent-skills --skill tanstack-query

  • Execution timing patterns: Use this skill
  • Data fetching and caching: Delegate to tanstack-query
  • Component architecture: Delegate to framework-specific skills

References

Installs

Installs 42
Global Rank #601 of 601

Security Audit

ath Safe
socket Safe
Alerts: 0 Score: 90
snyk Low
EU EU-Hosted Inference API

Power your AI Agents with the best open-source models.

Drop-in OpenAI-compatible API. No data leaves Europe.

Explore Inference API

GLM

GLM 5

$1.00 / $3.20

per M tokens

Kimi

Kimi K2.5

$0.60 / $2.80

per M tokens

MiniMax

MiniMax M2.5

$0.30 / $1.20

per M tokens

Qwen

Qwen3.5 122B

$0.40 / $3.00

per M tokens

How to use this skill

1

Install tanstack-pacer by running npx skills add oakoss/agent-skills --skill tanstack-pacer in your project directory. Run the install command above in your project directory. The skill file will be downloaded from GitHub and placed in your project.

2

No configuration needed. Your AI agent (Claude Code, Cursor, Windsurf, etc.) automatically detects installed skills and uses them as context when generating code.

3

The skill enhances your agent's understanding of tanstack-pacer, helping it follow established patterns, avoid common mistakes, and produce production-ready output.

What you get

Skills are plain-text instruction files — not executable code. They encode expert knowledge about frameworks, languages, or tools that your AI agent reads to improve its output. This means zero runtime overhead, no dependency conflicts, and full transparency: you can read and review every instruction before installing.

Compatibility

This skill works with any AI coding agent that supports the skills.sh format, including Claude Code (Anthropic), Cursor, Windsurf, Cline, Aider, and other tools that read project-level context files. Skills are framework-agnostic at the transport level — the content inside determines which language or framework it applies to.

Data sourced from the skills.sh registry and GitHub. Install counts and security audits are updated regularly.

EU Made in Europe

Chat with 100+ AI Models in one App.

Use Claude, ChatGPT, Gemini alongside with EU-Hosted Models like Deepseek, GLM-5, Kimi K2.5 and many more.

Customer Support