pattern-recognitionlisted
Install: claude install-skill komluk/scaffolding
# Pattern Recognition Skill
Standards for identifying and applying existing codebase patterns to maintain consistency.
## When to Apply
- Before writing new code
- When implementing similar features
- Code review for pattern consistency
- Refactoring decisions
---
## Pattern Detection Process
### Step 1: Scan Existing Code
| Action | Purpose |
|--------|---------|
| Find similar components | Match structure and naming |
| Find similar hooks | Match return types and patterns |
| Find similar services | Match error handling and API patterns |
| Check types location | Ensure types/index.ts usage |
### Step 2: Extract Patterns
| Element | What to Look For |
|---------|------------------|
| Component structure | Props, hooks order, JSX structure |
| State management | Zustand vs useState decisions |
| Error handling | Try/catch style, error messages |
| Naming conventions | Files, functions, types |
| File organization | Directory structure |
### Step 3: Apply Consistently
| Rule | Description |
|------|-------------|
| Match existing style | New code follows established patterns |
| Document deviations | If pattern changes, document why |
| Refactor if needed | Update old code to match new pattern |
---
## Naming Conventions
### File Naming
| Type | Convention | Example |
|------|------------|---------|
| Component | PascalCase | `AnnotationCard.tsx` |
| Hook | camelCase with use | `useVisualization.ts` |
| Service | camelCase | `apiService.ts` |
| Types | camelCase or