data-fetching

data-fetching is a skill for Claude Code from lukedj78/dev-flow. It costs 215 tokens per session (7,542 once invoked), scanned A, original, MIT.

A set of rules for loading data in Next.js 16 applications that use the App Router. It favors server-rendered components and URL parameters for filters, while reserving client-side fetching tools for cases that need them.

In plain words
What is it for?
Use it to review or design data reads, filters, server components, route handlers, and client components in a Next.js 16 app.
Why use it?
It prevents unnecessary client-side effects and server actions from being used for reads, which can reduce server rendering, streaming, caching, and request reuse.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the dev-flow plugin — 56 skills shipped together

Good fit Use it to review or design data reads, filters, server components, route handlers, and client components in a Next.js 16 app.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/lukedj78/dev-flow/data-fetching
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add lukedj78/dev-flow --skill data-fetching
Clone the repo
git clone --depth 1 https://github.com/lukedj78/dev-flow

Made for: Claude Code.

Or install dev-flow, the plugin that ships this one along with the rest of its 56 skills.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for data-fetching

README.md
[![agentmods](https://agentmods.dev/badge/skills/lukedj78/dev-flow/data-fetching/github.svg)](https://agentmods.dev/skills/lukedj78/dev-flow/data-fetching)
Your own site
<a href="https://agentmods.dev/skills/lukedj78/dev-flow/data-fetching"><img src="https://agentmods.dev/badge/skills/lukedj78/dev-flow/data-fetching/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for data-fetching

Your own site · 80×15
<a href="https://agentmods.dev/skills/lukedj78/dev-flow/data-fetching"><img src="https://agentmods.dev/badge/skills/lukedj78/dev-flow/data-fetching.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 215 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 7,542 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 2 findings, up to high

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • high Anti-Refusal · line 8
    Skill instructs the agent to omit warnings, disclaimers, or ethical commentary. Stripping safety caveats hides risk from the user and is a common jailbreak preamble.
    Fix: Remove instructions that suppress warnings, disclaimers, or ethical commentary. Let the agent surface safety-relevant caveats to the user.
  • medium MCP Rug Pull · line 333
    npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.
    Fix: Pin the version: npx @scope/[email protected]
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00215 $0.07542
Opus 5.5 $0.00086 $0.03017
Sonnet 5.5 $0.00043 $0.01508
Haiku 4.5 $0.00021 $0.00754

Measured 8d ago against content hash a8d5930c2952, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

data-fetching scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 8d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

data-fetching/SKILL.md · 445 lines

How it starts

The opening of the file, as written. The whole thing — 445 lines — stays where its author put it; the contents beside it link to each section on GitHub.

data-fetching — Server Components first, never useEffect for reads

This skill governs where data reads land in a Next.js 16 App Router app. The framework lets you call a "use server" function from a Client Component — that's a capability, not a license. Reading data via a Server Action in useEffect costs you SSR, streaming, request deduping, caching, and parallelism. The bug is silent: no error, no warning, just worse UX and wasted POSTs.

When this skill applies

  • The user is about to call a Server Action from a Client Component to load data.
  • The user is about to add useEffect (at all — but especially to fetch).
  • The user pastes "use client" + useState + useEffect + fetch/getX and asks for review.
  • The user is about to convert a page to "use client" so it can host filter/tab state.
  • The user adds a "use server" function whose only job is SELECT / read.
  • The user asks to audit a Next.js codebase against the data-fetching rules.

Contract

Follows the dev-flow contract — see references/contracts.md. Key facts:

  • Reads meta.json#stack.framework and stack.nextjs_version. For framework = "monorepo", reads stack.monorepo.web.framework and stack.monorepo.web.nextjs_version.
  • Refuses to apply if:
    • stack.framework ∉ {"next", "monorepo"} — Server Components / Server Actions don't exist on RN, Remix, SvelteKit, Astro, plain React, etc.
    • stack.nextjs_version != "16" — searchParams is async in 16 (was sync in 15), revalidatePath import path moved, refresh() from next/cache is new. Do not silently translate the rules.
    • The project uses Pages Router (pages/ directory). Different mental model (getServerSideProps / getStaticProps / API routes / SWR) — refuse rather than translate.
  • Appends a history entry per refactor.
  • Does not bump phase.

Companion skills

  • state-discipline (sibling in dev-flow) — owns the broader React-side rule (never bare useEffect; derive state, use a query lib, use event handlers, key to reset, useMountEffect for one-time external sync). Install and follow it alongside this skill.
  • forms — for any UI that persists field values to the backend. Forms are mutation-heavy and have their own toolkit; reads inside a form (e.g. preloading the entity to edit) follow this skill's rules.

Read the full file on GitHub · 445 lines

Files

What ships with it

4 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 8d ago Changed · +4 lines a8d5930c2952
  2. 1mo ago Changed 2e80310a9ea5
  3. 1mo ago First seen · 441 lines · 215 tokens per session scan A fe801549b616

Subscribe to this mod's changes

data-fetching is a skill published in the GitHub repository lukedj78/dev-flow (6 stars, last pushed 5d ago), licensed MIT. It adds 215 tokens to every session and 7,542 once invoked, about $0.0009 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

sdlc-regulatory

AI-driven SDLC governance framework with quality gates, risk-based autonomy caps, change traceability, Definition of Done, and a compliance crosswalk (EU AI Act, NIST AI RMF, ISO/IEC 42001, SOC 2, GDPR). Use when running or reviewing work through the BMad-style subagent SDLC, enforcing gates, classifying risk, or…

daochild/agents-config · 91 tokens

senior-bitcoin-auditor

Provides senior-level security auditing guidance for Bitcoin smart contracts including Taproot/Script, PSBT, UTXO management, Lightning Network, DLCs, and Bitcoin L2 protocols. Use when auditing Bitcoin contract code, PSBT builders, settlement engines, Lightning integrations, or ordinal/BRC-20 logic.

daochild/agents-config · 69 tokens

data-engineer

Data Engineering Lead — builds reliable, maintainable data pipelines, enforces data quality, and designs schemas that evolve safely.

daochild/agents-config · 28 tokens

archivarius

Data Organization Architect — designs and maintains well-structured, discoverable, and maintainable information architectures for codebases, documentation, and knowledge bases.

daochild/agents-config · 33 tokens

senior-solidity-auditor

Provides senior-level smart contract security auditing guidance for Solidity/EVM including vulnerability patterns, formal verification, gas optimization, and audit methodology.

daochild/agents-config · 34 tokens

senior-qa

Provides senior-level QA engineering guidance including test strategy, automation architecture, CI/CD integration, quality gates, and testing best practices for web, mobile, and API layers.

daochild/agents-config · 38 tokens