code-patterns
Installation
SKILL.md
Code Patterns
Best practices distilled from implementation lessons. These patterns prevent common bugs in file I/O, data persistence, and validation.
Core Principle
LEARN FROM MISTAKES - DON'T REPEAT THEM
Each pattern here was extracted from a real bug or issue. Apply these patterns proactively to prevent the same mistakes.
When to Use
Always use for: File-based state, shared resources, data persistence, validation layers, concurrent access
Especially when: Multiple processes/hooks access same file, persisting JSON data, creating factory functions, implementing save/load logic