AK

abdullahhameedkhan/karpathy-ponytail-skills

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

67 stars 质量 47 趋势 5

Karpathy的LLM编码指南与Ponytail的懒惰阶梯融合,写代码前要三思,爬上简洁阶梯,只触碰必须触及的部分。

概览

一个 CLAUDE.md 将 Andrej Karpathy 的 LLM 编码指南与 Ponytail 的懒惰阶梯合并,用于 Claude Code 及其他 AI 编码代理。 卡帕西识别了核心失效模式: “模型会替你做出错误的假设,然后不加核实地跟着他们走。他们不管理自己的困惑,不寻求澄清,不提出矛盾,不提出权衡,应该反驳时也不反驳。” “他们真的喜欢把代码和API搞得过于复杂,膨胀抽象,不清理死代码......实现一个超过1000行的臃肿结构,而100行就够了。” “他们有时仍然会更改或删除一些他们不够理解的注释和代码,作为副作用,即使这些内容与任务本身有直接关系。” 马尾补充了卡帕西简单规则所缺失的具体决策阶梯: “最好的代码是那些从未被写成的代码。从第一个存在的节点停下来:这个真的有必要存在吗?已经在代码库里了吗?标准库?

概述(AI 翻译)

一个 CLAUDE.md 将 Andrej Karpathy 的 LLM 编码指南与 Ponytail 的懒惰阶梯合并,用于 Claude Code 及其他 AI 编码代理。


为什么

卡帕西识别了核心失效模式:

“模型会替你做出错误的假设,然后不加核实地跟着它们走。他们不管理自己的困惑,不寻求澄清,不揭示不一致,不提出权衡,也不在应该反驳的时候反驳。”

“他们真的喜欢把代码和 API 搞得太复杂,抽象化,不清理死代码…在 1000 行上实现臃肿的结构,而 100 行就够了。”

“他们有时仍然会更改或删除注释和代码,作为副作用,即使这些内容与任务本身有直接关系。”

马尾补充了卡帕西简单规则所缺失的具体决策阶梯:

“最好的代码是从未写好的代码。停在第一个成立的节点:它真的需要存在吗?已经存在代码库了吗?标准库?原生平台?现有依赖?一行代码?只有这样:最低限度有效的代码。”

这个仓库会把两者合并成一个文件。


里面是什么

文件 目的

本页由 AI 翻译,技术细节请以原文为准。

README

karpathy-ponytail-skills

A single CLAUDE.md merging Andrej Karpathy’s LLM coding guidelines with Ponytail’s laziness ladder, for use with Claude Code and other AI coding agents.


Why

Karpathy identified the core failure modes:

“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.”

“They really like to overcomplicate code and APIs, bloat abstractions, don’t clean up dead code… implement a bloated construction over 1000 lines when 100 would do.”

“They still sometimes change/remove comments and code they don’t sufficiently understand as side effects, even if orthogonal to the task.”

Ponytail added the concrete decision ladder Karpathy’s simplicity rule was missing:

“The best code is the code never written. Stop at the first rung that holds: does this need to exist at all? Already in the codebase? Stdlib? Native platform? Existing dependency? One line? Only then: minimum code that works.”

This repo merges both into one file.


What’s inside

File Purpose
CLAUDE.md Drop into any project root — Claude Code loads it automatically
AGENTS.md Same content — for Codex, OpenCode, and agents that read AGENTS.md
skills/karpathy-ponytail/SKILL.md Claude Code plugin skill with frontmatter
.cursor/rules/karpathy-ponytail.mdc Cursor project rule — always-on

Install

Option 1 — Copy into your project (one project):

curl -o CLAUDE.md https://raw.githubusercontent.com/AbdullahHameedKhan/karpathy-ponytail-skills/main/CLAUDE.md

Option 2 — Append to an existing CLAUDE.md:

echo "" >> CLAUDE.md
curl https://raw.githubusercontent.com/AbdullahHameedKhan/karpathy-ponytail-skills/main/CLAUDE.md >> CLAUDE.md

Option 3 — Claude Code plugin (all projects):

Inside a Claude Code session:

/plugin marketplace add AbdullahHameedKhan/karpathy-ponytail-skills
/plugin install karpathy-ponytail@karpathy-ponytail

The five principles

  1. Think Before Coding — surface tradeoffs, ask before assuming, name confusion
  2. Simplicity — The Ladder — 7-rung decision ladder from YAGNI to minimum working code
  3. Surgical Changes — touch only what you must, clean up only your own mess
  4. Bug Fixes — root cause not symptom, grep all callers, fix the shared function once
  5. Goal-Driven Execution — define success criteria, loop until verified

Sources

在 GitHub 查看完整 README

推荐工具

换一个关键词,或者移除筛选条件。

安装

npx skillfish add abdullahhameedkhan/karpathy-ponytail-skills
新手?先看 mcpskill.org 教程 →