Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 

Repository files navigation

Coding Principles

四個行為準則,來自 Andrej Karpathy 對 LLM 編碼陷阱的觀察。

"LLMs often pick an interpretation silently and run with it, 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."
— Andrej Karpathy

Principles

Principle Problem It 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 Weak success criteria, no verifiable loops

Usage

For a new project

curl -O https://raw.githubusercontent.com/ting07081010-ui/coding-principles/main/CLAUDE.md

For an existing project (append)

cat CLAUDE.md >> path/to/your/CLAUDE.md

As a Claude Code plugin

/plugin install coding-principles

How to Tell It's Working

  • Diffs 中不必要的改動變少
  • 因 overcomplication 而重寫的次數變少
  • Clarifying 問題在錯誤之前提出,而非之後

Credits

Based on forrestchang/andrej-karpathy-skills
Original insight: Andrej Karpathy (X/Twitter)

About

Coding principles based on Andrej Karpathy's LLM pitfalls: Think Before Coding, Simplicity First, Surgical Changes, Goal-Driven Execution

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors