feat(skills): integrate Karpathy coding guidelines for LLM behavior - #19
Merged
Conversation
Add behavioral guidelines derived from Andrej Karpathy's observations on common LLM coding mistakes. This improves skill quality by making Claude avoid over-abstraction, drive-by refactoring, speculative features, and silent assumptions. - New rule file (.claude/rules/karpathy-guidelines.md) with 4 principles - New anti-pattern reference (skills/implement/references/common-llm-mistakes.md) - Enhanced /review checklist with "Simplicity & Scope" criteria - Enhanced /spec with explicit assumption-surfacing in interview phase Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Integrates behavioral guidelines from Andrej Karpathy's observations on common LLM coding mistakes into our SDD workflow. Adapted from forrestchang/andrej-karpathy-skills (MIT licensed).
Changes:
.claude/rules/karpathy-guidelines.md) — 4 principles (Think Before Coding, Simplicity First, Surgical Changes, Goal-Driven Execution) always loaded into contextskills/implement/references/common-llm-mistakes.md) — 5 catalogued mistakes with before/after examples for/implementsessions/review— added "Simplicity & Scope" section to the review checklist catching over-abstraction, speculative features, and drive-by refactoring/spec— added "Think Before Coding" guidance with explicit assumption-surfacing and multi-interpretation presentation in the interview phaseWhy
Our CLAUDE.md already contains many of these principles implicitly, but the Karpathy framing provides:
[Step] → verify: [check]) that aligns with our TDD approachTest plan
.claude/rules/)/specwith a vague user story — confirm it surfaces assumptions before writing/implementon a task — confirm anti-pattern reference is available/reviewon a change — confirm "Simplicity & Scope" appears in checklist🤖 Generated with Claude Code