torvalds

torvalds is a skill for Claude Code, Codex from Kevin-Liu-01/Agent-Machines. It costs 54 tokens per session (1,502 once invoked), scanned A, original, MIT.

A set of design principles for simplifying software by removing unnecessary special cases. It uses code examples to explain how cleaner interfaces can make algorithms easier to understand.

In plain words
What is it for?
Use it when designing systems, refactoring conditional logic, extracting shared packages, or deciding whether an interface needs another option.
Why use it?
It helps developers avoid adding exceptions and conditional branches that make code harder to maintain.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it when designing systems, refactoring conditional logic, extracting shared packages, or deciding whether an interface needs another option.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/kevin-liu-01/agent-machines/torvalds
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add Kevin-Liu-01/Agent-Machines --skill torvalds
Clone the repo
git clone --depth 1 https://github.com/Kevin-Liu-01/Agent-Machines

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for torvalds

README.md
[![agentmods](https://agentmods.dev/badge/skills/kevin-liu-01/agent-machines/torvalds/github.svg)](https://agentmods.dev/skills/kevin-liu-01/agent-machines/torvalds)
Your own site
<a href="https://agentmods.dev/skills/kevin-liu-01/agent-machines/torvalds"><img src="https://agentmods.dev/badge/skills/kevin-liu-01/agent-machines/torvalds/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for torvalds

Your own site · 80×15
<a href="https://agentmods.dev/skills/kevin-liu-01/agent-machines/torvalds"><img src="https://agentmods.dev/badge/skills/kevin-liu-01/agent-machines/torvalds.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 54 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,502 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00054 $0.01502
Opus 5 $0.00027 $0.00751
Sonnet 5 $0.00011 $0.00300
Haiku 4.5 $0.00005 $0.00150

Measured 9d ago against content hash d0b31cd83ce6, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

torvalds scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 9d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

knowledge/skills/torvalds/SKILL.md · 167 lines

How it starts

The opening of the file, as written. The whole thing — 167 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Good Taste

The linked list example

Linus Torvalds showed two ways to remove a node from a singly linked list.

Without taste (the standard textbook approach):

void remove(list *head, list *target) {
    list *prev = NULL;
    list *cur = head;
    while (cur != target) {
        prev = cur;
        cur = cur->next;
    }
    if (prev)
        prev->next = cur->next;
    else
        head = cur->next;
}

The if (prev) branch exists because the head node has no predecessor. Removing the first element is a special case: instead of patching the previous node's next pointer, you must patch the head pointer itself. Every reader of this function has to understand that the head is different from every other node, and that this branch handles it.

With taste:

void remove(list *head, list *target) {
    list **pp = &head;
    while (*pp != target)
        pp = &(*pp)->next;
    *pp = target->next;
}

The indirect pointer pp always points to the next field that refers to the current node. For the head, pp points to head itself. For every other node, pp points to prev->next. The assignment *pp = target->next patches whichever pointer was referring to the target, whether that was head or some node's next field.

The special case disappeared. Not because we handled it elsewhere, but because we chose a representation where head and non-head are the same. The branch was never necessary. It was an artifact of the data structure choice (prev pointer), not of the problem.

Why the first version is bad code:

  1. The branch doubles the mental load. A reviewer must verify both paths are correct and that the condition is right.
  2. The branch is easy to get wrong. Off-by-one in the prev == NULL check, or forgetting to update head, are common linked-list bugs.
  3. The branch doesn't scale. If you add a tail pointer, you need another special case. The indirect-pointer version handles it with zero additional code.

Read the full file on GitHub · 167 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 9d ago First seen · 167 lines · 54 tokens per session scan A d0b31cd83ce6

Subscribe to this mod's changes

torvalds is a skill published in the GitHub repository Kevin-Liu-01/Agent-Machines (29 stars, last pushed today), licensed MIT. It adds 54 tokens to every session and 1,502 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

Other skills, from other repositories

dx-roaster

Brutally honest developer-experience audit for a GitHub repo. Scores 10 DX dimensions (time-to-first-success, README clarity, visual proof, install, quick-start, docs, examples, community, trust, marketing), writes a shareable roast in the requested tone (brutal/honest/kind), produces a prioritized action plan ranked…

Varnan-Tech/opendirectory · 130 tokens

mcp-review

Review MCP server specifications and updates for compliance, security, and quality. Use when evaluating server.json files, PRs adding/updating servers, or assessing MCP server changes. NOT for creating new entries (use add-mcp-server instead).

stacklok/toolhive-catalog · 51 tokens

code-review

When the user wants a thorough code review of changes, a PR, a file, or a feature branch. Use when the user says "review this," "code review," "check my code," "what's wrong with this," "review my PR," "look over this," "critique this," "review before merge," or when submitting code for quality assessment. Performs…

ggg123124/vrchat-assistant · 96 tokens

holix-cron

Schedule recurring agent tasks via Holix built-in gateway cron (not crontab or custom scripts).

javded-itres/Holix · 25 tokens

review-guidelines

Additional code review guidelines specific to this codebase. Auto-loaded by the review agent during PR reviews to enforce project conventions.

youdotcom-oss/dx-toolkit · 28 tokens

quick-review

Review a code diff or file for correctness bugs, security issues, and clear simplifications. One finding per line, severity-tagged. Use when user wants fast, focused code review.

gyuch-an02/claude-omakase · 40 tokens