Skip to content

Github trending [multica-ai/andrej-karpathy-skills] 优化AI编码行为的指南 #355

@web1992

Description

@web1992

项目地址

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

AI 摘要

该项目提供了一份受 Andrej Karpathy 启发、用于改善 Claude Code 编码行为的 CLAUDE.md 指南文件。它针对 LLM 编程中常见的四大问题(错误假设、过度复杂化、误改无关代码、目标模糊),提出了四项核心原则:先思考再编码、保持简洁、精准修改、目标驱动执行。项目还支持通过 Claude Code 插件或直接下载 CLAUDE.md 文件安装,并适配 Cursor 编辑器,帮助开发者更高效地管理 AI 编程行为。

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