yd-react-expert

yd-react-expert is a skill for Claude Code from LeeYudok/agents-scaffold. It costs 52 tokens per session (3,135 once invoked), scanned A, original, MIT.

A React component guide for React 19 covering state, effects, asynchronous requests, rendering, performance, and accessibility. React is a JavaScript library for building user interfaces from reusable components.

In plain words
What is it for?
Use it when designing, implementing, or refactoring React components, managing shared or URL state, handling network requests, or investigating rerender and accessibility issues.
Why use it?
It helps avoid duplicated state, unnecessary effects, stale asynchronous results, and inaccessible or wasteful components.

Skill for Claude Code

Written for Claude Code: installed under .claude/. Also seen: reads .claude/ paths.

Good fit Use it when designing, implementing, or refactoring React components, managing shared or URL state, handling network requests, or investigating rerender and accessibility issues.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/leeyudok/agents-scaffold/yd-react-expert
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 LeeYudok/agents-scaffold --skill yd-react-expert
Clone the repo
git clone --depth 1 https://github.com/LeeYudok/agents-scaffold

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 yd-react-expert

README.md
[![agentmods](https://agentmods.dev/badge/skills/leeyudok/agents-scaffold/yd-react-expert/github.svg)](https://agentmods.dev/skills/leeyudok/agents-scaffold/yd-react-expert)
Your own site
<a href="https://agentmods.dev/skills/leeyudok/agents-scaffold/yd-react-expert"><img src="https://agentmods.dev/badge/skills/leeyudok/agents-scaffold/yd-react-expert/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 yd-react-expert

Your own site · 80×15
<a href="https://agentmods.dev/skills/leeyudok/agents-scaffold/yd-react-expert"><img src="https://agentmods.dev/badge/skills/leeyudok/agents-scaffold/yd-react-expert.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 52 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,135 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.00052 $0.03135
Opus 5.5 $0.00021 $0.01254
Sonnet 5.5 $0.00010 $0.00627
Haiku 4.5 $0.00005 $0.00314

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

Security

Grade A, and why

yd-react-expert 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 today.

The scan reads SKILL.md. This mod also ships 3 executable files (scripts/react_claims.mjs, scripts/verify_react_claims.py, tests/test_react_claims.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

Origin

Copies of this mod

1 near-identical copy found in the catalogue:

.claude/skills/yd-react-expert/SKILL.md · 174 lines

How it starts

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

yd-react-expert

컴포넌트 코드가 대상이다. 번들러·패키지 매니저·의존성은 yd-frontend-build, 디자인 토큰·컴포넌트 선택은 yd-doksam-ui 가 맡는다.

이 문서는 일반론을 적지 않는다. 판단이 갈리는 지점, 자주 틀리는 곳, React 19 에서 바뀐 것만 담는다.

1. 상태는 필요한 만큼만, 있어야 할 곳에

판단 순서:

  1. props 나 기존 상태에서 계산할 수 있는가 → 렌더 중에 계산한다. useState + useEffect 조합으로 파생값을 동기화하지 않는다. 이 패턴이 버그의 큰 축이다.
  2. 여러 컴포넌트가 공유하는가 → 가장 가까운 공통 부모로 올린다. 전역 스토어는 "여러 화면이 같은 서버 상태를 본다"가 성립할 때만.
  3. URL 에 있어야 하는가 — 새로고침·공유·뒤로가기가 의미 있으면 라우터 상태다. 상세 화면·필터·탭이 여기 해당한다.
// 나쁨 — 파생값을 상태로 두고 동기화
const [filtered, setFiltered] = useState<Room[]>([])
useEffect(() => { setFiltered(rooms.filter(r => r.name.includes(q))) }, [rooms, q])

// 좋음 — 렌더 중 계산
const filtered = useMemo(() => rooms.filter(r => r.name.includes(q)), [rooms, q])

useMemo 는 측정 가능한 비용이 있을 때만. 배열 몇 개 도는 것에 붙이면 코드만 늘어난다.

2. useEffect 는 "외부 시스템과 동기화"에만

effect 를 쓰기 전에 답한다: 이 코드가 맞물리려는 외부 시스템이 무엇인가? (네트워크, DOM 이벤트, 타이머, 구독) 답이 없으면 effect 가 아니다.

  • 사용자 행동의 결과는 이벤트 핸들러에서 처리한다. 상태를 바꾸고 그 변화를 effect 로 감지해 후속 작업을 하는 구조는 흐름을 끊고 중복 실행을 부른다.
  • StrictMode 에서 effect 는 두 번 실행된다. 이건 버그가 아니라 정리(cleanup) 누락을 드러내는 장치다. 두 번 돌아 깨지면 effect 쪽을 고친다. 개발 빌드에서만 일어나고 프로덕션 빌드는 한 번 실행한다.

비동기 요청 취소는 필수

useEffect(() => {
  let alive = true
  api.messages(dbRef, roomId).then(m => { if (alive) setMessages(m) })
  return () => { alive = false }
}, [dbRef, roomId])

빠뜨리면 대상을 연달아 바꿀 때 먼저 보낸 응답이 나중에 도착해 화면을 덮는다(경합). AbortController 를 쓸 수 있으면 그쪽이 더 낫다 — 요청 자체를 끊는다.

의존성 배열을 거짓말로 채우지 않는다

eslint-plugin-react-hooks 의 exhaustive-deps 는 빠진 값을 경고하고, rules-of-hooks 는 조건문 안의 훅을 오류로 막는다. 린트가 요구하는 값을 빼서 "한 번만 실행"을 흉내내지 않는다. 대신 원인을 없앤다 — 함수는 useCallback 으로 안정화하거나 effect 안으로 옮기고, 정말 마운트 1회면 그 사실이 드러나게 쓴다.

3. 리스트와 key

  • key 는 데이터의 안정적 식별자. 배열 인덱스는 순서가 바뀌거나 중간 삽입이 있으면 상태가 엉뚱한 행에 붙는다.
  • 컴포넌트를 초기화하고 싶을 때 key 를 바꾸는 것은 정식 기법이다. 상세 뷰에서 대상이 바뀔 때 내부 상태를 리셋하는 가장 단순한 방법이다.
<MessageView key={`${room.id}:${jumpTo ?? 0}`} ... />
  • 렌더 안에서 컴포넌트를 정의하지 않는다. 함수 컴포넌트 본문에서 const Row = () => ... 로 만든 컴포넌트는 렌더마다 새 타입이다. React 는 매번 지우고 다시 만들어서 내부 state 가 초기화되고 입력창은 포커스를 잃는다. 파일 최상위로 옮기고 필요한 값은 props 로 넘긴다.

Read the full file on GitHub · 174 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. today First seen · 174 lines · 52 tokens per session scan A e8a1cc2fd312

Subscribe to this mod's changes

yd-react-expert is a skill published in the GitHub repository LeeYudok/agents-scaffold (36 stars, last pushed today), licensed MIT. It adds 52 tokens to every session and 3,135 once invoked, about $0.0002 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-10-25.