onequery: Skill for Claude Code

.agents/skills/react-no-use-effect/SKILL.md

react-no-use-effect is a skill for Claude Code, Codex from wordbricks/onequery. It costs 65 tokens per session (1,792 once invoked), scanned A, original, Apache-2.0.

A React coding rule that avoids direct use of the useEffect hook, which runs code in response to rendering changes. It provides alternatives such as derived values, event handlers, data-fetching libraries, and a mount-only hook.

In plain words
What is it for?
Use it when writing or reviewing React components, refactoring existing useEffect calls, or checking pull requests that add them.
Why use it?
It reduces effects that run at the wrong time or duplicate state and data-fetching logic. It gives reviews and new components a consistent rule for handling side effects.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: installed under .agents/ (shared by several agents).

This is wordbricks/onequery's own configuration. It tells Claude Code and Codex how to work on onequery itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything onequery configures →

Reuse

Borrowing it

Nothing to install: this file belongs to wordbricks/onequery. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/wordbricks/onequery/main/.agents/skills/react-no-use-effect/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/wordbricks/onequery

Made for: Claude Code, Codex.

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 react-no-use-effect

README.md
[![agentmods](https://agentmods.dev/badge/skills/wordbricks/onequery/react-no-use-effect/github.svg)](https://agentmods.dev/skills/wordbricks/onequery/react-no-use-effect)
Your own site
<a href="https://agentmods.dev/skills/wordbricks/onequery/react-no-use-effect"><img src="https://agentmods.dev/badge/skills/wordbricks/onequery/react-no-use-effect/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 react-no-use-effect

Your own site · 80×15
<a href="https://agentmods.dev/skills/wordbricks/onequery/react-no-use-effect"><img src="https://agentmods.dev/badge/skills/wordbricks/onequery/react-no-use-effect.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 65 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,792 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.
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.00065 $0.01792
Opus 5.5 $0.00026 $0.00717
Sonnet 5.5 $0.00013 $0.00358
Haiku 4.5 $0.00006 $0.00179

Measured 5d ago against content hash 4e767afbcef9, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-01, from the pricing page.

Security

Grade A, and why

react-no-use-effect 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 5d 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.

.agents/skills/react-no-use-effect/SKILL.md · 242 lines

How it starts

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

No useEffect

Never call useEffect directly. Use derived state, event handlers, data-fetching libraries, or useMountEffect instead.

Quick Reference

Comment: the repo currently has useMountEffect, but it does not appear to have a global lint rule that already bans useEffect. Treat this skill as the policy source unless that restriction is added later.

Instead of useEffect for... Use
Deriving state from other state/props Inline computation (Rule 1)
Fetching data useQuery / data-fetching library (Rule 2)
Responding to user actions Event handlers (Rule 3)
One-time external sync on mount useMountEffect (Rule 4)
Resetting state when a prop changes key prop on parent (Rule 5)

When to Use This Skill

  • Writing new React components
  • Refactoring existing useEffect calls
  • Reviewing PRs that introduce useEffect
  • An agent adds useEffect "just in case"

Workflow

1. Identify the useEffect

Determine what the effect is doing: deriving state, fetching data, responding to an event, syncing with an external system, or resetting state.

2. Apply the Correct Replacement Pattern

Use the five rules below to pick the right replacement.

3. Verify

bun lint --format json <package-path>
bunx turbo typecheck --filter=<package> --json
bunx turbo test --filter=<package> --json

Use bunx turbo check --json when the change spans multiple packages or needs a whole-repo lint/format pass.

The Escape Hatch: useMountEffect

For the rare case where you need to sync with an external system on mount, use the shared wrapper from @onequery/ui/hooks/use-mount-effect.

Read the full file on GitHub · 242 lines

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. 5d ago First seen · 242 lines · 65 tokens per session scan A 4e767afbcef9

Subscribe to this mod's changes

react-no-use-effect is a skill published in the GitHub repository wordbricks/onequery (17 stars, last pushed 2mo ago), licensed Apache-2.0. It adds 65 tokens to every session and 1,792 once invoked, about $0.0003 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-09-25.

Related

Other skills, from other repositories

officecli-pitch-deck

Use this skill when the user is building a fundraising / investor pitch deck — seed, Series A / B / C, convertible note, SAFE round, strategic raise. Trigger on: 'pitch deck', 'investor deck', 'Series A deck', 'Series B deck', 'Series C deck', 'fundraising deck', 'seed pitch', 'VC deck', 'raising capital', 'term sheet…

iOfficeAI/OfficeCLI · 163 tokens

morph-ppt

Use this skill when the user wants a .pptx with smooth cross-slide animation — PowerPoint Morph transitions, Keynote-style continuous motion, shapes that grow / move / rotate as the slide advances. Trigger on: 'morph', 'morph transition', 'smooth transition', 'continuous animation across slides', 'Keynote-style…

iOfficeAI/OfficeCLI · 169 tokens

officecli-academic-paper

Use this skill to build academic-style .docx output: journal / conference / thesis chapters carrying formal citation style (APA, Chicago, IEEE, MLA), numbered equations, figure & table cross-references, footnotes/endnotes, bibliography, or multi-column journal layout. Trigger on: 'research paper', 'journal paper'…

iOfficeAI/OfficeCLI · 141 tokens

officecli-financial-model

Use this skill when the user wants to build a financial model — 3-statement model, DCF valuation, LBO, SaaS unit economics, sensitivity / scenario analysis, debt schedule, or fundraising projections — in Excel. Trigger on: 'financial model', '3-statement model', 'P&L + BS + CF', 'DCF', 'WACC', 'NPV', 'terminal value'…

iOfficeAI/OfficeCLI · 222 tokens

officecli-pptx

Use this skill any time a .pptx file is involved -- as input, output, or both. This includes: creating slide decks, pitch decks, or presentations; reading, parsing, or extracting text from any .pptx file; editing, modifying, or updating existing presentations; combining or splitting slide files; working with…

iOfficeAI/OfficeCLI · 106 tokens

officecli

Create, analyze, proofread, and modify Office documents (.docx, .xlsx, .pptx) using the officecli CLI tool. Use when the user wants to create, inspect, check formatting, find issues, add charts, or modify Office documents.

iOfficeAI/OfficeCLI · 56 tokens