component-purity
Verify React component purity - components only render UI, all logic belongs in hooks.
Skill by ArkadiuszSieracki
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/arkadiuszsieracki-component-purity
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: design, frontend
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/component-purity
What's inside
- Skill name
component-purity- Description
- Verify React component purity - components only render UI, all logic belongs in hooks. Use for: property drilling, logic in JSX, useEffect in component, domain useState in component, GUI and business logic separation.
- License
- Apache-2.0
- Instructions
- 85 lines in SKILL.md · view on GitHub
Files (1)
- SKILL.md
SKILL.md (first lines)
# React component purity
## When to use
- You suspect property drilling (props passed through 2+ levels)
- Business logic is in component instead of hook
- `useEffect` with domain logic is inside component
- `useState` for domain data is inside component
- Component does too many things at once
## Core rule
React component = **pure view**:
- renders JSX based on props and hook values,
- passes handlers from its hooks to UI elements,
- does not contain computational logic, conditional business logic, or side effects.
## Verification procedure
1. Open component file.
2. Check each `useState` - does it store domain data? If yes -> move to hook.
3. Check each `useEffect` - is it in component? If yes -> move to hook.
4. Check for calculations/filters/data transforms -> move to hook.
5. Check props chain: does any prop pass through 2+ components without use -> property drilling.
6. Check whether handlers are defined inline in JSX -> move to hook.
## Remediation patterns
### Logic in component -> hook
```tsx
// [BAD] ERROR
function RecordingList({ recordings }) {
const filtered = recordings.filter((r) => r.active); // logic
const [selected, setSelected] = useState(null); // domain state
useEffect(() => {
fetchData();
}, []); // effect
return <List items={filtered} />;
}
// [OK] CORRECT
function RecordingList() {
const { recordings, selected, handleSelect } = useRecordingList();
return (
<List items={recordings} selected={selected} onSelect={handleSelect} />
);
}
```
### Property drilling -> useReducer + context
```tsx
// [BAD] prop `onSave` passed through 3 levels
<WizardRoot onSave={handleSave}>
<WizardStep onSave={handleSave}>
{" "}
// does not use it, only forwards
<WizardForm onSave={handleSave} /> // uses it
</WizardStep>
</WizardRoot>;
// [OK] useReducer in domain hook + context
const { dispatch } = useWizardContext(); // directly in WizardForm
```
## Responsibility split
| Layer | File | Contains |
| ------------- | ---------------------------- | --------------------------------- |
| Component | `components/MyComponent.tsx` | JSX, hook calls |
| Domain hook | `hooks/useMyDomain.ts` | state, effects, logic, React Query |
| API | `api/myDomain.api.ts` | React Query query definitions |
| Model | `model/myDomain.model.ts` | types, interfaces, constants |
## Checklist
- [ ] No `useState` for domain data in component (UI state like `isOpen` for local modal is OK)
- [ ] No `useEffect` in component
- [ ] No calculations/data transformations in JSX or before `return`
- [ ] All handlers come from hook
- [ ] No property drilling through 2+ levelsFrom ArkadiuszSieracki/mastermind-agentic-sdlc-vscode-copilot, Apache-2.0.
More from ArkadiuszSieracki/mastermind-agentic-sdlc-vscode-copilot
- 0.409score
preflight-profile-setup
ArkadiuszSieracki
Interactive bootstrap skill for preflight profiles.
SkillDFreshness: DClaude Code +9 - 0.409score
project-standards-capture
ArkadiuszSieracki
Interactive bootstrap skill for project-specific standards.
SkillDFreshness: DClaude Code +9 - 0.409score
graph-bootstrap-init
ArkadiuszSieracki
Bootstrap skill for graph initialization and refresh.
SkillDFreshness: DClaude Code +9 - 0.409score
groomer-roster-setup
ArkadiuszSieracki
Interactive bootstrap skill for building a project-specific grooming roster.
SkillDFreshness: DClaude Code +9 - 0.409score
repo-discovery-init
ArkadiuszSieracki
Bootstrap skill for repository discovery.
SkillDFreshness: DClaude Code +9 - 0.409score
powershell-strict-mode
ArkadiuszSieracki
Rules for writing reliable PowerShell with Set-StrictMode -Version Latest: mandatory @(), avoiding .Count on unknown type, safe null comparisons, variable…
SkillDFreshness: DClaude Code +9 - 0.406score
agent-capability-routing
ArkadiuszSieracki
Detect missing capabilities and route to a subagent with proper access.
SkillDFreshness: DClaude Code +9 - 0.406score
powershell-executor
ArkadiuszSieracki
Runner-first for PowerShell: every instruction is executed via .github/agents/invoke-isolated-powershell.ps1 (Mode detached by default), with…
SkillDFreshness: DClaude Code +9 - 0.406score
db-optimization
ArkadiuszSieracki
PostgreSQL database optimization with EF Core - detect and fix N+1, missing indexes, missing pagination, and incorrect use of AsNoTracking.
SkillDFreshness: DClaude Code +9 - 0.406score
rag-anti-hallucination-workflow
ArkadiuszSieracki
Practical anti-hallucination workflow for RAG: deterministic vs retrieval, query_type/workflow_phase routing, top-k/scoring, grounding/freshness/waste…
SkillDFreshness: DClaude Code +9 - 0.406score
rag-domain-integrity-gate
ArkadiuszSieracki
Fail-fast gate and domain integrity repair in the RAG graph.
SkillDFreshness: DClaude Code +9 - 0.406score
react-performance
ArkadiuszSieracki
React performance optimization - memoization, list virtualization, lazy loading, bundle size.
SkillDFreshness: DClaude Code +9
Signals
- Stars
- 0
- Forks
- 0
- Open issues
- 0
- Last commit (this folder)
- Apr 23, 2026 (6 months ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- Apache-2.0
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from ArkadiuszSieracki
- 0.409score
preflight-profile-setup
ArkadiuszSieracki
Interactive bootstrap skill for preflight profiles.
SkillDFreshness: DClaude Code +9 - 0.409score
project-standards-capture
ArkadiuszSieracki
Interactive bootstrap skill for project-specific standards.
SkillDFreshness: DClaude Code +9 - 0.409score
groomer-roster-setup
ArkadiuszSieracki
Interactive bootstrap skill for building a project-specific grooming roster.
SkillDFreshness: DClaude Code +9 - 0.409score
powershell-strict-mode
ArkadiuszSieracki
Rules for writing reliable PowerShell with Set-StrictMode -Version Latest: mandatory @(), avoiding .Count on unknown type, safe null comparisons, variable…
SkillDFreshness: DClaude Code +9 - 0.409score
graph-bootstrap-init
ArkadiuszSieracki
Bootstrap skill for graph initialization and refresh.
SkillDFreshness: DClaude Code +9 - 0.409score
repo-discovery-init
ArkadiuszSieracki
Bootstrap skill for repository discovery.
SkillDFreshness: DClaude Code +9
Cite this page
component-purity skill. Agent Mart. https://agentmart.dev/skills/arkadiuszsieracki-component-purity (last updated 2026-10-24)