agentCLAWHUBUnverified

karpathy-principles

Pre-implementation gate covering think-first, simplicity, surgical edits, and verifiable goals Skill: karpathy-principles Owner: athola Summary: Pre-implementation gate covering think-first, simplicity, surgical edits, and verifiable goals Tags: latest:1.9.19 Version history: v1.9.19 | 2026-08-26T13:12:45.526Z | user Release v1.9.19 v1.9.17 | 2026-07-30T05:34:19.068Z | user Release v1.9.17 v1.9.16 | 2026-07-14T19:51:02.878Z | user Release v1.9.16 v1.9.14 | 2026-06-30T18:00:06.428Z | user Release v1.9.14 v1.9.1

OpenClaw

Rank

62

Safety

84

Downloads

1.0k

Updated

Oct 11, 2026

Version

1.9.19

Source

CLAWHUB

About

What it does, and when to use it.

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

Avoid when

  • Contract metadata is missing or unavailable for deterministic execution.

Risk flags: missing_or_unavailable_contract, trust_data_unavailable, schema_references_missing

Public facts

Every fact links back to the source it came from.

Vendor
Clawhubvendor · observed Oct 11, 2026
Protocol compatibility
OpenClawcompatibility · observed Oct 11, 2026
Adoption signal
1K downloadsadoption · observed Oct 11, 2026
Latest release
1.9.19release · observed Aug 26, 2026
Handshake status
UNKNOWNsecurity

Install and run

Setup complexity: low.

clawhub skill install s17emme0e2m3cpf7k2jvp3a84984b8z9:nm-imbue-karpathy-principles
  1. Setup complexity is classified as HIGH. You must provision dedicated cloud infrastructure or an isolated VM. Do not run this directly on your local workstation.
  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-athola-nm-imbue-karpathy-principles/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

144,186 characters of source documentation, loaded on request.

Extracted files

5 files captured from the source.

SKILL.md

---
name: karpathy-principles
description: |
  Pre-implementation gate covering think-first, simplicity, surgical edits, and verifiable goals
version: 1.9.8
triggers:
  - karpathy
  - coding-pitfalls
  - synthesis
  - entry-point
  - discipline
  - anti-overengineering
  - TDD
  - starting implementation to verify the approach
metadata: {"openclaw": {"homepage": "https://github.com/athola/claude-night-market/tree/master/plugins/imbue", "emoji": "\ud83e\udd9e", "requires": {"config": ["night-market.imbue:scope-guard", "night-market.imbue:proof-of-work", "night-market.imbue:rigorous-reasoning", "night-market.leyline:additive-bias-defense", "night-market.conserve:code-quality-principles"]}}}
source: claude-night-market
source_plugin: imbue
---

> **Night Market Skill** — ported from [claude-night-market/imbue](https://github.com/athola/claude-night-market/tree/master/plugins/imbue). For the full experience with agents, hooks, and commands, install the Claude Code plugin.


> The models make wrong assumptions on your behalf and
> just run along with them without checking. They don't
> manage their confusion, don't seek clarifications,
> don't surface inconsistencies, don't present
> tradeoffs, don't push back when they should.
>
> -- Andrej Karpathy, on agentic coding failure modes

## What This Is

A four-principle contract for reducing the most common
LLM coding pitfalls. Compact entry-point. Each
principle has a deeper-dive skill in night-market;
this skill is the index, not the encyclopedia.

Derivation: distilled by Forrest Chang
(forrestchang/andrej-karpathy-skills, MIT) from
Karpathy's observations. Full attribution in
`references/source-attribution.md`.

## When to Use

- Before starting any coding task larger than a typo
- During code review, to name the failure mode you see
- After writing a diff, to self-audit before claiming
  done
- When training a junior engineer to read agent diffs

## When NOT to Use

These principles bias toward caution over speed. For
cases listed in `modules/tradeoff-acknowledgment.md`,
use judgment: trivial fixes, exploratory spikes,
documentation-only edits, and time-boxed prototypes.

## The Four Principles

### 1. Think Before Coding

**State assumptions. Surface confusion. Match tone to
evidence.**

- If multiple interpretations of the request exist,
  list them. Do not silently pick.
- If a simpler approach exists, name it. Push back
  when the simpler path is correct.
- If something is unclear, stop and ask. Hidden
  assumptions are the cheapest bug to prevent and the
  most expensive to find later.
- Make claims no stronger than the evidence supports.
  Calibrated tone beats confident hand-waving.

Deep dives: `Skill(imbue:rigorous-reasoning)` for the
sycophancy guard, `Skill(superpowers:brainstorming)`
for option generation, `/spec-kit:speckit-clarify`
command for ambiguity drilldown.

### 2. Simplicity First

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

> They really like to overcomplic

_meta.json

{
  "ownerId": "kn7d107jg9jv602h9ytsegydq184a42s",
  "slug": "nm-imbue-karpathy-principles",
  "version": "1.9.19",
  "publishedAt": 1787749965526
}

modules/anti-patterns.md

# Anti-Patterns: Eight Named Drift Rails

Each drift rail names a specific way LLM-driven coding
goes wrong, with a trigger pattern, a short bad
example, a short good example, and a one-sentence
test you can apply to your own diff. Naming the rail
helps recall.

Adapted from observations distilled by Forrest Chang
from Karpathy's notes; see
`references/source-attribution.md` for the citation
chain. Examples are rewritten in our own prose to
illustrate the failure shape, not lifted verbatim.

## AP-1: Hidden Assumptions

**Maps to**: Principle 1 (Think Before Coding)

**Trigger**: User asks for a feature with multiple
unstated dimensions (scope, format, volume, privacy).
The agent picks one silently and ships.

**Bad shape**

```python
def export_users(format='json'):
    users = User.query.all()
    if format == 'json':
        with open('users.json', 'w') as f:
            json.dump([u.to_dict() for u in users], f)
```

Assumed: all users (privacy?), file path, fields,
volume.

**Good shape**

> Before implementing, I want to confirm:
>
> - Scope: all users, or filtered?
> - Format: download, background job, or API endpoint?
> - Fields: which? Some are sensitive.
> - Volume: thousands or millions?
>
> Default proposal: a paginated JSON endpoint. Adjust?

**Test**: count silent assumptions in the diff. Three
or more is a rail violation.

## AP-2: Multiple Interpretations Picked Silently

**Maps to**: Principle 1 (Think Before Coding)

**Trigger**: A request like "make the search faster"
has at least three valid readings (response time,
throughput, perceived speed). The agent picks one and
implements 200 lines without flagging the choice.

**Bad shape**

```python
@lru_cache(maxsize=1000)
async def search(query: str) -> List[Result]:
    # 200 lines of caching, async, indexes, all picked
    # without confirming what "faster" means
    ...
```

**Good shape**

> "Faster" could mean response time, throughput, or
> perceived speed. Each is a different fix:
>
> 1. Response time: indexes plus query caching (~2h)
> 2. Throughput: async path plus pooling (~4h)
> 3. Perceived: progressive load and partial results
>    (~3h)
>
> Current: ~500ms typical. Which axis matters?

**Test**: when the verb in the request is ambiguous
(faster, better, cleaner, simpler), did the agent name
the alternatives or pick one?

## AP-3: Strategy Pattern for One Function

**Maps to**: Principle 2 (Simplicity First)

**Trigger**: User asks for a single function. The
agent ships an abstract base class, two implementing
classes, a config dataclass, and a coordinator class
for ten lines of arithmetic.

**Bad shape**

```python
class DiscountStrategy(ABC):
    @abstractmethod
    def calculate(self, amount: float) -> float: ...

class PercentageDiscount(DiscountStrategy):
    def __init__(self, p): self.p = p
    def calculate(self, a): return a * (self.p / 100)

# Plus FixedDiscount, DiscountConfig, DiscountCalculator
# for what should be one function
```

**Good shape**

```pyt

modules/senior-engineer-test.md

# The Senior Engineer Test

A three-question battery to apply to your own code
before claiming it is done. The questions stand in
for the senior engineer who is not in the room.

Adapted from a self-check Karpathy calls out for
agentic coding: ask whether a senior engineer would
say this is overcomplicated. We expand the question
into three concrete sub-questions that map to common
LLM coding failures.

## The Question

> Would a senior engineer who is busy and a little
> grumpy say this code is overcomplicated?

If yes, the diff is not ready.

## The Three Sub-Questions

### Q1: Could this be 50% shorter without losing meaning?

Most LLM-written code can be cut by a third to a
half. If the diff is 200 lines, ask: which 100 lines
exist because the agent felt clever, not because the
problem demanded them?

Common 50% wins:

- Replace abstract base class plus two subclasses
  with one function plus a parameter.
- Replace try-except wrapping every call with a
  single boundary handler.
- Replace explicit getter and setter with direct
  attribute access.
- Replace nested conditionals with a flat early-return
  pattern.

### Q2: Are abstractions earning their weight?

An abstraction earns its weight when it is used three
or more times, or when it isolates a real boundary
(network, disk, locale). A class with one consumer is
ceremony. A factory with one product is ceremony.

Test: for every type, class, or helper added, count
the call sites. One call site means the abstraction
costs more than it saves.

### Q3: Could a junior dev follow this in six months?

Six months means: docs may have rotted, original
context is gone, the original author is on another
team. The code has to carry its own meaning.

Failure signals:

- Names that mean something only if you remember the
  ticket
- Comments that describe what the code does (the code
  shows that) instead of why
- Indirection that requires three jumps to find the
  actual logic
- Implicit invariants that nothing checks and nothing
  documents

## The Decision Tree

```
For each of Q1, Q2, Q3:
  - Yes -> next question
  - No  -> stop and address before shipping

If three Yes -> ship
If any No   -> rework that dimension first
```

A No answer is not a failure of the agent; it is the
agent doing its job. Catching the violation before
the senior engineer catches it is the entire point.

## Worked Example

Diff under review: a class hierarchy for a single
discount calculation.

- Q1 (50% shorter)? Yes obviously: one function
  replaces five classes.
- Q2 (abstractions earning weight)? No: zero
  additional call sites for the strategy pattern.
- Q3 (junior in six months)? No: two indirection hops
  to find the multiplication.

Two No answers means rework. Replace the hierarchy
with the function. Now Q1, Q2, Q3 are all yes.

## When the Test Does Not Apply

The senior-engineer test assumes the code will be
read again. For a one-shot data migration that runs
once and is deleted, the test is too strict. See
`trad

modules/tradeoff-acknowledgment.md

# Tradeoff Acknowledgment: When Not to Apply These

The four principles bias toward caution. That bias
costs speed. For a substantial portion of coding work
the cost is worth paying. For a non-trivial minority,
the cost is wrong. This module names the boundary
honestly.

The upstream framing puts it as: "These guidelines
bias toward caution over speed. For trivial tasks,
use judgment." That sentence does the same work as
this module, just compressed.

## When the Principles Do Not Apply

### Trivial One-Line Fixes

Asking three clarifying questions before fixing a
typo in a comment is a parody of caution. For diffs
under five lines with obvious intent, ship and move
on. Principle 1 (Think Before Coding) is for
ambiguous requests, not unambiguous ones.

### Exploratory Spikes and Throwaway Scripts

A 50-line script that runs once, produces a CSV, and
gets deleted does not need the senior-engineer test.
It does not need TDD. It does not need careful
abstraction analysis. The artifact's lifetime caps
the time worth investing in its quality.

Test: if the script will run again next week, treat
it like real code. If you will throw it away in an
hour, do not over-invest.

### Documentation-Only Changes

Style drift in docs is often the point. Rewriting a
paragraph for clarity touches every line by design.
Principle 3 (Surgical Changes) was written for code
diffs, where adjacent edits hide intent. Prose is
different.

### Time-Boxed Prototypes

A "by Friday or we move on" prototype is a different
artifact from a feature. Verifiable success criteria
for a prototype look like "the demo runs end to
end," not "the test suite is green." Calibrate
ambition to the deadline.

### Production Fires

When the database is on fire, "let's write a failing
test first" is the wrong move. Stop the fire, then
write the test that prevents the next fire. The Iron
Law assumes a normal-operations context.

## Contrarian Voices Worth Engaging

Three voices push back on rigorous-by-default LLM
coding rules. Their critiques sharpen the boundary.

**Simon Willison** ("Not all AI-assisted programming
is vibe coding," March 2025) defends throwaway
prototyping as legitimate. His golden rule: do not
commit code you cannot explain. That rule is
compatible with everything in this skill, but it
makes the throwaway-prototype boundary explicit.

**Mastering Product HQ** ("What Karpathy's CLAUDE.md
misses") argues code simplicity does not equal scope
simplicity. A 50-line solution to the wrong problem
is still waste. The principles help with how to
build; they do not help with what to build. For
"what," see `Skill(imbue:scope-guard)` and
`Skill(imbue:feature-review)`.

**NMN.gl** ("Vibe Coding Considered Harmful," March
2025) warns that vibed black boxes compound. This is
adjacent support for the principles, not pushback,
but it names the real cost of skipping them at scale:
each black box you accept becomes a future debugging
expense.

## The Honest Bottom Line

These principles solve a 
Github ReposUpdated 2d agoRank 70

AionUi

Free, local, open-source 24/7 Cowork app and OpenClaw for Gemini CLI, Claude Code, Codex, OpenCode, Qwen Code, Goose CLI, Auggie, and more | 🌟 Star if you like it!

MCPOPENCLAW
Github ReposUpdated 6mo agoRank 70

activepieces

AI Agents & MCPs & AI Workflow Automation • (~400 MCP servers for AI agents) • AI Automation / AI Agent with MCPs • AI Workflows & AI Agents • MCPs for AI Agents

OPENCLAW
Github ReposUpdated 6mo agoRank 70

cherry-studio

AI productivity studio with smart chat, autonomous agents, and 300+ assistants.

MCPOPENCLAW
Github ReposUpdated 7mo agoRank 70

CopilotKit

The Frontend for Agents & Generative UI. React + Angular

OPENCLAW

Machine-readable data

The same record, as JSON, for agents and crawlers.

{
  "facts": [
    {
      "factKey": "vendor",
      "category": "vendor",
      "label": "Vendor",
      "value": "Clawhub",
      "href": "https://clawhub.ai/athola/skills/nm-imbue-karpathy-principles",
      "sourceUrl": "https://clawhub.ai/athola/skills/nm-imbue-karpathy-principles",
      "sourceType": "profile",
      "confidence": "medium",
      "observedAt": "2026-10-11T17:54:19.397Z",
      "isPublic": true
    },
    {
      "factKey": "protocols",
      "category": "compatibility",
      "label": "Protocol compatibility",
      "value": "OpenClaw",
      "href": "https://www.xpersona.co/api/v1/agents/clawhub-athola-nm-imbue-karpathy-principles/contract",
      "sourceUrl": "https://www.xpersona.co/api/v1/agents/clawhub-athola-nm-imbue-karpathy-principles/contract",
      "sourceType": "contract",
      "confidence": "medium",
      "observedAt": "2026-10-11T17:54:19.397Z",
      "isPublic": true
    },
    {
      "factKey": "traction",
      "category": "adoption",
      "label": "Adoption signal",
      "value": "1K downloads",
      "href": "https://clawhub.ai/athola/nm-imbue-karpathy-principles",
      "sourceUrl": "https://clawhub.ai/athola/nm-imbue-karpathy-principles",
      "sourceType": "profile",
      "confidence": "medium",
      "observedAt": "2026-10-11T17:54:19.397Z",
      "isPublic": true
    },
    {
      "factKey": "latest_release",
      "category": "release",
      "label": "Latest release",
      "value": "1.9.19",
      "href": "https://clawhub.ai/athola/nm-imbue-karpathy-principles",
      "sourceUrl": "https://clawhub.ai/athola/nm-imbue-karpathy-principles",
      "sourceType": "release",
      "confidence": "medium",
      "observedAt": "2026-08-26T13:12:45.526Z",
      "isPublic": true
    },
    {
      "factKey": "handshake_status",
      "category": "security",
      "label": "Handshake status",
      "value": "UNKNOWN",
      "href": "https://www.xpersona.co/api/v1/agents/clawhub-athola-nm-imbue-karpathy-principles/trust",
      "sourceUrl": "https://www.xpersona.co/api/v1/agents/clawhub-athola-nm-imbue-karpathy-principles/trust",
      "sourceType": "trust",
      "confidence": "medium",
      "observedAt": null,
      "isPublic": true
    }
  ],
  "events": [
    {
      "eventType": "release",
      "title": "Release 1.9.19",
      "description": "Release v1.9.19",
      "href": "https://clawhub.ai/athola/nm-imbue-karpathy-principles",
      "sourceUrl": "https://clawhub.ai/athola/nm-imbue-karpathy-principles",
      "sourceType": "release",
      "confidence": "medium",
      "observedAt": "2026-08-26T13:12:45.526Z",
      "isPublic": true
    }
  ]
}

Record generated Oct 11, 2026.

Sponsored

Ads related to karpathy-principles and adjacent AI workflows.