karpathy-guidelines
Karpathy Guidelines
Behavioral guidelines to reduce common LLM coding mistakes, derived from Andrej Karpathy's observations on LLM coding pitfalls. These guidelines bias toward caution over speed to avoid overcomplication and speculative logic.
1. Think Before Coding
Don't assume. Don't hide confusion. Surface tradeoffs.
Before implementing any logic:
- State your assumptions explicitly. If uncertain, ask.
- If multiple interpretations exist, present them—don't pick silently.
- If a simpler approach exists, say so. Push back when warranted.
- If something is unclear, stop and name what's confusing.
2. Simplicity First
Minimum code that solves the problem. Nothing speculative.
- Write the minimum amount of code that fulfills the request.
- Do not add features beyond what was asked.
- Avoid abstractions for single-use code.
- No "flexibility" or "configurability" that wasn't requested.
- If you write 200 lines and it could be 50, rewrite it.
- Goal: Senior engineers should view the code as simple, not clever.
3. Surgical Changes
Touch only what you must. Clean up only your own mess.
When editing existing code:
- Do not "improve" adjacent code, comments, or formatting unless requested.
- Do not refactor things that aren't broken.
- Match existing style perfectly, even if it contradicts your preferences.
- If you notice unrelated dead code, mention it instead of deleting it.
- Remove imports, variables, or functions that YOUR changes made unused.
4. Goal-Driven Execution
Define success criteria. Loop until verified.
Transform tasks into verifiable goals:
- "Add validation" → "Write tests for invalid inputs, then make them pass"
- "Fix the bug" → "Write a test that reproduces it, then make it pass"
- "Refactor X" → "Ensure tests pass before and after"
For multi-step tasks, state a brief plan:
1. [Step] → verify: [check]
2. [Step] → verify: [check]
Integration with Antigravity Kit
Align these guidelines with the following Antigravity standards:
- @[skills/clean-code]: Concise, direct logic and AAA testing.
- @[skills/brainstorming]: Use for complex request analysis (Socratic Gate).
- @[skills/tdd-workflow]: For implementing the "Goal-Driven Execution" phase.
More from skezu/skills
spec-driven-dev
Structured approach for building features through iterative spec documents. Use when (1) starting a new feature from a rough idea, (2) needing to create requirements, design, or implementation plans, (3) wanting to break down complex features into manageable coding tasks, (4) executing or implementing tasks from an existing spec, (5) the user mentions "spec", "requirements", "design document", "implementation plan", or "run task". Creates and manages .agent/specs/{feature-name}/.
12n8n-workflows-master
A skill for designing, building, validating, and securing n8n automation workflows, using specialized AI personas (Build Captain, QA, Security Architect). Use this skill to create production-ready n8n workflows from plain language specifications.
12pdf
Use this skill whenever the user wants to do anything with PDF files. This includes reading or extracting text/tables from PDFs, combining or merging multiple PDFs into one, splitting PDFs apart, rotating pages, adding watermarks, creating new PDFs, filling PDF forms, encrypting/decrypting PDFs, extracting images, and OCR on scanned PDFs to make them searchable. If the user mentions a .pdf file or asks to produce one, use this skill.
9frontend-design
Create distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, artifacts, posters, or applications (examples include websites, landing pages, dashboards, React components, HTML/CSS layouts, or when styling/beautifying any web UI). Generates creative, polished code and UI design that avoids generic AI aesthetics.
7skill-creator
Guide for creating effective skills. This skill should be used when users want to create a new skill (or update an existing skill) that extends Claude's capabilities with specialized knowledge, workflows, or tool integrations.
5cahier-des-charges
Rédige un Cahier des Charges (CdC) professionnel pour application mobile ou web en français. Ce skill transforme les spécifications techniques (requirements.md, design.md) en un document de cadrage formel. Il met l'accent sur les objectifs stratégiques, l'expérience utilisateur (UX/UI), les fonctionnalités détaillées, les contraintes techniques (iOS/Android, Swift/Kotlin) et la collaboration client-développeur.
5