Przejdź do treści
Biblioteka skilli
Programowanie · Budowanie i kod

brain-write-mod

/brain-write-mod

Tworzy i poprawia moduły Claude Code w katalogu mods: panele obok czatu, paski nad promptem, polecenia i haki.

Repozytorium
brain-template ↗
Licencja
MIT
Ostatnia zmiana repozytorium
03.11.2026

Ocena i bezpieczeństwo

90/ 100Klasa: dobry
Format25 / 25
Frontmatter z nazwą i opisem, poprawna nazwa, opis do 1024 znaków, nazwa zgodna z folderem.
Odkrywalność25 / 25
Opis mówi, kiedy użyć skilla, ma sensowną długość i jest w 3. osobie.
Treść25 / 35
Co najmniej 150 słów i do 500 linii, nagłówki, listy kroków, przykłady albo kod.
Higiena15 / 15
Bez zaślepek typu TODO, bez ścieżek Windows, z licencją.
Ryzykobrak sygnałów w skanie
Pliki w paczce
1
Skrypty
0
Komentarze HTML
2
Adresy URL w SKILL.md
0
Przestarzałość

Brak sygnałów. Repozytorium zmienione 03.11.2026, bez odwołań do wycofanych modeli i API.

Licencja

MIT, otwarta: można używać i zmieniać, z zachowaniem informacji o autorze.

Co sprawdzić przed instalacją
  • SKILL.md zawiera komentarze HTML (2). Nie widać ich w podglądzie Markdown, a model je czyta.

Co robi i kiedy

Tworzy i poprawia moduły Claude Code w katalogu mods: panele obok czatu, paski nad promptem, polecenia i haki.

Oryginalny opis (EN)

Create, change or fix one of this brain's mods in .claude/mods/<prefix>-<name>/: a change to Claude Code's own interface or behaviour, such as a pane beside the chat, a band above the prompt, a status-line word, a toast, a slash command or a hook on tool calls. Starts it from the template's mod kit, keeps it read-only unless the person asks otherwise, tests it with claude plugin test, links it so sessions load it, and records what it shows, reads and writes. Use when someone asks for a panel, pane, sidebar, band, live view beside the chat, status line, notification, slash command or tool-call

Jak działa

  1. Where this sits
  2. Sequence
  3. Rules a mod keeps
  4. In the template
  5. Do not
  6. Done when
Sekcje z nagłówków SKILL.md, w oryginale · 102 linii, 1 090 słów
Podgląd SKILL.md
---
name: brain-write-mod
description: "Create, change or fix one of this brain's mods in .claude/mods/<prefix>-<name>/: a change to Claude Code's own interface or behaviour, such as a pane beside the chat, a band above the prompt, a status-line word, a toast, a slash command or a hook on tool calls. Starts it from the template's mod kit, keeps it read-only unless the person asks otherwise, tests it with claude plugin test, links it so sessions load it, and records what it shows, reads and writes. Use when someone asks for a panel, pane, sidebar, band, live view beside the chat, status line, notification, slash command or tool-call guard, when a mod does nothing or misbehaves, or when the skill gate refuses a write under .claude/mods/. Does NOT write a skill, which is brain-write-skill; does NOT write a script a mod runs, which is brain-write-script; and does NOT change the kit in _meta/modkit/, which is brain-upstream."
---

# Write a mod for this brain

A mod is code that runs inside Claude Code with the person's permissions, on every surface they
use. Doing it well means drawing something useful everywhere, reading without side effects, and
failing where the person can see it, never silently and never by breaking the session.

## Where this sits

<!-- where:begin — generated by _meta/brain routing sync; do not edit -->
**Runs after:** `brain-retro`

**Hand to next:** `brain-sync` · `brain-write-script`

**Reserved output:** writing `.claude/mods/<prefix>-*/**` needs this skill to have run.
<!-- where:end -->

**Call it directly when:** the person asks for something Claude Code should show or do by itself
(a pane, a band, a command, a guard), or the gate refused a write under `.claude/mods/`; step 1 still applies.

## Sequence

1. **Does it earn a mod?** A mod draws in Claude Code or reacts to its events. Instructions are a
   skill (`brain-write-skill`), a query is a script (`brain-write-script`), a fact is a practice.
   Nothing a mod does may be the only way something happens: the skill gate stays the enforcer,
   and what a pane shows can also be had from a command or a script. Run `_meta/brain mods ready`:
   a Claude Code older than 2.1.287, or the desktop app in a WSL session, runs no mods; say so.
2. **Shape it with the person**, in their words: where it shows (pane, band, status line, toast,
   command reply, a tool-call hook), what it reads and from where, what it writes (by default
   nothing), when it reads (start, a command, a button, a timer), and whether everyone who clones
   the brain gets it or it is opt-in. Read `_meta/modkit/README.md` for the kit, its pieces and
   the surface facts.
3. **Start or open it.** New: `_meta/brain mods new <name> --dry-run`, then without `--dry-run`;
   it writes `.claude/mods/<prefix>-<name>/` from the starter, copies the kit and makes the link
   `.claude/skills/<prefix>-<name>`. Existing: read its `README.md` and `hooks/register.tsx` first.
4. **Write it.** Replace `hooks/health.ts` with the mod's own data source and delete the starter's
   parts it does not need. Grep the types the engine lays in `.claude-plugin/types/` for the event
   or method at hand; they are this build's contract. A script the mod runs goes in `./scripts/`
   through `brain-write-script`, and the mod calls it with an argument list.
5. **Test it.** `tests/<prefix>-<name>.test.ts`: each hook on `terminal` and `desktop` at least,
   the empty, failed and nothing-to-show states, that a forged button press does nothing, and that
   a read-only mod writes nothing. Run `_meta/brain mods check <name>` until both steps pass.
6. **See it.** The session reloads a linked mod when its files are saved; a terminal session can
   load one with `claude --plugin-dir .claude/mods/<prefix>-<name>`. Ask the person to look at it in the
   app they use, in the light and the dark theme. A dim transcript line naming the mod is a hook
   that failed: read it, fix the cause, look again.
7. **Record and hand on.** Fill the README table: what it shows, what it reads, what it writes,
   which surfaces draw it, how to turn it off. An opt-in mod sets `"defaultEnabled": false` in its
   `plugin.json`, and the README says how to turn it on. `_meta/brain lint` reports nothing about
   it; then hand to `brain-sync`.

## Rules a mod keeps

- **Read-only unless the person asked.** A button that asks Claude for something fills the prompt
  (`$.prompt.fill`) for the person to send; it never submits and never runs a write itself. An act
  that changes something outside the mod shows what it will do and asks first (`Confirm`).
- **No secrets.** A mod never reads `.env`, never puts a key in its state, a log line, a toast or
  a drawing, and never sends one anywhere. A system that needs a key is reached through a script
  that loads it, or `_meta/brain secret run`.
- **Every press is validated.** A button carries a small act (`{ do: 'refresh' }`) that one
  function checks before anything runs: never free text, a path, a URL or a command.
- **Fail quiet and visible.** No hook throws: a failed read keeps the last good one and shows a
  `Failed` line with Try again. A hook that guards (refuses a tool call, a prompt) gets a `.catch`
  that refuses too, so a broken guard fails closed.
- **Cheap where it runs often.** `ui.render` only reads state; process, file and network work runs
  in the background from a command, a button, `session.start` or a throttled timer, with a time
  limit. Hooks on `tool.call` and `prompt.submit` observe and pass on unless guarding is the point.
- **Every surface gets something.** Text where an element is missing, a command whose reply is
  text, and nothing drawn in the band when there is nothing to say (`return next(e)`).
- **State lives in `$.state`**, declared in `types/index.d.ts`; change a value's `shape` tag when
  its fields change.
- **Never edit `hooks/kit/`.** `_meta/brain mods sync` replaces it. A piece the kit lacks is built
  in the mod's own files, or proposed for the kit through `brain-upstream`.

## In the template

When `brain.json` `role` is `template`, mods are the kit itself: `_meta/modkit/gallery/` (the kit
and its gallery) and `_meta/modkit/starter/`. Change them here, run
`claude plugin test _meta/modkit/gallery` and the template's tests, and add a changelog entry.
Steps 3 and 7's link and lint do not apply.

## Do not

- Do not install a mod in the person's user settings or `CLAUDE_CODE_PLUGIN_DIRS`: it would load in
  every session everywhere. A brain's mods load through their link, in the brain's sessions.
- Do not let a mod block what the skill gate or a settings hook already decides; it adds a view,
  not a second set of rules.
- Do not open a pane at session start unasked; open it on a command, a button, or work that needs it.
- Do not edit through the link (`.claude/skills/<prefix>-<name>/…`) or make it by hand: write under
  `.claude/mods/`, and let `mods new` or `mods link` make the link. The gate reads a write through the link
  as a skill write too.

## Done when

- `.claude/mods/<prefix>-<name>/` holds the manifest, `hooks/hooks.json`, the hooks module, the kit copy,
  `types/index.d.ts`, tests and a README whose table is filled in.
- `_meta/brain mods check <name>` passes validate and test, and `_meta/brain lint` reports nothing
  about the mod.
- `.claude/skills/<prefix>-<name>` links to it, and the person has seen it work in their app.
- It writes nothing the person did not ask for, and no secret appears in its code, state or output.
- Handed to `brain-sync`.

Wersje

W bazie nie ma innych skilli o nazwie brain-write-mod.

Migawka bazy z 13.11.2026 · wersja paczki 47fbfd3421b5 (skrót SHA-256 całej paczki)

Pobrania w ostatnich 30 dniach: 0 · ranking

Zgłoś problem z tym skillem: szkodliwa treść, błędny opis albo prośba autora o usunięcie.

Podobne skille

  • 100plugin-authoring
    Tworzy mody zmieniające interfejs lub zachowanie Claude: panel na żywo, pasek nad promptem, status line, toast, polecenie slash oraz hook na wywołaniach narzędzi lub promptach.
  • 100field-test
    Testuje wtyczkę w prawdziwej sesji Claude Code, w terminalu lub aplikacji desktop, i porównuje wynik przed i po zmianie.
  • 100write-addon
    Pisze, rozszerza i naprawia dodatek do aplikacji claude-ui: manifest, widoki HTML i skrypty sprawdzane typami.
  • 90add-pane-grid-cell
    Przygotowuje mod Claude Code do rysowania w komórce pane-grid, czyli obsługi polecenia place i panelu w siatce.
  • 100create-mod
    Pisze i zmienia mod Silo Harness, czyli folder z plikami mod.json, HTML i CSS, który dodaje panel, kartę, pasek, tło lub komendę do aplikacji.
  • 100daiver-prompt-view
    Obsługuje mod daiver-prompt-view dla Claude Code: pasek statusu pod promptem, liczniki agentów, paski kontekstu i motywy kolorów.

Uwagi i zgłoszenia

Wiadomość trafi do Bartosza Sokolińskiego. Adres e-mail jest potrzebny tylko do odpowiedzi. Szczegóły w polityce prywatności.