Skip to content
Narsil Workshop

Mod fundamentals

Before you rebuild Narsil or Narsil Check, you need the pieces every mod shares: three small files, one function that registers hooks, and the $ object that reaches everything outside the module.

Read these guides in order. Each one ends with a way to check that what you built works.

Start the first guide

The guides

  1. 1What a mod is made ofThe three files of a Claude Code mod, the register function and its hooks, and the smallest mod that shows something on screen.
  2. 2The $ objectThe areas of the engine interface every hook receives, with their real signatures and where narsil-pet and narsil-check use each one.
  3. 3Install, reload, validate, and testLoad a mod from its folder or a local marketplace, reload it after an edit, and check it with claude plugin validate, claude plugin test, and tsc.
  4. 4Surfaces: terminal, desktop, VS Code, and mobileWhere a mod draws, which elements each surface has, and how to write one render hook that works on the terminal, the desktop app, VS Code, and the mobile app.
  5. 5Reusing Narsil code: the GPL v3Both Narsil mods are licensed GPL-3.0-or-later. What that means when you study, change, or share code taken from them.