karpathy-guidelines

Apply coding guidelines to reduce LLM mistakes during code writing and review.

Updated Oct 10, 2023
One-click install
npx skills add https://github.com/kirakuiin/note --skill karpathy-guidelines-kirakuiin
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: karpathy-guidelines
Source: https://github.com/kirakuiin/note/tree/main/Obsidian%20Vault/9-Meta/Skills/coding-guideline
Command: npx skills add https://github.com/kirakuiin/note --skill karpathy-guidelines-kirakuiin

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Behavioral guidelines to reduce common LLM coding mistakes, derived from Andrej Karpathy's observations on LLM coding pitfalls, helping teams write, review, and refactor code with fewer errors and less overcomplication.

Core Features & Use Cases

  • Clear, focused rules like Think Before Coding, Simplicity First, Surgical Changes, and Goal-Driven Execution.
  • Use Case: when drafting or reviewing code to surface assumptions, limit feature creep, and enforce verifiable success criteria.
  • Use Case: during refactors to minimize changes and preserve original behavior.

Quick Start

Apply these guidelines in every coding task to minimize changes and surface assumptions.

Frequently Asked Questions about karpathy-guidelines

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I reduce common LLM coding mistakes during AI-assisted code generation?

To reduce LLM coding mistakes, apply behavioral guidelines that enforce simplicity first, surgical changes, and goal-driven execution. This surfaces hidden assumptions and limits feature creep during AI-assisted code writing and refactoring.

What are surgical changes in code review and how do they prevent overcomplication?

Surgical changes are minimal, targeted code modifications that preserve original behavior during refactoring. Enforcing surgical changes during code review prevents overcomplication and limits unnecessary feature creep introduced by LLMs.

How do I surface assumptions when writing code with an LLM?

To surface assumptions during LLM coding, apply constraints that require explicit assumptions and verifiable success criteria before implementation. This ensures goal-driven execution and adherence to established coding guidelines.

Can I use coding guidelines to enforce minimal features during refactoring?

Yes, you can use coding guidelines to enforce minimal features during refactoring. Applying rules like surgical changes and simplicity first minimizes modifications and preserves the original behavior of the codebase.

When should I apply AI coding guidelines to avoid errors in software development?

Apply AI coding guidelines during writing, reviewing, or refactoring code. These constraints help surface assumptions, enforce verifiable success criteria, and reduce common LLM coding mistakes throughout the software development lifecycle.

What is the best way to limit feature creep in AI-generated code?

The best way to limit feature creep in AI-generated code is to enforce simplicity first and goal-driven execution. Applying surgical changes and explicit assumptions ensures the LLM adheres to minimal feature requirements and established guidelines.