Skip to content
cccskills
FreePublished on GitHub

karpathy-guidelines

Behavioral guidelines to reduce common LLM coding mistakes. Use when writing, reviewing, or refactoring code to avoid overcomplication, make surgical changes, surface assumptions, and define verifiable success criteria.

The English summary is being prepared. Showing the original description.

See how to install

Files included (1)

  • SKILL.md2.3 KB

SKILL.md (original)

Review the instructions the agent will receive before you install.

Karpathy Guidelines

Derived from Andrej Karpathy's observations on common LLM coding mistakes. Biases toward caution over speed. Apply judgment on trivial tasks.

1. Think before coding

  • State assumptions explicitly. Uncertain → ask before proceeding
  • Multiple interpretations → present them, don't pick silently
  • Simpler approach exists → say so and push back
  • Unclear requirement → stop, name what's confusing, ask
  • Unknown API, method, or type → verify existence before using. Never hallucinate interfaces

2. Simplicity first

  • No features beyond what was asked
  • No abstractions for single-use code
  • No unrequested "flexibility" or "configurability"
  • No error handling for impossible scenarios
  • 200 lines that could be 50 → rewrite it

3. Surgical changes

When editing existing code:

  • Don't improve adjacent code, comments, or formatting
  • Don't refactor things that aren't broken
  • Match existing style even if you'd do it differently
  • Unrelated dead code → mention it, don't delete it

When your changes create orphans:

  • Remove imports/variables/functions YOUR changes made unused
  • Don't remove pre-existing dead code unless asked

Every changed line must trace directly to the user's request.

4. Destructive operations

  • Deletes, drops, truncates, overwrites → confirm explicitly before executing
  • Irreversible actions → state what will be lost and wait for approval
  • When in doubt, show the plan, don't run it

5. Goal-driven execution

Transform tasks into verifiable goals before starting:

  • "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 first:

1. [Step] → verify: [check]
2. [Step] → verify: [check]
3. [Step] → verify: [check]

Strong success criteria → loop independently to completion.

Reviews

No reviews yet. Tell others what you thought.

Comments

No login needed. Share how it worked for you, ask a question, or note where it did not run.

No comments yet. Be the first to write one.

Comments are published right away. Do not include personal information such as email addresses or phone numbers. Up to 2 URLs.

0 / 1,000 characters

This form is protected by reCAPTCHA, and the Google Privacy Policy and Terms of Service apply.

More skills from this repository

aws

Free

AWS best practices: IAM, secrets, networking, security, compute, IaC, ops. Use when building, reviewing, or modifying AWS resources.

The English summary is being prepared. Showing the original description.

SumonMSelim/agentguard54Updated Oct 12, 2026

docker

Free

Docker best practices: image security, build efficiency, runtime hardening, Compose, local tooling (Colima, OrbStack). Use when writing or reviewing Dockerfiles and Compose files.

The English summary is being prepared. Showing the original description.

SumonMSelim/agentguard54Updated Oct 12, 2026

gcp

Free

GCP best practices: IAM, secrets, networking, security, compute, IaC, ops. Use when building, reviewing, or modifying GCP resources.

The English summary is being prepared. Showing the original description.

SumonMSelim/agentguard54Updated Oct 12, 2026

go

Free

Idiomatic Go 1.25 practices: errors, interfaces, concurrency, generics, testing, security, tooling. Use when writing or reviewing Go code.

The English summary is being prepared. Showing the original description.

SumonMSelim/agentguard54Updated Oct 12, 2026

java

Free

Modern Java practices: design, errors, concurrency, security, testing, tooling. Targets Java 21 LTS baseline; Java 25 LTS features called out explicitly. Use when writing or reviewing Java code.

The English summary is being prepared. Showing the original description.

SumonMSelim/agentguard54Updated Oct 12, 2026

Kubernetes best practices: security, workloads, networking, config, operations, GitOps. Use when writing or reviewing K8s manifests and configurations.

The English summary is being prepared. Showing the original description.

SumonMSelim/agentguard54Updated Oct 12, 2026

See all skills by SumonMSelim

Report a problem with this skill