본문으로 건너뛰기
cccskills
무료GitHub에 공개

karpathy-guidelines

Behavioral guardrails against the six most common LLM coding failure modes: unstated assumptions, overbuilding, changes beyond the ask, no success condition, claiming done without output, and sprawling non-atomic changes. Use when writing, editing, reviewing or refactoring code, when the user says 'keep it simple', 'surgical change', 'don't over-engineer', 'minimal diff' or 'verify before saying done', or when a change keeps growing beyond the ask. For a full code review, see code-review.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

설치 방법 보기

포함된 파일(1)

  • SKILL.md7.8 KB

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

Karpathy Guidelines

Six failure modes. Six rules. Apply all six on every coding task.

Inspired by Andrej Karpathy's observations (Jan 2026).

Compliance Checklist

Run this before each phase:

Before writing code: rules 1, 2, 4 While editing: rule 3 Before claiming done: rules 5, 6

  • 1. Did I name every assumption I'm making?
  • 2. Is my solution the minimum that satisfies the request?
  • 3. Did I change only what the request requires?
  • 4. Did I define a verifiable success condition before starting?
  • 5. Do I have command output proving completion?
  • 6. Does my diff do exactly one thing?

1. Name Every Assumption Before Writing Code

Trigger: At the start of any task where the request requires an implicit choice - a library, a data structure, an architecture decision, an interpretation of ambiguous scope.

Rule: State every assumption before writing a line. If a requirement has multiple valid interpretations, list them and declare which one you will implement. Do not silently pick.

Do:

  • "I'm assuming in-memory cache here, not Redis. This won't work across multiple instances - let me know if that matters."
  • "This endpoint could return 404 or an empty array for missing records. I'll use 404 to match the pattern in users.ts."

Do not:

  • Silently choose a library, algorithm, or pattern without naming it.
  • Proceed when the request is ambiguous. Stop and write: "This could mean X or Y - which one should I implement?"
  • State an assumption after you've already coded the decision.

Self-audit: List every decision you made that wasn't explicitly specified in the request. If any decision is unnamed, name it before proceeding.


2. Implement the Minimum That Satisfies the Request

Trigger: Before writing any code, adding a dependency, creating an abstraction, or adding an error handler.

Rule: Write only what was asked for. Every line of code you write must be traceable to an explicit requirement in the request. If it isn't, do not write it.

Do:

  • Request: "Add a function to format a date as DD-MM-YYYY." → Write one function. Return a string. Nothing else.
  • Request: "Handle the 400 error from the payments API." → Handle the 400 case. Leave other error codes alone.

Do not:

  • Add an options parameter "in case someone needs flexibility later."
  • Create an abstract base class when a single function was asked for.
  • Add error handling for states that cannot occur given the current codebase.
  • Extract a helper for code that has exactly one caller.
  • Add logging, metrics, or observability that wasn't requested.

Self-audit: If you removed every line that wasn't directly traceable to the request, would the task still be complete? If yes, those lines should not exist.


3. Change Only What the Request Requires

Trigger: Every time you open an existing file to edit it.

Rule: Modify only the code necessary to fulfill the request. Do not refactor, rename, reformat, or clean up code adjacent to your changes - even if you would write it differently.

Do:

  • Fix the broken function. Leave every other function in the file exactly as it is.
  • Remove imports, variables, and helpers that YOUR change made unused.
  • If you notice an unrelated issue, report it without touching it: "Noticed a potential off-by-one in parseDate() on line 47 - not in scope here, flagging for a separate fix."

Do not:

  • Rename variables you find unclear but were not asked to rename.
  • Reformat surrounding code to match your preferred style.
  • Fix a bug you noticed in a nearby function.
  • Delete pre-existing dead code unless explicitly asked to remove it.
  • "Improve" a function while passing through it.

Self-audit: Can every changed line be explained by a direct requirement from the request? If a line changed for any other reason, revert it.


4. Define a Verifiable Success Condition Before Starting

Trigger: At the start of any task with more than one step, any bug fix, or any refactor.

Rule: Before writing code, state what "done" means as something you can verify with a command. Subjective criteria ("it works", "looks correct") are not success conditions. A passing test, a specific API response, or a zero-error build output are.

Do:

  • "Fix the login bug" → "A test reproducing the exact failure exists and passes."
  • "Add pagination" → "GET /items?page=2 returns the correct slice with total_pages in the response body."
  • For multi-step tasks, state the plan before starting:
    1. Write failing test for the broken case   → verified by: test output shows 1 failure
    2. Implement the fix                        → verified by: that test passes
    3. Confirm no regressions                   → verified by: full suite passes
    

Do not:

  • Start writing code before you can answer: "What command will I run to confirm this is done?"
  • Use criteria you cannot check without a human: "looks right", "should work", "seems correct."

Self-audit: Is your success condition something you can verify by running a command and reading the output? If not, restate it until it is.


5. Show Command Output Before Claiming Done

Trigger: Any time you are about to write the words "done", "fixed", "complete", "it works", or "tests pass."

Rule: Run the verification command. Paste the relevant output. Do not claim completion without evidence. If verification is impossible (UI-only change, no test harness), state that explicitly - do not imply success.

Do:

  • "I ran pytest tests/auth_test.py -v - 14 passed, 0 failed." [paste output]
  • "Build succeeded: npm run build exited with code 0." [paste last 5 lines]
  • "There is no automated test for this UI change. Manual verification is required on the login screen at /auth/login."

Do not:

  • Write "the tests should pass now" without running them.
  • Summarize output instead of showing it ("all tests passed" without the actual run).
  • Claim the task is done after reading the code without executing it.
  • Say "it looks correct" as a substitute for running a check.

Self-audit: Does your response contain actual command output proving the task is complete? If not, run the command before responding.


6. Keep Each Change Atomic

Trigger: Any time you notice a second issue while working on the first, or when your diff touches more than one logical concern.

Rule: One diff, one purpose. If you discover a second bug while fixing the first, stop - report it and leave it unfixed. Do not bundle unrelated changes into the same commit.

Do:

  • Fix only what was asked. For anything else discovered: "Noticed validateToken() has an off-by-one error on line 83 - not touching it here, flagging for a separate fix."
  • Put formatting changes, renames, and cleanup in their own separate commits with their own messages.

Do not:

  • Fix two bugs in one commit because they are "related."
  • Add a feature and fix a bug in the same change.
  • Rename a function and change its behavior in the same commit.
  • Include whitespace or style cleanup in a functional change.

Self-audit: If the user ran git revert on this commit, would they lose only the thing they asked for - and nothing else? If they would also lose something unrelated, split the commit before proceeding.

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

Rate any product, feature, or experience on the 11-star scale (Brian Chesky's Airbnb thought experiment). Use when user says "rate this experience", "11-star", "star rating", "experience audit", "how good is this", "experience rating", "product audit", "quality assessment", or wants to evaluate product quality and identify improvement paths. Also trigger when user wants to benchmark a feature, assess where a product stands, or map out what "great" looks like - even if they don't explicitly say "11-star".

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

qa-aman/claude-skills212026년 10월 19일 업데이트

Generate A/B copy variants grounded in Eugene Schwartz's awareness and market-sophistication stages and John Caples' tested-headline discipline. Every variant declares its angle, the awareness stage it targets, and a falsifiable hypothesis, and the skill recommends which pair to test first and what delta counts as signal. Use when the user says "A/B test this", "write variants", "give me options", "test different angles", "copy variants", "ab copy", "test this headline", "multiple versions", "which version is better", or wants to test copy before publishing. For reviewing copy that already exists, see copy-review. For sample size and stopping rules, see growth-experiment. For diagnosing a page rather than its words, see page-cro. For full paid ad sets by platform, see ad-campaign-writer.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

qa-aman/claude-skills212026년 10월 19일 업데이트

Design statistically rigorous experiments to test data science hypotheses. Use when the user says "design an A/B test", "run an experiment", "test this hypothesis", "is this difference significant", "how many samples do I need", "randomized controlled trial", "causal inference", "uplift test", "holdout group", "significance test", "power calculation", "avoid p-hacking", or needs to determine whether an observed effect is real before making a product or model decision. For lean build-measure-learn product experiments without the statistics, use experiment-design instead.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

qa-aman/claude-skills212026년 10월 19일 업데이트

Write measurable acceptance criteria for requirements or user stories. Use when the user says "write acceptance criteria", "definition of done", "how do we test this", "fit criteria", "given when then", "Gherkin scenarios", "what does done look like", "testable conditions", "how will we know this works" - even if they don't explicitly say "acceptance criteria".

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

qa-aman/claude-skills212026년 10월 19일 업데이트

Build a strategic account plan for winning, retaining, or expanding a named account. Use when the user says "build an account plan", "strategic account planning", "how do I grow this account", "account expansion strategy", "whitespace analysis", "QBR prep", "key account review", "map the stakeholders in this account", "land and expand plan", "how do I break into [company]", or wants a structured strategy for a specific account.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

qa-aman/claude-skills212026년 10월 19일 업데이트

Write paid ad copy for LinkedIn, Google, Meta, and YouTube. Produces multiple variants per platform, each targeting a different Eugene Schwartz awareness level and Cialdini persuasion principle. Use when the user asks for ad copy, ad variants, "write LinkedIn ads", Google ads, Meta ads, paid social copy, ad headlines, or wants creative for a paid campaign. Reads brand voice, ICP, and positioning from knowledge/. For organic social posts, see linkedin-post or social-calendar. For the landing page the ad points at, see landing-page-writer. For testing variants, see ab-copy-writer.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

qa-aman/claude-skills212026년 10월 19일 업데이트

qa-aman의 스킬 모두 보기

이 스킬의 문제 신고