markdown-site: Skill for Claude Code

.claude/react-effect-decision/SKILL.md

react-effect-decision is a skill for Claude Code from waynesutton/markdown-site. It costs 63 tokens per session (1,679 once invoked), scanned A, original, MIT.

A project rule for deciding when React code needs `useEffect`, a feature used to synchronize components with outside systems. It favors derived values, event handlers, and other React patterns when an effect is unnecessary.

In plain words
What is it for?
Use it when writing or reviewing React components involving derived state, event handling, resets, subscriptions, data fetching, or possible `useEffect` usage.
Why use it?
It helps avoid extra state synchronization and common component bugs caused by using effects for calculations, resets, or user actions.

Skill for Claude Code

Written for Claude Code: installed under .claude/.

This is waynesutton/markdown-site's own configuration. It tells Claude Code how to work on markdown-site 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 markdown-site configures →

Reuse

Borrowing it

Nothing to install: this file belongs to waynesutton/markdown-site. 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/waynesutton/markdown-site/main/.claude/react-effect-decision/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/waynesutton/markdown-site

Made for: Claude Code.

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-effect-decision

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/waynesutton/markdown-site/react-effect-decision"><img src="https://agentmods.dev/badge/skills/waynesutton/markdown-site/react-effect-decision.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 63 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,679 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
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.00063 $0.01679
Opus 5.5 $0.00025 $0.00672
Sonnet 5.5 $0.00013 $0.00336
Haiku 4.5 $0.00006 $0.00168

Measured 1mo ago against content hash 2578847aaa75, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

react-effect-decision scanned grade A with 1 finding 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 1mo 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.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

fetch(url)
.claude/react-effect-decision/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.

React effect decision

Default rule for this project: do not reach for direct useEffect first.

Most effect usage in React code is a sign that the component is syncing state that should be derived during render, routing an event through state, or resetting local state in a way React already models better.

This skill merges:

  • React's official decision tree from "You Might Not Need an Effect"
  • The project's stricter no direct useEffect preference

Start here

Before writing any effect, ask these in order:

  1. Can I calculate this from props or state during render
  2. Is this triggered by a user action and better placed in the event handler
  3. Am I trying to reset component state when identity changed and should use key
  4. Is this an expensive pure calculation that should use useMemo
  5. Is this an external subscription that should use useSyncExternalStore or a focused custom hook
  6. Is this real external synchronization that must happen on mount or on dependency changes

If you answer yes to any of 1 through 5, do not write a direct useEffect.

Project stance

React allows effects for real external synchronization. This project is stricter:

  • Avoid direct useEffect in components whenever a clearer pattern exists
  • Prefer derived values, event handlers, key remounts, memoization, query libraries, Convex hooks, and focused custom hooks
  • If mount only external setup is truly needed, use an explicit useMountEffect wrapper instead of sprinkling raw useEffect through feature code

Example wrapper:

import { useEffect } from "react";

export function useMountEffect(effect: () => void | (() => void)) {
  useEffect(effect, []);
}

Use that only for one time external setup like DOM focus, third party widgets, or browser API listeners that belong to the component lifecycle.

Decision guide

1. Derived state belongs in render

Bad smell:

  • useEffect(() => setX(deriveFromY(y)), [y])
  • State that only mirrors props or other state

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. 1mo ago First seen · 242 lines · 63 tokens per session scan A 2578847aaa75

Subscribe to this mod's changes

react-effect-decision is a skill published in the GitHub repository waynesutton/markdown-site (627 stars, last pushed 5mo ago), licensed MIT. It adds 63 tokens to every session and 1,679 once invoked, about $0.0003 per session on Opus 5.5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

reskin

Author a NEW skin for the reskinnable-demo app. A skin is a self-contained domain plugin under src/skins/ / that implements the frozen Skin contract (src/shell/skin-contract.ts) to swap the app's entire experience — brand, theme, layout, pages, tools, data, and agent — as a live sales demo. Use when the user says "add…

CopilotKit/CopilotKit · 154 tokens

setup-slack-channel

Use for the PROVIDER half of getting a locally running CopilotKit Channels agent to answer in Slack, when no Slack app exists yet — setting up a Channels bot in Slack for the first time, creating the Slack app and its tokens, attaching it to a managed Intelligence Channel, or when a Channel reports setuprequired, sits…

CopilotKit/CopilotKit · 206 tokens

copilotkit-channels

Use for the CODE half of a managed Intelligence Channel with Slack or Microsoft Teams: customising the Channel a CLI-scaffolded project already ships, or — for a project the CLI did not generate — writing the Channel declaration, the long-running host, and the awaited activation call. Teams provider setup is in scope…

CopilotKit/CopilotKit · 112 tokens

channels-setup

Use when a developer wants to build their first CopilotKit Channels agent and get it answering in Slack or Microsoft Teams: "set up a channel", "connect my agent to Slack", "get my agent into Teams", or starting from nothing and wanting a working channel end to end. Covers the whole path: inspecting or scaffolding the…

CopilotKit/CopilotKit · 141 tokens

intelligence-vocabulary

Locks customer-facing CopilotKit Intelligence docs to one approved name per concept. Use when writing, editing, or reviewing Intelligence docs, nav labels, signup labels, or image alt text in showcase/shell-docs. Don't use for renaming code identifiers, route slugs, env vars, API fields, or component names, or for…

CopilotKit/CopilotKit · 79 tokens

guided-tour

Take a guided tour of Open SaaS — walks you through step-by-step through the project structure, features, and customization checklist.

wasp-lang/open-saas · 29 tokens