ai-development-guide
Applies language-agnostic and backend technical decision criteria, anti-pattern detection, debugging, and quality gates. Use when reviewing general/backend…
Applies React/TypeScript-specific technical decision criteria, anti-pattern detection, debugging, and frontend quality gates. Use when reviewing components, hooks, browser behavior, or frontend implementation completeness.
$ npx -y skills add shinpr/claude-code-workflows --skill frontend-ai-guide --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/frontend-ai-guideContext preview
The summary Claude sees to decide when to auto-load this skill.
Applies React/TypeScript-specific technical decision criteria, anti-pattern detection, debugging, and frontend quality gates. Use when reviewing components, hooks, browser behavior, or frontend implementation completeness.
name: frontend-ai-guide description: Applies React/TypeScript-specific technical decision criteria, anti-pattern detection, debugging, and frontend quality gates. Use when reviewing components, hooks, browser behavior, or frontend implementation completeness.
Inspect until the evidence identifies the lowest-total-complexity solution that delivers the required user or maintainer value while keeping the UI correct and maintainable.
Judge total complexity across every activated user decision, prop, state, variant, concept, output, persistent state, and component or hook path, together with its UX, runtime, implementation, testing, documentation, and maintenance cost. Compare only dimensions that differ between viable approaches. Prefer reuse or no new mechanism when it delivers the same confirmed value and proof at lower total complexity.
Pause the affected decision and review the design when detecting the following patterns:
1. **Duplicating one UI responsibility across independently maintained components** - Review whether the duplicated behavior or contract should have one owner 2. **Multiple responsibilities mixed in a single component** - Violates Single Responsibility Principle (SRP) 3. **Defining same content in multiple components** - Violates DRY principle 4. **Making changes without checking dependencies** - Potential for unexpected impacts 5. **Disabling code with comments** - Should use version control 6. **Error suppression** - Hiding problems creates technical debt 7. **Type assertions standing in for a guarantee** - Declaring a type established by neither a check nor an existing contract 8. **Pass-through prop chains that obscure state ownership** - Use composition, Context, or the project's state layer when intermediate components only forward values and a broader owner is clearer; retain explicit props when they preserve local ownership and broader state ownership would add coordination while responsibility remains local 9. **Components mixing independently changing responsibilities** - Split when rendering, state/data ownership, or reusable/testable behavior forms an independent responsibility; retain cohesive components when splitting would add avoidable prop/state synchronization
Design philosophy that prioritizes improving primary code reliability over fallback implementations.
Keep concrete implementations separate while their similarity is accidental or their UI ownership differs. Consolidate when repository evidence shows one shared interaction, validation rule, visual contract, or coordinated change responsibility.
**Cases for Commonalization**
**Cases to Avoid Commonalization**
**Symptom**: Fixing one error causes new errors **Cause**: Surface-level fixes without understanding root cause **Avoidance**: Identify root cause with 5 Whys before fixing
**Symptom**: `any` or `as` dec
Claude Code can explore a codebase deeply. On non-trivial work, the harder problem is convergence.
Repo: shinpr/claude-code-workflows
Applies language-agnostic and backend technical decision criteria, anti-pattern detection, debugging, and quality gates. Use when reviewing general/backend…
Language-agnostic coding principles for maintainability, readability, and quality. Use when implementing features, refactoring code, or reviewing code quality.
Determines which of PRD, ADR, UI Spec, Design Doc, and Work Plan a change requires, and where each is stored. Use when deciding documentation scope, or when…
Records where resources outside the repository live (design source, design system, API schema, IaC source, secret store) and how design, implementation, and…
Implementation strategy selection framework. Use when planning implementation strategy, selecting development approach, or defining verification criteria.
Integration and E2E test design principles, ROI calculation, test skeleton specification, and review criteria. Use when designing integration tests, E2E tests,…