Pattern Extraction Skill
Purpose
Identify recurring patterns and abstractions in a codebase for documentation and reuse.
Pattern Categories
1. Structural Patterns
- Module organization
- Layer architecture
- Feature-based structure
- Shared utilities location
2. Code Patterns
- Error handling approach
- Validation patterns
- Data transformation patterns
- API client patterns
3. Testing Patterns
- Test file organization
- Mock/stub conventions
- Fixture patterns
- Integration test setup
4. Component Patterns
- Component composition
- Prop patterns
- State management
- Event handling
Extraction Process
- Sample Selection - Choose representative files
- Pattern Identification - Note recurring structures
- Validation - Verify pattern is consistent across codebase
- Documentation - Write pattern description with examples
- Counter-Examples - Note exceptions and why they differ
Pattern Documentation Template
## Pattern: [Name]
### Intent
What problem does this pattern solve?
### Structure
How is it organized?
### Example
```code
// Representative example
When to Use
Guidelines for when to apply this pattern.
Variations
Acceptable variations seen in codebase.
---
> Converted and distributed by [TomeVault](https://tomevault.io/claim/hffmnnj) — claim your Tome and manage your conversions.
<!-- tomevault:4.0:skill_md:2026-04-11 -->