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 Jignesh-Ponamwar/skills-mcp --skill react-best-practicesgit clone --depth 1 https://github.com/Jignesh-Ponamwar/skills-mcpWrote 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/jignesh-ponamwar/skills-mcp/react-best-practices)<a href="https://agentmods.dev/skills/jignesh-ponamwar/skills-mcp/react-best-practices"><img src="https://agentmods.dev/badge/skills/jignesh-ponamwar/skills-mcp/react-best-practices/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/jignesh-ponamwar/skills-mcp/react-best-practices"><img src="https://agentmods.dev/badge/skills/jignesh-ponamwar/skills-mcp/react-best-practices.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.00071 | $0.02285 |
| Opus 5 | $0.00036 | $0.01143 |
| Sonnet 5 | $0.00014 | $0.00457 |
| Haiku 4.5 | $0.00007 | $0.00229 |
Grade A, and why
react-best-practices 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 9d 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 — 340 lines — stays where its author put it; the contents beside it link to each section on GitHub.
React Best Practices Skill
1. Component Design
Keep Components Small and Focused
- One component = one concern
- If it exceeds ~100 lines, consider splitting
- Name components after what they render, not what they do (e.g.,
UserCardnotRenderUser)
TypeScript Component Signature
// ✅ Preferred: explicit props interface
interface UserCardProps {
user: User
onSelect?: (id: string) => void
className?: string
}
export function UserCard({ user, onSelect, className }: UserCardProps) {
return (
<div className={cn('card', className)} onClick={() => onSelect?.(user.id)}>
<h3>{user.name}</h3>
<p>{user.email}</p>
</div>
)
}
2. Hooks - Rules and Patterns
Rules of Hooks (enforce with eslint-plugin-react-hooks)
- Only call hooks at the top level - never inside conditions, loops, or nested functions
- Only call hooks from React function components or custom hooks
useState
// Lazy initialization for expensive default values
const [count, setCount] = useState(() => computeExpensiveDefault())
// Functional update when new state depends on old state
setCount(prev => prev + 1) // ✅ safe with concurrent rendering
setCount(count + 1) // ❌ stale closure risk
useEffect - Common Patterns
// Fetch data on mount + when id changes
useEffect(() => {
let cancelled = false
async function loadUser() {
const user = await fetchUser(id)
if (!cancelled) setUser(user) // prevent state update after unmount
}
loadUser()
return () => { cancelled = true }
}, [id])
// Subscribe / unsubscribe
useEffect(() => {
const subscription = eventBus.on('update', handleUpdate)
return () => subscription.unsubscribe() // always cleanup subscriptions
}, [])
useEffect exhaustive deps rule: include every reactive value used inside the effect in the dependency array. Use useCallback/useMemo to stabilize references.
useCallback and useMemo - When to Use
// ✅ DO memoize: callback passed to a child wrapped in React.memo
const handleSubmit = useCallback(async (data: FormData) => {
await api.submit(data)
onSuccess?.()
}, [onSuccess])
// ✅ DO memoize: expensive computation used in render
const sortedItems = useMemo(
() => [...items].sort(compareByDate),
[items]
)
// ❌ DON'T memoize cheap operations - the overhead exceeds savings
const label = useMemo(() => `Hello, ${name}`, [name]) // overkill
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.
- 9d ago First seen · 340 lines · 71 tokens per session scan A 2541f3b255a2
react-best-practices is a skill published in the GitHub repository Jignesh-Ponamwar/skills-mcp (7 stars, last pushed 3mo ago), licensed Apache-2.0. It adds 71 tokens to every session and 2,285 once invoked, about $0.0004 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-08-31.
Other skills, from other repositories
astro
Build content-focused websites with Astro — zero JS by default, islands architecture, multi-framework components, and Markdown/MDX support.
antigravity-design-expert
Core UI/UX engineering skill for building highly interactive, spatial, weightless, and glassmorphism-based web interfaces using GSAP and 3D CSS.
algolia-search
Expert patterns for Algolia search implementation, indexing strategies, React InstantSearch, and relevance tuning.
nextjs-on-cloudflare
Build, migrate, and deploy Next.js apps on Cloudflare Workers with vinext. Use when starting a Next.js project on Cloudflare, moving an existing app to Workers, choosing between vinext and OpenNext, or setting up vinext for Workers. For setup, migration, or deployment, install vinext's upstream skills with npx skills…
frontend-mobile-development-component-scaffold
You are a React component architecture expert specializing in scaffolding production-ready, accessible, and performant components. Generate complete component implementations with TypeScript, tests, s.
frontend-developer
Build React components, implement responsive layouts, and handle client-side state management. Masters React 19, Next.js 15, and modern frontend architecture. Optimizes performance and ensures accessibility. Use PROACTIVELY when creating UI components or fixing frontend issues.