skills/karpathy-guidelines/SKILL.md
Four LLM-agent guardrails: surface assumptions, prefer simplicity, make surgical changes, and drive by verifiable goals. Reference for scope, simplicity, assumptions, or success-criteria judgment calls. Use when: "am I overcomplicating this", "what are my assumptions", "how do I verify success", "/karpathy", "/principles". Trigger: /karpathy, /principles.
npx skillsauth add phrazzld/agent-skills karpathy-guidelinesInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Four principles for avoiding the specific LLM-agent failure modes Karpathy has repeatedly called out on Twitter/X: silent assumption-picking, premature abstraction, scope creep into adjacent code, and vague success criteria. Use as a self-check before acting, or dispatch when an agent seems to be drifting.
Tradeoff. These bias toward caution over speed. For mechanical tasks (renames, find/replace, dep bumps) they're overhead — use judgment. The threshold is "does this need a judgment call?", same as for delegation.
This is a reference/self-check skill, so reading it does not satisfy the roster floor. When the underlying task is substantive, use the caller's Delegation Floor and commission specialized lanes for assumptions, simplicity, surgical scope, and verification risk as needed. Direct solo is fine for mechanical tasks where these guidelines are only a quick checklist.
Local lane guidance: If dispatched, use one narrowly scoped critic lane against the live artifact and the relevant principle; do not turn the four principles into a standing review bench.
Don't assume. Don't hide confusion. Surface tradeoffs.
Before implementing:
The failure this prevents: the model picks one interpretation of a vague request, runs three-hundred lines, and the user only discovers the mismatch after reviewing the diff. Surface the fork before the work, not after.
Example. Ticket: "add validation to the signup form."
Wrong: silently pick "validate email format + password length," ship that, discover the user wanted reCAPTCHA.
Right: before coding, state "I'm going to add client-side format validation for email and minimum-length for password. I'm not planning to wire up reCAPTCHA, rate limiting, or server-side checks. Confirm or redirect."
Minimum code that solves the problem. Nothing speculative.
Ask: "Would a senior engineer say this is overcomplicated?" If yes, simplify.
The failure this prevents: over-engineered scaffolding that obscures the actual change. Three design patterns, a new abstraction layer, and a config file to solve a problem that needed five lines.
Example. Ticket: "cache the user's timezone on the session."
Wrong: introduce a CacheProvider interface, implement it for
memory + Redis, add a config toggle, write factory functions.
Right: session.timezone = user.timezone; session.save().
Touch only what you must. Clean up only your own mess.
When editing existing code:
When your changes create orphans:
The test: every changed line should trace directly to the request.
This principle sits in productive tension with the broader doctrine's "Fix what you touch — including pre-existing issues in the same area." The tension resolves cleanly:
Broken means: wrong output, missing guard, actually-hit bug, fails the acceptance criteria. Not: "I'd name this differently", "this could be a helper", "this comment is stale-ish."
Define success criteria. Loop until verified.
Transform tasks into verifiable goals:
For multi-step tasks, state a brief plan:
1. [Step] → verify: [check]
2. [Step] → verify: [check]
3. [Step] → verify: [check]
Strong success criteria let the agent loop independently. Weak criteria ("make it work") require constant clarification and drift toward "works on my machine" endings.
This principle also unlocks delegation: a subagent given a vague goal produces vague work; a subagent given a verifiable oracle produces work you can check in 30 seconds.
These guidelines are working if:
Derived from forrestchang/andrej-karpathy-skills (MIT),
a community compilation of Andrej Karpathy's observations on
LLM coding pitfalls. Rewritten here with harness-neutral wording
and examples drawn from Harness Kit's own repo shape; the four
principles and their framing are Karpathy's.
Semantic waiver: this is a reference guardrail, not an executable workflow.
Validate catalog/trigger shape with
cargo run --locked -p harness-kit-checks -- check-frontmatter --repo .;
behavioral proof appears when a consuming skill cites the guardrail and the
resulting diff stays scoped and verifiable.
tools
Enumerates the peer AI agent CLIs installed on this machine (codex, claude, pi, opencode, cursor-agent, grok, agy, hermes, thinktank) and how to invoke each headlessly. A capability map, not a quota: useful for fresh-context adversarial review on a different model family, second opinions, competing attempts, and wide benches. Use when: "ask codex", "ask another model", "second opinion", "cross-model review", "what AI tools do I have", "other agents", "different model family", "adversarial critique from another provider". Trigger: /roster.
development
Run lane cards on Fly Sprites: remote, isolated, scale-to-zero sandboxes for heavy or parallel agent work. Golden-checkpoint provisioning so lanes start on a ready sprite with zero setup tokens. Use when: "run this on a sprite", "remote lane", "offload to a sandbox", "dispatch to sprites", "bake a sprite", "sprite fleet", heavy/long-running/parallel sub-agent work that should not run on this machine. Trigger: /sprites, /sprite-lane.
testing
Compose and launch roster-backed specialist lanes with prompt-native lane cards and receipts. Use when: "dispatch agents", "use subagents", "compose a team", "run provider lanes", "make lane cards". Trigger: /dispatch, /subagents, /lanes.
tools
Fast session-start repository orientation from live local evidence. Use when: "orient yourself", "start of session", "new session", "where are we", "catch me up before acting", "what should I do next", after compaction, after switching worktrees, or before choosing a Harness Kit workflow. Trigger: /orient, /ground, /session-start.