data-fetching-integrity
Detect and prevent duplicate/redundant API calls in SPA/SSG frontends — tool-agnostic.
Skill by Dev-Toolbelt
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/dev-toolbelt-data-fetching-integrity
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: backend, data
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md and code. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/data-fetching-integrity
What's inside
- Skill name
data-fetching-integrity- Description
- Detect and prevent duplicate/redundant API calls in SPA/SSG frontends — tool-agnostic.
- License
- MIT
- Instructions
- 69 lines in SKILL.md · view on GitHub
Files (1)
- SKILL.md
SKILL.md (first lines)
# Data-Fetching Integrity Duplicate and redundant API calls waste the user's bandwidth and put unnecessary load on the backend. This is a **behavioral discipline**, not a library feature — it applies whether the project uses TanStack Query, SWR, Apollo, RTK Query, or plain `fetch`/`axios` with no library at all. Detection and prevention below are framework-agnostic; do not gate this skill on any specific tool being present. ## When to Load Any frontend task in a SPA (client-rendered) or SSG (static-generated, hydrated client-side) project where components fetch data from an API — implementing, reviewing, or validating. ## Symptoms to Detect Treat each of these as a concrete, checkable defect — not a stylistic preference: | Symptom | How it shows up | Why it's a defect | |---|---|---| | **Double-fire on mount** | The same request fires twice when a component mounts (common under React `StrictMode`'s double-invoke, or an effect with no guard) | Same data fetched twice for one render | | **Re-fetch on every render** | A fetch call lives in the render body or in an effect with a dependency array that changes every render (inline object/array/function literal, unstable callback) | Request rate scales with render count instead of with actual data needs | | **Sibling components fetching the same resource independently** | Two or more components each call the same endpoint with the same parameters, with no shared cache or lifting of the fetch to a common ancestor | N requests for 1 piece of data, and no guarantee they resolve to the same value | | **Avoidable request waterfalls** | Component B's fetch depends on Component A's fetch result, but A and B are rendered sequentially instead of A's data being fetched once and passed down, or B's independent data being fetched in parallel | Total load time is the sum of round-trips instead of the max | | **No de-duplication for concurrent identical requests** | Multiple call sites trigger the same in-flight request (same URL + params) before the first resolves, and each gets its own network round-trip | N-1 of the N requests are pure waste | | **Fetch on every keystroke/scroll without debouncing** | Search-as-you-type, infinite scroll, or filter inputs call the API on every event instead of being debounced/throttled | Request volume scales with input events, not with intent | | **Re-fetch after navigation back to an already-fetched view** | Returning to a screen re-fetches data that was already loaded moments ago, with no cache or staleness check | Redundant round-trip for data that hasn't changed | ## Root Causes (what to fix, not just what to flag) - Fetch logic embedded directly in a component's lifecycle/effect with no ownership boundary — every consumer re-implements its own fetch instead of sharing one - Missing or incorrect effect dependency arrays (fires more often than the data actually changes) - No request-key based de-duplication (in-flight requests for the same key aren't shared) - No cache layer at all, or a cache layer present but bypassed by hand-rolled component-local state that shadows it (see `skills/architecture/frontend-patterns/SKILL.md` and the Server State & Data Fetching rules already required of `frontend-developer`) - Data-fetching triggered from multiple layers for the same event (e.g. a parent effect and a child effect both fetching in response to the same route change) ## Prevention Rules Apply these regardless of stack: 1. **One fetch, one owner.** A given piece of server data has exactly one place responsible for fetching it — either the data-fetching library's cache (preferred, see the Server State table) or, in its absence, the lowest common ancestor that all consumers read from via props/context. Siblings never independently re-fetch the same resource. 2. **Guard effects against extra invocations.** Verify the effect's dependency array only changes when the fetch actually needs to re-run; don't pass inline literals that are recreated every render. 3. **De-duplicate concurrent identical requests.** If no server-state library owns this, key in-flight requests (e.g. a request-key → in-flight-promise map) so a second identical call attaches to the first instead of firing a new one. 4. **Debounce/throttle user-driven fetches.** Any fetch triggered by typing, scrolling, or resize events must be debounced or throttled — never fire-per-event. 5. **Respect freshness, don't blindly re-fetch.** Navigating back to a view with recently-fetched data should reuse it (per the library's staleness window, or an explicit TTL in a hand-rolled cache) rather than re-fetching unconditionally. 6. **Parallelize independent fetches.** If two pieces of data don't depend on each other, fetch them concurrently — never sequence them just because the code was written top-to-bottom. ## Verification (how to confirm the fix worked) Open the browser's network panel (or equivalent devtools) for the flow under test and confirm: - No two identical requests (same method + URL + params) within the same user action - No request count that grows linearly with unrelated re-renders - No sequential waterfall for data that has no actual dependency between the two calls
From Dev-Toolbelt/dev-team-agents, MIT.
More from Dev-Toolbelt/dev-team-agents
- 0.623score
design-patterns
Dev-Toolbelt
Design patterns — KISS, YAGNI, DRY, SOLID, GoF, DDD reference.
SkillAFreshness: A★ 7Claude Code +9 - 0.620score
graphql
Dev-Toolbelt
GraphQL — schema, resolvers, N+1/DataLoader, pagination.
SkillAFreshness: A★ 7Claude Code +9 - 0.618score
api-design
Dev-Toolbelt
REST/GraphQL design — naming, status codes, pagination, idempotency.
SkillAFreshness: A★ 7Claude Code +9 - 0.618score
api-versioning
Dev-Toolbelt
API versioning — compatibility rules and deprecation lifecycle.
SkillAFreshness: A★ 7Claude Code +9 - 0.618score
architecture-docs
Dev-Toolbelt
Where architecture documents live, what each contains, and the conformance report format.
SkillAFreshness: A★ 7Claude Code +9 - 0.618score
async-jobs
Dev-Toolbelt
Async jobs — idempotency, retry strategy, DLQ, observability.
SkillAFreshness: A★ 7Claude Code +9 - 0.618score
i18n
Dev-Toolbelt
i18n/l10n — locale detection, translations, pluralization, RTL.
SkillAFreshness: A★ 7Claude Code +9 - 0.618score
component-patterns
Dev-Toolbelt
Component patterns — container/presentational for React/Vue/Angular.
SkillAFreshness: A★ 7Claude Code +9 - 0.618score
css-quality
Dev-Toolbelt
CSS quality — specificity, magic numbers, responsive.
SkillAFreshness: A★ 7Claude Code +9 - 0.618score
event-driven
Dev-Toolbelt
Event-driven — sourcing, CQRS, saga, idempotency, schema registry.
SkillAFreshness: A★ 7Claude Code +9 - 0.618score
form-handling
Dev-Toolbelt
Form design — state, validation, error feedback.
SkillAFreshness: A★ 7Claude Code +9 - 0.618score
frontend-patterns
Dev-Toolbelt
Frontend patterns — debounce, double-submit prevention, error boundaries.
SkillAFreshness: A★ 7Claude Code +9
Signals
- Stars
- 7
- Forks
- 0
- Open issues
- 0
- Last commit (this folder)
- Oct 18, 2026 (10 days ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/Dev-Toolbelt/dev-team-agents
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from Dev-Toolbelt
- 0.623score
design-patterns
Dev-Toolbelt
Design patterns — KISS, YAGNI, DRY, SOLID, GoF, DDD reference.
SkillAFreshness: A★ 7Claude Code +9 - 0.620score
graphql
Dev-Toolbelt
GraphQL — schema, resolvers, N+1/DataLoader, pagination.
SkillAFreshness: A★ 7Claude Code +9 - 0.618score
api-design
Dev-Toolbelt
REST/GraphQL design — naming, status codes, pagination, idempotency.
SkillAFreshness: A★ 7Claude Code +9 - 0.618score
architecture-docs
Dev-Toolbelt
Where architecture documents live, what each contains, and the conformance report format.
SkillAFreshness: A★ 7Claude Code +9 - 0.618score
async-jobs
Dev-Toolbelt
Async jobs — idempotency, retry strategy, DLQ, observability.
SkillAFreshness: A★ 7Claude Code +9 - 0.618score
api-versioning
Dev-Toolbelt
API versioning — compatibility rules and deprecation lifecycle.
SkillAFreshness: A★ 7Claude Code +9
Cite this page
data-fetching-integrity skill. Agent Mart. https://agentmart.dev/skills/dev-toolbelt-data-fetching-integrity (last updated 2026-10-24)