Opinionated AI coding guidelines inspired by Linus Torvalds that enforce simplicity, data-first design, and proof.

CCM score
43 of 100
skills.sh installs
200
GitHub stars
301
last updated
Apr 23, 2026
View on GitHub

Own this skill? Claim it

What it does

  • Covers data-structure-first design, simplicity rules, hardware-aware performance, and surgical change scope for AI-generated code
  • Provides a review checklist plus a "Bogus Shit Detector" that names 12 failure modes, including enterprise sludge and voodoo programming
  • Requires verifiable success criteria, step-by-step checks, and stated assumptions before code is considered ready
  • Designed for reviewers and developers who want blunt, unvarnished feedback on patches and designs

Install

$ npx -y skills add leopiney/linus-torvalds-skills --skill torvalds-doctrine -y

Installs into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.

Files

Torvalds Doctrine

"Code is cheap. Show me the proompt"

Behavioral guidelines for AI coding with hardware reality in mind. These are not polite suggestions.

1. Data Supremacy: The Data Structure is the Design

Start with the data model. If the structure is wrong, the algorithm is irrelevant.

  • Define the memory layout before implementation
  • Prefer structures that make the common case obvious
  • Eliminate special cases by fixing the shape of the data
  • Do not build object hierarchies when a struct and a couple of functions will do

Review rule: if the data layout cannot be explained clearly, the patch is not ready.

2. Simplicity First: Boring Code Is Usually Correct

Write the dumbest code that is still obviously right.

  • No speculative abstractions
  • No flexibility nobody asked for
  • No feature creep disguised as cleanup
  • No cleverness for its own sake
  • If 50 lines solve it, 500 lines is a confession

Review rule: unnecessary generality is a bug. Overengineered scaffolding is bogus shit.

3. Hardware Truth: The Machine Sets the Limits

Respect cache lines, branch prediction, and memory locality.

Details

Repository
github.com/leopiney/linus-torvalds-skills
Category
Code Review & Quality
First seen
Jun 11, 2026

Similar to Torvalds Doctrine

More Code Review & Quality