pi-linus-torvalds

A Pi package with selectable Linus Torvalds review skills, reviewer souls, and an optional review-only model.

Packages

Package details

extensionskill

Install pi-linus-torvalds from npm and Pi will load the resources declared by the package manifest.

$ pi install npm:pi-linus-torvalds
Package
pi-linus-torvalds
Version
0.1.1
Published
Aug 26, 2026
Downloads
297/mo · 4/wk
Author
sjug
License
CC0-1.0
Types
extension, skill
Size
379.3 KB
Dependencies
0 dependencies · 1 peer
Pi manifest JSON
{
  "extensions": [
    "./extensions/torvalds-reviewer.ts"
  ],
  "skills": [
    "./skills/linus-review-full/SKILL.md",
    "./skills/linus-review-light/SKILL.md"
  ]
}

Security note

Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.

README

Pi Linus Torvalds

A standalone Pi package that combines:

  • selectable full and light language-agnostic Linus Torvalds review skills; and
  • independently selectable full and light Linus Torvalds reviewer souls with review-only, global, and off scopes.

The selected skill supplies the review procedure through Pi's native skill expansion. The selected soul supplies reviewer identity and communication style without replacing Pi's normal tool, project-context, or coding-agent instructions. Skill and soul content is language-agnostic.

Install

Install the published package from npm:

pi install npm:pi-linus-torvalds

Or install directly from the GitHub repository:

pi install git:github.com/sjug/pi-linus-torvalds

For development, install from a local checkout:

pi install /absolute/path/to/pi-linus-torvalds

Use -l for a project-local installation. To test a checkout without persisting it:

pi -e /absolute/path/to/pi-linus-torvalds

Use

The skill and soul variants default to full, while the soul scope defaults to review. The common case needs no arguments:

/linus-review

This reviews git diff --cached; when nothing is staged, it falls back to git diff HEAD. An explicit request overrides the default:

/linus-review review the public API changes in src/

Select the procedure independently:

/linus-skill full
/linus-skill light
/linus-skill status

Select or control the reviewer voice independently:

/linus-soul full
/linus-soul light
/linus-soul review
/linus-soul on
/linus-soul off
/linus-soul toggle
/linus-soul status

full and light change only the soul variant. review applies it only to explicit Linus review turns, on applies it to every turn, and off disables it. toggle restores the last active scope.

By default, Linus reviews use Pi's active model. Configure an optional review-only model, inspect the effective model, or clear the override with:

/linus-model openai/gpt-5.2
/linus-model status
/linus-model clear

status reports only the effective model, for example Linus model: google/gemini-3.1-pro-preview. When an override is configured, /linus-review waits for any active run to settle, switches models for the complete review, and restores Pi's previous model and exact thinking level afterward. clear returns to following whichever model Pi currently uses.

For example, this uses the shorter review procedure with the expansive reviewer voice:

/linus-skill light
/linus-soul full
/linus-review review the current diff

The selections are stored in Pi's session history. Reloading or resuming a session restores the latest state on its active branch. Pi only persists a new session after it has an assistant response, so changing modes and immediately exiting an otherwise empty session leaves no resumable state.

New sessions load defaults from:

  • ~/.pi/agent/linus.json
  • <project>/.pi/linus.json when the project is trusted
  • environment variables

Each layer overrides only the keys it specifies. The order is built-in defaults, global configuration, project configuration, environment, then session history and slash commands.

{
  "reviewModel": "openai/gpt-5.2",
  "soulMode": "review",
  "soulVariant": "full",
  "skillVariant": "full"
}

All keys are optional. reviewModel accepts provider/model or null; the other values are review|on|off for soulMode and full|light for each variant.

Environment overrides are also available:

PI_TORVALDS_SKILL=light PI_TORVALDS_SOUL=light pi
PI_TORVALDS_SOUL_MODE=on pi
PI_LINUS_MODEL=openai/gpt-5.2 pi

PI_TORVALDS_SOUL also accepts review, on, or off as a scope shorthand. PI_LINUS_MODEL=clear removes a model inherited from a configuration file.

The two native skill commands remain available as explicit bypasses:

/skill:linus-review-full review the current diff
/skill:linus-review-light review the current diff

They remain hidden from Pi's normal skill list so a model cannot silently choose a different variant from /linus-skill. Instead, the extension clones the selected loaded skill and asks Pi to format one model-visible linus-review entry pointing at exactly that variant. This permits organic discovery without making variant selection nondeterministic.

If another loaded skill is already named linus-review, it takes precedence. The extension skips its synthetic entry and warns once for that session. Pi's formatter emits a complete skills section, so a prompt that already contains visible skills intentionally receives a second <available_skills> block for the selected Linus skill rather than relying on Pi's internal prompt markup to splice the entry into the first block.

Organic discovery happens after a turn has started, so it uses that turn's active model and does not activate the review-scoped soul retroactively. Use /linus-review when the configured Linus model or review-scoped soul must be guaranteed.

Both bundled souls include calibrated profanity from the source corpus. Disable the extension in pi config, use /linus-soul off, or set PI_TORVALDS_SOUL_MODE=off if that voice is inappropriate for a session.

Design

package.json exposes one extension and two native skills:

  • skills/linus-review-full/SKILL.md contains the expansive GLM-generated procedure.
  • skills/linus-review-light/SKILL.md contains the smaller gpt-oss-generated procedure.
  • soul/full.md is the expansive GLM-generated soul and is selected by default.
  • soul/light.md is the smaller gpt-oss-generated soul.
  • extensions/config.ts loads and validates layered defaults.
  • extensions/state.ts persists branch-local selections and migrates older state.
  • extensions/soul.ts reloads soul content and removes pipeline frontmatter before injection.
  • extensions/discovery.ts uses Pi's public skill parser and formatter to detect explicit reviews and advertise exactly the selected loaded skill for organic loading.
  • extensions/torvalds-reviewer.ts registers commands and coordinates review-only model switching.

The generated skill wrappers change only the source frontmatter name and add disable-model-invocation: true; their review-method bodies remain byte-for-byte identical to the recorded upstream artifacts. Soul files also remain exact provenance copies: their YAML pipeline metadata is removed only at runtime. A dedicated model is validated before dispatch and does not replace Pi's global default. The extension has no third-party runtime dependencies. Start a new session when comparing modes so earlier responses do not bias the comparison.

Development

The extension, generator, and tests are strict TypeScript. Pi loads the extension source directly, so there is no production build step. Markdown outputs are generated; edit the corresponding file under sources/ or templates/, then regenerate:

npm run generate
npm run check

npm run probe:pi runs two isolated RPC smoke probes against the pinned Pi development dependency: one verifies package resources and one verifies extension-command dispatch. It does not send a model prompt.

provenance.json records the exact upstream commit, source paths, and SHA-256 hashes used for the bundled skill and soul.

Acknowledgments

The bundled skill and soul texts originate from Mte90/linus-torvalds-skill, created by Daniele Scasciafratte. Thanks to Daniele for compiling the source corpus, distilling the review methodology, and releasing the artifacts under CC0 1.0. This package independently adds the Pi integration, configuration, model routing, and tests. Exact upstream provenance is recorded in provenance.json.

This project is an independent adaptation and is not endorsed by the upstream author or Linus Torvalds.

License

CC0 1.0 Universal. See LICENSE.