Skip to content

Github trending [multica-ai/andrej-karpathy-skills] 优化Claude编码行为 #361

@web1992

Description

@web1992

项目地址

https://github.com/multica-ai/andrej-karpathy-skills

AI 摘要

该项目提供一份 CLAUDE.md 文件,旨在改善 Claude Code 的编码行为。它基于 Andrej Karpathy 指出的 LLM 编码痛点(如错误假设、过度复杂化、无关修改等),提出了四项原则:先思考再编码(明确假设、不隐藏困惑)、简洁优先(不写多余代码)、精准修改(只改动必要部分)、目标驱动执行(以可验证标准为导向)。支持通过 Claude Code 插件或直接下载安装,也可用于 Cursor。

README 原文

Karpathy-Inspired Claude Code Guidelines

Check out my new project Multica — an open-source platform for running and managing coding agents with reusable skills.

Follow me on X: https://x.com/jiayuan_jy

A single CLAUDE.md file to improve Claude Code behavior, derived from Andrej Karpathy's observations on LLM coding pitfalls.

English | 简体中文

The Problems

From Andrej's post:

"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."

The Solution

Four principles in one file that directly address these issues:

Principle Addresses
Think Before Coding Wrong assumptions, hidden confusion, missing tradeoffs
Simplicity First Overcomplication, bloated abstractions
Surgical Changes Orthogonal edits, touching code you shouldn't
Goal-Driven Execution Leverage through tests-first, verifiable success criteria

The Four Principles in Detail

1. Think Before Coding

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

LLMs often pick an interpretation silently and run with it. This principle forces explicit reasoning:

  • State assumptions explicitly — If uncertain, ask rather than guess
  • Present multiple interpretations — Don't pick silently when ambiguity exists
  • Push back when warranted — If a simpler approach exists, say so
    ...

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions