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.
npx skills add ncaq/konoka --skill react-use-effectgit clone --depth 1 https://github.com/ncaq/konokaWrote 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.
[](https://agentmods.dev/skills/ncaq/konoka/react-use-effect)<a href="https://agentmods.dev/skills/ncaq/konoka/react-use-effect"><img src="https://agentmods.dev/badge/skills/ncaq/konoka/react-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.
<a href="https://agentmods.dev/skills/ncaq/konoka/react-use-effect"><img src="https://agentmods.dev/badge/skills/ncaq/konoka/react-use-effect.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00040 | $0.00922 |
| Opus 5 | $0.00020 | $0.00461 |
| Sonnet 5 | $0.00008 | $0.00184 |
| Haiku 4.5 | $0.00004 | $0.00092 |
Grade A, and why
react-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 4d 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.
How it starts
The opening of the file, as written. The whole thing — 107 lines — stays where its author put it; the contents beside it link to each section on GitHub.
useEffectの使いどころを見極める
useEffectは外部システム(ブラウザAPI、ネットワーク、サードパーティライブラリ)との同期にのみ使います。
それ以外の用途では、より適切な代替手段がないか検討してください。
参考: You Might Not Need an Effect
useEffectを使わずに解決するパターン
レンダリング用のデータ変換は直接計算します
// Bad: useEffectでstateを更新
const [fullName, setFullName] = useState("");
useEffect(() => {
setFullName(firstName + " " + lastName);
}, [firstName, lastName]);
// Good: レンダリング中に計算
const fullName = firstName + " " + lastName;
ユーザー操作の処理はイベントハンドラで行います
// Bad: useEffectで副作用を検知
useEffect(() => {
if (product.isInCart) {
showNotification(`Added ${product.name} to cart!`);
}
}, [product]);
// Good: イベントハンドラで直接処理
function handleBuyClick() {
addToCart(product);
showNotification(`Added ${product.name} to cart!`);
}
propsが変わったときの状態リセットにはkeyを使います
// Bad: useEffectでリセット
useEffect(() => {
setComment("");
}, [userId]);
// Good: keyでコンポーネントを再マウント
<Profile userId={userId} key={userId} />;
高コストな計算のキャッシュにはuseMemoを使います
// Bad: useEffectで計算結果をstateに保存
useEffect(() => {
setFilteredTodos(getFilteredTodos(todos, filter));
}, [todos, filter]);
// Good: useMemoでキャッシュ
const filteredTodos = useMemo(() => getFilteredTodos(todos, filter), [todos, filter]);
データ取得にはデータフェッチライブラリを使います
// Bad: useEffectで手動フェッチ(冗長なボイラープレート、キャッシュなし、重複排除なし)
useEffect(() => {
let ignore = false;
fetchData(id).then((data) => {
if (!ignore) setData(data);
});
return () => {
ignore = true;
};
}, [id]);
// Good: TanStack Query等を使う
const result = useSuspenseQuery({ queryKey: ["data", id], queryFn: () => fetchData(id) });
useEffectが適切なケース
- ブラウザAPIとの同期(
IntersectionObserver、ResizeObserverなど) - サードパーティライブラリの初期化・破棄
- 外部接続の管理(WebSocketなど)
これらの場合でも、 より高抽象度なhooksやライブラリが使えないか検討してください。
useEffectを使う場合はカスタムフックに切り出す
コンポーネント本体にuseEffectを直接書くことは禁止です。
必ずカスタムフックに切り出し、コンポーネント側はそのフックを呼ぶだけにしてください。
カスタムフックには責務を表す名前をつけます。
useDocumentTitle, useWindowResize, useDeviceListSubscriptionなど。
フックの配置場所はプロジェクトの規約に従ってください。
典型的にはsrc/hooks/のような共有ディレクトリか、
そのコンポーネントに固有のものであれば同じディレクトリの別ファイルに置きます。
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.
- 4d ago First seen · 107 lines · 40 tokens per session scan A 15adf08536ae
react-use-effect is a skill published in the GitHub repository ncaq/konoka (3 stars, last pushed yesterday), licensed Apache-2.0. It adds 40 tokens to every session and 922 once invoked, about $0.0002 per session on Opus 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-05.
Other skills, from other repositories
cloudflare-nextjs
Deploy Next.js to Cloudflare Workers via the OpenNext adapter (@opennextjs/cloudflare). Use for SSR/ISR/SSG/App or Pages Router, getCloudflareContext, bindings (D1/R2/KV/AI/Hyperdrive), caching tiers, skew protection, multi-worker, custom worker, env vars, or worker…
aceternity-ui
100+ animated React components (Aceternity UI) for Next.js with Tailwind. Use for hero sections, parallax, 3D effects, or encountering animation, shadcn CLI integration errors.
auto-animate
AutoAnimate (@formkit/auto-animate) zero-config animations for React. Use for list transitions, accordions, toasts, or encountering SSR errors, animation libraries complexity.
base-ui-react
MUI Base UI unstyled React components with Floating UI. Use for accessible components, Radix UI migration, render props API, or encountering positioning, popup, v1.0 rc / pre-GA issues.
bun-nextjs
This skill should be used when the user asks about "Next.js with Bun", "Bun and Next", "running Next.js on Bun", "Next.js development with Bun", "create-next-app with Bun", or building Next.js applications using Bun as the runtime.
bun-react-ssr
Use when building server-rendered React with Bun, including streaming SSR, hydration, renderToString, or custom SSR without a framework.