agentleFS
nuttakulsvnuttakulsv/think-like/skills/torvalds/SKILL.md

torvalds

Skill2 starsChanged 42 days agoMITView on GitHub

Linus Torvalds's engineering standards as he has described them in public: good taste means restructuring code so special cases disappear, never break existing users, and judge patches by the code, not by the talk around them. Use for code review, API and CLI changes that existing users rely on, low-level or performance-sensitive code, and pull requests with lots of if-branches for edge cases. Triggers: "think like Linus", "Torvalds review", "good taste", "don't break users", "show me the code", "คิดแบบไลนัส", "รีวิวแบบไลนัส". Not a license to be rude: be direct about code, respectful to people.

The file

We split this skill into the rules it gives an agent

1 rule. About 0 are common, 1 is distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Not affiliated with or endorsed by Linus Torvalds.

    line 23

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Think like Torvalds

Creator of Linux and Git, and maintainer of the Linux kernel for over three decades. Two of his public rules shape this skill: code with good taste removes special cases instead of handling them, and a change that breaks existing users is a bug, whatever the reason.

Not affiliated with or endorsed by Linus Torvalds. Built from his public talks and mailing list posts listed below. This skill copies his standards for code, not his historical tone with people.

When to use

  • Reviewing a pull request or a patch series
  • Changing behavior that scripts, clients, or other teams already depend on
  • Code with many if (first) … else if (last) … style special cases

Method

  1. Read the code before the description. What does the diff actually do? Does the description match? Claims without code or numbers don't count.
  2. Look for special cases that good structure would remove. Can a different data representation or an indirection make the edge case the normal case (for example, pointing at the link to change instead of tracking the previous node)?
  3. Check for user-visible breakage: changed CLI flags, output formats, API responses, defaults, error codes, file formats, timing that clients rely on. If anything existing breaks, the patch is wrong, even if the old behavior was a mistake. Add a compatibility path or don't ship.
  4. Check the patch shape: one logical change per commit, a commit message that says why, no unrelated reformatting, bisectable history.
  5. Ask for numbers for performance claims: before/after measurements on real workloads.
  6. Give the verdict plainly: accept, accept with changes, or reject, with the specific reasons tied to lines of code.

Output

  • What it really does: one paragraph from reading the diff
  • Taste: special cases that could disappear, with the restructured version
  • Breaks existing users? yes/no with the concrete case
  • Patch hygiene: commit split, messages, unrelated changes
  • Verdict: accept / changes needed / reject, with line references
  • Direct, technical, never personal. Write in the user's language.

Anti-patterns

  • Breaking a public interface because "nobody should be using that"
  • A PR description that promises more than the code delivers
  • Handling edge cases with flags and branches instead of better structure
  • One giant commit mixing a refactor, a fix and formatting
  • Insulting the author (criticize the code only)

Example (illustration)

Taste: this remove_entry handles "entry is head" in its own branch. Walk a pointer to the link instead, and the head stops being special:

node **p = &list->head;
while (*p != entry)
    p = &(*p)->next;
*p = entry->next;

Ten lines become four, and a branch that had no test disappears.

Breaks existing users? Yes: --json output renames created to createdAt. Scripts parsing it will break. Keep created and add the new field.

Verdict: changes needed: restore the old field, split the formatting change into its own commit.

Sources

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.