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 halflength-ampleness75/claude-code-recipes --skill react-patternsgit clone --depth 1 https://github.com/halflength-ampleness75/claude-code-recipesWrote 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/halflength-ampleness75/claude-code-recipes/react-patterns)<a href="https://agentmods.dev/skills/halflength-ampleness75/claude-code-recipes/react-patterns"><img src="https://agentmods.dev/badge/skills/halflength-ampleness75/claude-code-recipes/react-patterns/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/halflength-ampleness75/claude-code-recipes/react-patterns"><img src="https://agentmods.dev/badge/skills/halflength-ampleness75/claude-code-recipes/react-patterns.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.00000 | $0.01646 |
| Opus 5.5 | $0.00000 | $0.00658 |
| Sonnet 5.5 | $0.00000 | $0.00329 |
| Haiku 4.5 | $0.00000 | $0.00165 |
Grade A, and why
react-patterns 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 3mo 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 — 199 lines — stays where its author put it; the contents beside it link to each section on GitHub.
React Patterns
Best practices for React development: functional components, hooks, state management, performance, and accessibility.
Component Rules
- Always use functional components — never class components for new code
- One component per file — name the file the same as the component (PascalCase)
- Export components as named exports — default exports only for pages/routes
- Colocate related files — keep
Component.tsx,Component.test.tsx, andComponent.module.csstogether - Props interface above the component — name it
ComponentNameProps
// Good
interface UserCardProps {
user: User;
onSelect: (id: string) => void;
variant?: "compact" | "full";
}
export function UserCard({ user, onSelect, variant = "full" }: UserCardProps) {
return ( /* ... */ );
}
// Bad — default export, inline props, class component
export default class UserCard extends React.Component<{user: any}> { /* ... */ }
Hooks Patterns
Custom Hooks
- Prefix with
use—useAuth,useDebounce,useLocalStorage - Extract shared logic into custom hooks — if two components share stateful logic, extract it
- Return tuples for simple hooks, objects for complex ones
// Simple: return tuple
function useToggle(initial = false): [boolean, () => void] {
const [value, setValue] = useState(initial);
const toggle = useCallback(() => setValue((v) => !v), []);
return [value, toggle];
}
// Complex: return object
function useApi<T>(url: string) {
const [data, setData] = useState<T | null>(null);
const [error, setError] = useState<Error | null>(null);
const [loading, setLoading] = useState(true);
// ... fetch logic
return { data, error, loading, refetch };
}
Hook Rules
- Never call hooks conditionally — all hooks must run on every render
- Use
useCallbackfor functions passed to children — prevents unnecessary re-renders - Use
useMemoonly for expensive computations — don't wrap everything - Prefer
useReduceroveruseStatewhen state transitions are complex
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.
- 3mo ago First seen · 199 lines · 0 tokens per session scan A a6b4372ef048
react-patterns is a skill published in the GitHub repository halflength-ampleness75/claude-code-recipes (3 stars, last pushed 1mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,646 tokens. 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.
react-patterns compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| react-patternshalflength-ampleness75/claude-code-recipes | Skill | 3 | 1mo ago | MIT | A | 0 | Claude Code, Codex |
| generic-react-feature-developertravisjneuman/.claude | Skill | 115 | yesterday | MIT | A | 53 | Claude Code |
| generic-react-ux-designertravisjneuman/.claude | Skill | 115 | yesterday | MIT | A | 69 | Claude Code |
| generic-react-code-reviewertravisjneuman/.claude | Skill | 115 | yesterday | MIT | A | 71 | Claude Code |
| generic-react-design-systemtravisjneuman/.claude | Skill | 115 | yesterday | MIT | A | 59 | Claude Code |
| agent-react-experttravisjneuman/.claude | Skill | 115 | yesterday | MIT | A | 11 | Claude Code |
| web-artifacts-buildertravisjneuman/.claude | Skill | 115 | yesterday | MIT | A | 64 | Claude Code |