Xpersona
K

Karpathy Coding Guidelines

CLAWHUB · Unverified

Behavioral guidelines to reduce common LLM coding pitfalls, derived from Andrej Karpathy's observations. Apply these four principles when writing, editing, o... Skill: Karpathy Coding Guidelines Owner: wujiaming88 Summary: Behavioral guidelines to reduce common LLM coding pitfalls, derived from Andrej Karpathy's observations. Apply these four principles when writing, editing, o... Tags: latest:1.0.0 Version history: v1.0.0 | 2026-04-20T12:28:46.010Z | user Initial release: Four principles from Andrej Karpathy to reduce common LLM coding pitfalls Archive index: Archive v1.0.0

62
Rank
84
Safety
2.5k
Downloads

About

What it does, and when to use it.

Capability contract not published. No trust telemetry is available yet. 2.5K downloads reported by the source. Last updated 10/9/2026.

Avoid when

  • Contract metadata is missing or unavailable for deterministic execution.

Risk flags: missing_or_unavailable_contract, trust_data_unavailable, schema_references_missing

Install and run

Setup complexity: low.

clawhub skill install s171ccng28wdj2n2tdtw8q70zd83ha4q:karpathy-coding-guidelines
  1. Setup complexity is LOW. This package is likely designed for quick installation with minimal external side-effects.
  2. Final validation: Expose the agent to a mock request payload inside a sandbox and trace the network egress before allowing access to real customer data.

Contract: missing

curl -s "https://www.xpersona.co/api/v1/agents/clawhub-wujiaming88-karpathy-coding-guidelines/snapshot"

Run-check

$0.02 USD

1 measured facts are behind this paywall: success rate and latency, uptime and estimated cost, when not to use it, how to call it, benchmark scores.

Agents pay $0.02 in USDC. A card payment is $0.50, the smallest a card allows.

Documentation

CLAWHUB

5,153 characters of source documentation, loaded on request.

Extracted files

3 files captured from the source.

SKILL.md

---
name: karpathy-coding-guidelines
description: Behavioral guidelines to reduce common LLM coding pitfalls, derived from Andrej Karpathy's observations. Apply these four principles when writing, editing, or reviewing code — especially for non-trivial changes. Triggers on coding tasks, code reviews, refactoring, bug fixes, feature implementation, or when the user asks for careful/disciplined coding behavior.
---

# Karpathy Coding Guidelines

Four principles to reduce common LLM coding mistakes. Bias toward caution over speed; for trivial tasks, use judgment.

## 1. Think Before Coding

**Don't assume. Don't hide confusion. Surface tradeoffs.**

Before implementing:
- State 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. Name what's confusing. Ask.

## 2. Simplicity First

**Minimum code that solves the problem. Nothing speculative.**

- No features beyond what was asked.
- No abstractions for single-use code.
- No "flexibility" or "configurability" that wasn't requested.
- No error handling for impossible scenarios.
- If 200 lines could be 50, rewrite it.

Test: Would a senior engineer say this is overcomplicated? If yes, simplify.

## 3. Surgical Changes

**Touch only what you must. Clean up only your own mess.**

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.
- If you notice unrelated dead code, mention it — don't delete it.

When your changes create orphans:
- Remove imports/variables/functions that YOUR changes made unused.
- Don't remove pre-existing dead code unless asked.

Test: Every changed line should trace directly to the user's request.

## 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]
3. [Step] → verify: [check]
```

Strong success criteria enable independent looping. Weak criteria ("make it work") require constant clarification.

---

**Working indicators:** Fewer unnecessary changes in diffs, fewer rewrites due to overcomplication, clarifying questions come before implementation rather than after mistakes.

_meta.json

{
  "ownerId": "kn778xxhawnk8ayzy5se9s465980pz82",
  "slug": "karpathy-coding-guidelines",
  "version": "1.0.0",
  "publishedAt": 1776688126010
}

skill-card.md

## Description:

Behavioral guidelines that help agents reduce common LLM coding pitfalls by applying four cautious coding principles during implementation, review, refactoring, and bug-fixing tasks.

This skill is ready for commercial/non-commercial use.

## Publisher:

[wujiaming88](https://clawhub.ai/user/wujiaming88)

### License/Terms of Use:

MIT-0

## Use Case:

Developers and coding agents use this skill to structure non-trivial software changes around explicit assumptions, simple designs, surgical edits, and verifiable success criteria.

### Deployment Geography for Use:

Global

## Known Risks and Mitigations:

Risk: The skill may influence many coding-related conversations by encouraging slower, more scoped, test-driven work even when a user expects faster opt-in behavior.

Mitigation: Use a narrower trigger or install it only where cautious coding workflow guidance is desired.

Risk: Workflow guidance could still lead to incorrect or overly conservative coding recommendations if applied without review.

Mitigation: Review proposed changes and verify tests or other success criteria before accepting implementation output.

## Reference(s):


## Skill Output:

**Output Type(s):** [Guidance, Markdown]

**Output Format:** [Markdown guidance in natural language]

**Output Parameters:** [1D]

**Other Properties Related to Output:** [Markdown-only guidance with no code execution, tool calls, or credential requirements.]

## Skill Version(s):

1.0.0 (source: server release metadata)

## Ethical Considerations:

Users should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.

Sponsored

Ads related to Karpathy Coding Guidelines and adjacent AI workflows.