From shinpr-claude-code-workflows
Provides frontend-specific technical decision criteria, anti-patterns, debugging techniques, and quality check workflow for use during frontend development and quality assurance.
How this skill is triggered — by the user, by Claude, or both
Slash command
/shinpr-claude-code-workflows:frontend-ai-guideThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Immediately stop and reconsider design when detecting the following patterns:
Immediately stop and reconsider design when detecting the following patterns:
Design philosophy that prioritizes improving primary code reliability over fallback implementations.
How to handle duplicate code based on Martin Fowler's "Refactoring":
| Duplication Count | Action | Reason |
|---|---|---|
| 1st time | Inline implementation | Cannot predict future changes |
| 2nd time | Consider future consolidation | Pattern beginning to emerge |
| 3rd time | Implement commonalization | Pattern established |
Cases for Commonalization
Cases to Avoid Commonalization
// 1st-2nd occurrence: keep separate, no commonalization yet
function UserEmailInput() { /* ... */ }
function ContactEmailInput() { /* ... */ }
// Commonalize on 3rd occurrence
function EmailInput({ context }: { context: 'user' | 'contact' | 'admin' }) { /* ... */ }
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: Excessive use of any type or as Cause: Impulse to avoid type errors Avoidance: Handle safely with unknown type and type guards
Symptom: Many bugs after implementation Cause: Ignoring Red-Green-Refactor process Avoidance: Always start with failing tests
Symptom: Frequent unexpected errors when introducing new technology Cause: Assuming "it should work according to official documentation" without prior investigation Avoidance:
Certainty: low (Reason: new experimental feature with limited production examples)
Exploratory implementation: true
Fallback: use established patterns
Symptom: Duplicate implementations, architecture inconsistency, integration failures Cause: Insufficient understanding of existing code before implementation Avoidance Methods:
Symptom: Component not rendering
Why1: Props are undefined → Why2: Parent component didn't pass props
Why3: Parent using old prop names → Why4: Component interface was updated
Why5: No update to parent after refactoring
Root cause: Incomplete refactoring, missing call-site updates
To isolate problems, attempt reproduction with minimal code:
Add structured debug logs to isolate the issue, then remove them before commit (per "Delete debug console.log()" in typescript-rules):
console.log('DEBUG:', {
context: 'user-form-submission',
props: { email, name },
state: currentState,
timestamp: new Date().toISOString()
})
Read package.json scripts and run them with the project's package manager (packageManager field). Map the project's actual script names to the phases below — do not assume fixed names.
Completion Criteria: Complete all 3 stages
Grep -n "ComponentName\|hookName" -o content
Grep -n "importedFunction" -o content
Grep -n "propsType\|StateType" -o content
Mandatory: Read all discovered files and include necessary parts in context:
Structured impact report (mandatory):
## Impact Analysis
### Direct Impact: ComponentA, ComponentB (with reasons)
### Indirect Impact: FeatureX, PageY (with integration paths)
### Processing Flow: Props → Render → Events → Callbacks
Important: Execute all 3 stages to completion
When unused code is detected → Will it be used?
Target: Components, hooks, utilities, documentation, configuration files
In use? No → Delete immediately (remains in Git history)
Yes → Working? No → Delete + Reimplement
Yes → Fix
npx claudepluginhub shinpr/claude-code-workflowsGuides technical decisions with anti-pattern detection, debugging techniques, and quality check workflows. Useful for code smells, design reviews, and fail-fast fallback design.
Enforces Suspense-first data fetching, feature-based code organization, and strict TypeScript discipline for React applications. Use when creating components, pages, adding features, or fetching data.
Builds production-grade web frontends: React/Next.js components, pages, design systems, state management, and typed API clients. Useful for structured, multi-step UI development with protocol-driven quality checks.