Back to list
joncrangle

preventionpatterns

by joncrangle

Dotfiles and install scripts for configuration

7🍴 0📅 Jan 24, 2026

SKILL.md


name: PreventionPatterns description: Known bug patterns and their fixes to prevent regression.

<skill_doc>

Prevention Patterns

When reviewing code or debugging, check against these known issues.

🛡️ React/Frontend Patterns

  • Missing Dependency: useEffect dependency array incomplete?
  • Stale Closures: Using state in callbacks without refs or functional updates?
  • Key Props: Using index as key in list rendering? (Bad for re-ordering).
  • Zod Schema mismatch: Frontend types not aligned with Backend API responses?

🛡️ Node/Backend Patterns

  • Unhandled Promise: Missing .catch() or try/catch in async handlers?
  • SQL Injection: String concatenation in queries instead of parameters?
  • Env Vars: Hardcoded secrets instead of process.env?
  • Race Conditions: Parallel DB updates to the same record?

🛡️ General Code Health

  • Slop Variables: data, info, temp, obj. Rename them.
  • Deep Nesting: More than 3 levels of indentation? Refactor/Extract.
  • Dead Code: Imports unused? Functions never called?

🧪 Post-Mortem Protocol

When a bug is fixed, ask:

  1. "Could this have been caught by a type?"
  2. "Could this have been caught by a test?"
  3. "Could this have been caught by a lint rule?" Add the answer here. </skill_doc>

Score

Total Score

55/100

Based on repository quality metrics

SKILL.md

SKILL.mdファイルが含まれている

+20
LICENSE

ライセンスが設定されている

0/10
説明文

100文字以上の説明がある

0/10
人気

GitHub Stars 100以上

0/15
最近の活動

1ヶ月以内に更新

+10
フォーク

10回以上フォークされている

0/5
Issue管理

オープンIssueが50未満

+5
言語

プログラミング言語が設定されている

+5
タグ

1つ以上のタグが設定されている

+5

Reviews

💬

Reviews coming soon