Ranking|Claude Code Mods

ModsCode / Claude Code Mods / Ranking / alarum

alarum

Your Alarum events above Claude Code's prompt: what just arrived, and one press to hand it to the agent.

Code you can checkTerminal + desktopPaneBandToastBoxButtonText
network, draws

What it does

  • Draws a band above the prompt, a pane, toasts
  • Watches tool calls and can refuse them
  • Hooks session.start, turn.complete, turn.start, ui.close
  • Keeps its own state between turns
  • Calls the network

Good points

  • Written in TypeScript
  • Has a desktop-specific branch
  • Handles errors
  • Writes no files

Code to start from

A starter ModsCode writes from the drawing it read, and the mod's own lines that draw, where there are any.

Starter (register.tsx)

register.tsx
import type { Register } from 'claude-code'

// Drawn like alarum by Bleh (pane, band, toast), as ModsCode read it from the mod's code:
// https://modscode.com/claude-mods/mods/frbmt-bigetnouf-alarum/
// Written by ModsCode from that reading, not copied from the mod: use it as you like.
// Each value below stands for one the mod works out at run time; put in your own.
export const register: Register = on => {
  // the band above the prompt; what else goes there is drawn under it
  on('ui.render', { component: 'AbovePrompt' }, async ($, e, next) => {
    const { Box, Text, Button } = $.ui.resolve(e)
    const problem = '…'
    const scopeLabel = '…'
    const length = '…'
    const glyph = '…'
    const glyph2 = '…'
    const glyph3 = '…'
    return (
      <Box flexDirection="column">
        <Box flexDirection="column">
          <Box flexDirection="column">
            <Box justifyContent="space-between" gap={1}>
              <Box gap={1} flexShrink={1} overflow="hidden">
                <Box gap={1} flexShrink={0}>
                  <Text color="rgb(245,166,35)" bold>
                    ⩄ Alarum
                  </Text>
                  <Text color="error">
                    {problem}
                  </Text>
                  <Text color="warning">
                    ⏸
                  </Text>
                </Box>
                <Box flexShrink={1} overflow="hidden">
                  <Text dimColor wrap="truncate-end">
                    {scopeLabel}
                    {` · ${length}`}
                  </Text>
                </Box>
              </Box>
              <Box gap={0} flexShrink={0}>
                <Button label={`${glyph}`} dimColor />
                <Button label={`${glyph}`} dimColor />
              </Box>
            </Box>
            <Box justifyContent="space-between" gap={1}>
              <Box gap={0} flexShrink={0}>
                <Button label={`${glyph}`} plain>
                  <Text>
                    {glyph}
                  </Text>
                </Button>
                <Button label={`${glyph}`} plain>
                  <Text>
                    {glyph2}
                  </Text>
                </Button>
                <Button label={`${glyph}`} plain>
                  <Text>
                    {glyph3}
                  </Text>
                </Button>
              </Box>
              <Box gap={0} flexShrink={0}>
                <Button label={`${glyph}`} variant="primary" />
                <Button label={`${glyph}`} variant="primary" />
                <Button label={`${glyph}`} dimColor />
              </Box>
            </Box>
          </Box>
          <Box marginTop={1}>
            <Text dimColor wrap="truncate-end">
              ────────
            </Text>
          </Box>
          <Text dimColor>
            Nothing yet. Events land here as they arrive.
          </Text>
          <Box flexDirection="column" gap={1} />
        </Box>
        {await next(e)}
      </Box>
    )
  })

  // the pane: open it with $.ui.open({ id: 'my-pane', title: "‹title›" })
  on('ui.render', { component: 'Pane', requestId: 'my-pane' }, async ($, e) => {
    const { Text } = $.ui.resolve(e)
    return (
      <Text dimColor>
        No .alarum here: nothing to show.
      </Text>
    )
  })

  on('session.start', async ($, e, next) => {
    const GLYPH = '…'
    const projectName = '…'
    const title = '…'
    await $.ui.toast(`Alarum: the agent API is part of the paid plans. The band stays empty until the account has one.`)
    await $.ui.toast(`${GLYPH} ${projectName}: ${title}`)
    return next(e)
  })
}

The mod's own code

Shown under the mod's licence (MIT); its text is below. Keep the notice if you copy these lines.

hooks/register.tsx lines 917–934 · Band
  on('ui.render', { component: 'AbovePrompt' }, async ($, e, next) => {
    if (!config || e.props.hasSurvey) return next(e)
    // The pane shows the list: the band leaves it the place. A pane still
    // waiting for room leaves the band standing in.
    if (await read($, layout) === 'pane' && (await $.ui.panes()).some(p => p.id === PANE && p.isPlaced)) return next(e)

    // What the plugins beneath drew (the Floatee mod, a bleh kit band, the
    // engine's own). Answering without it would make this mod the only band
    // anyone can see, which is not ours to decide: we stack under it instead,
    // and ask for the room it did not take.
    const below = await next(e)
    const others = isBlank(below) ? null : below
    const maxRows = Math.max(0, e.props.maxRows - (others ? rowsOf(others) : 0))
    const tree = await draw($, e, { isPane: false, maxRows, columns: e.props.bodyColumns })
    if (!tree || !others) return tree ?? below
    const { Box } = $.ui.resolve(e)
    return <Box flexDirection="column">{others}{tree}</Box>
  })
hooks/register.tsx lines 515–674 · Band
async function draw(
  $: EngineInterface,
  e: Parameters<EngineInterface['ui']['resolve']>[0],
  opts: { isPane: boolean; maxRows: number; columns: number },
): Promise<RenderNode | null> {
  if (!config) return null
  const { Box, Text, Button } = $.ui.resolve(e)

  // Claude Desktop draws every Button as a native one, in its own font, where
  // a bare glyph reads as nothing: the brackets and the glyph-only labels are
  // the terminal's alone. Two widths matter, not one: the header's labels give
  // way first, the rows' later, since a row carries more of them.
  const isTerminal = e.surface === 'terminal'
  const narrow = isTerminal && opts.columns < (opts.isPane ? NARROW_PANE : NARROW)
  const tight = isTerminal && opts.columns < (opts.isPane ? TIGHT_PANE : TIGHT)
  const glyph = (g: string) => (isTerminal ? `[${g}]` : g)
  const chip = narrow ? true : undefined

  const where = await read($, scope)
  // The window held is account-wide, shared with the other sessions: the scope
  // is a filter here, like the levels, not a query over there.
  const all = inScope(await read($, events), where)
  const shown = await read($, levels)
  const onlyUnread = await read($, unreadOnly)
  const rows = group(visible(all, shown, onlyUnread))
  const at = await read($, now)
  const problem = await read($, error)
  const paused = await read($, pausedUntil)
  const projectList = await read($, projects)
  const workspaceList = await read($, workspaces)
  const picking = await read($, isPickingScope)
  const open = await read($, selected)

  // The orange frame, the band's look, in the pane too (inside the engine's).
  const frame = { borderStyle: 'round' as const, borderColor: brand, paddingX: 1 }

  const state = (
    <Box gap={1} flexShrink={0}>
      <Text color={brand} bold>⩄ Alarum</Text>
      {problem ? <Text color="error">{problem}</Text> : null}
      {!problem && paused > at ? <Text color="warning">{narrow ? '⏸' : `⏸ paused ${Math.ceil((paused - at) / 1000)}s`}</Text> : null}
    </Box>
  )

  // What a row says about itself besides its title, and never wraps.
  const factsOf = (row: Row) => [
    row.repeats > 1 ? `×${row.repeats}` : '',
    where.kind !== 'project' && row.projectName ? row.projectName : '',
    row.source ? row.source : '',
    ago(row.receivedAt, at),
  ].filter(Boolean).join(' · ')

  // ── The band: one line, always ────────────────────────────────────────────
  // It sits above the prompt, where every other plugin also wants room, so it
  // takes one row and keeps it: the title, the latest event the filters leave,
  // the counters, and the way into the pane, where the work happens.
  if (!opts.isPane) {
    const latest = rows[0] ?? null
    const counters: RenderNode[] = []
    for (const l of [...LEVELS].reverse()) {
      const n = all.filter(x => x.level === l).length
      if (!n) continue
      if (counters.length) counters.push(<Text dimColor> · </Text>)
      counters.push(<Text color={COLOR[l]}>{n} {GLYPH[l]}</Text>)
    }
    return (
      <Box {...frame} flexDirection="column">
        <Box justifyContent="space-between" gap={1}>
          <Box gap={1} flexShrink={1} overflow="hidden">
            {state}
            {latest ? (
              <Box gap={1} flexShrink={1} overflow="hidden">
                <Box flexShrink={0}><Text color={COLOR[latest.level]} bold={BOLD[latest.level]}>{GLYPH[latest.level]}</Text></Box>
                <Text dimColor={latest.read} wrap="truncate-end">{latest.title}</Text>
                <Box flexShrink={0}><Text dimColor>{factsOf(latest)}</Text></Box>
              </Box>
            ) : <Text dimColor>{problem ? '' : 'nothing yet'}</Text>}
          </Box>
          <Box gap={1} flexShrink={0}>
            {counters.length ? <Box gap={0} flexShrink={0}>{counters}</Box> : null}
            <Button key="layout" label={narrow ? glyph('⇥') : '⇥ Pane'} plain={chip} dimColor onPress={() => toggleLayout($)} />
          </Box>
        </Box>
      </Box>
    )
  }

  // ── The pane ──────────────────────────────────────────────────────────────
  // Two header lines, so the title always has its room: six buttons on one
  // line pushed it out of a docked pane, which is how this ended up split.
  const header = (
    <Box flexDirection="column">
      <Box justifyContent="space-between" gap={1}>
        <Box gap={1} flexShrink={1} overflow="hidden">
          {state}
          <Box flexShrink={1} overflow="hidden">
            <Text dimColor wrap="truncate-end">
              {scopeLabel(where, projectList, workspaceList)}{rows.length ? ` · ${rows.length}` : ' · nothing yet'}
            </Text>
          </Box>
        </Box>
        <Box gap={narrow ? 0 : 1} flexShrink={0}>
          <Button key="refresh" label={narrow ? glyph('⟳') : '⟳ Refresh'} plain={chip} dimColor onPress={() => refresh($, { force: true })} />
          <Button key="layout" label={narrow ? glyph('⇤') : '⇤ Band'} plain={chip} dimColor onPress={() => toggleLayout($)} />
        </Box>
      </Box>
      <Box justifyContent="space-between" gap={1}>
        {/* One chip per level, as the web inbox filters them: its own glyph in
            its own colour, lit when the level is on and dim when it is not.
            Glyphs rather than names, so five chips cost five cells. */}
        <Box gap={narrow ? 0 : 1} flexShrink={0}>
          {LEVELS.map(l => {
            const on = shown.includes(l)
            return (
              <Button
                key={`level:${l}`}
                label={glyph(GLYPH[l])}
                plain
                dimColor={!on}
                onPress={() => toggleLevel($, l)}
              >
                <Text color={on ? COLOR[l] : undefined} bold={on && BOLD[l]} dimColor={!on}>{glyph(GLYPH[l])}</Text>
              </Button>
            )
          })}
        </Box>
        {/* An active filter is drawn as the surface marks a control that is on. */}
        <Box gap={narrow ? 0 : 1} flexShrink={0}>
          <Button
            key="scope"
            label={narrow ? glyph('⊙') : '⊙ Scope'}
            plain={where.kind === 'all' ? chip : undefined}
            variant={where.kind === 'all' ? undefined : 'primary'}
            dimColor={where.kind === 'all'}
            onPress={() => update($, isPickingScope, v => !v)}
          />
          <Button
            key="unread"
            label={narrow ? glyph(onlyUnread ? '●' : '○') : (onlyUnread ? '● unread' : '○ all')}
            plain={onlyUnread ? undefined : chip}
            variant={onlyUnread ? 'primary' : undefined}
            dimColor={!onlyUnread}
            onPress={() => toggleUnread($)}
          />
          <Button key="allread" label={narrow ? glyph('✓') : '✓ Mark all'} plain={chip} dimColor onPress={() => markAllRead($)} />
        </Box>
      </Box>
    </Box>
  )

  // A dim rule sets the controls apart from what they act on, after a blank
  // line: the rule hard against the buttons reads as their underline.
  const rule = (
    <Box marginTop={1}>
      <Text dimColor wrap="truncate-end">{'─'.repeat(Math.max(10, opts.columns - 4))}</Text>
    </Box>
  )
  // ── The scope picker takes the list's place while it is open ──────────────
  if (picking) {
    const choices: RenderNode[] = [
hooks/register.tsx lines 936–940 · Pane
  on('ui.render', { component: 'Pane', requestId: PANE }, async ($, e) => {
    const tree = await draw($, e, { isPane: true, maxRows: e.props.scroll.bodyRows, columns: e.props.bodyColumns })
    const { Text } = $.ui.resolve(e)
    return tree ?? <Text dimColor>No .alarum here: nothing to show.</Text>
  })
Licence text (MIT)
MIT License

Copyright (c) 2026 Bleh (https://alarum.me)

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

How to build this: Pane (panel), Deny a tool call

What its code calls

networkruns programsreads filesenv varstool callsremembers

What its code shows

Read from the source at commit 17cb2fa24d5b. The first group decides whether a mod is listed; the rest is for you to weigh. A later commit is not read until the next crawl.

Decides the listing: code you can check
Entry readEvery module hooks/hooks.json names was read.hooks/register.tsx
ParsesEvery file parses as TypeScript or JavaScript.5 files parsed
All its code is in the modEvery import is a file of the mod or the engine's own module; no packages, no require.all its code is in the mod
ReadableNo minified lines, no eval or new Function, no import of a computed path, no encoded blobs.no minified code, no eval, no encoded blobs
Calls in the openNetwork and programs are reached as $.http.fetch and $.process.run in place, never passed around.every call outside goes through $ in the open
For you to weigh before installing
Where it drawsThe terminal, the desktop app, both, or nothing (hooks only: a guard or a prompt rewriter), as its code says. Shown, never a reason to leave a mod out.draws in the terminal and the desktop app, the same in both
Install lineWhether its repository's own .claude-plugin/marketplace.json lists it, so it installs from that marketplace with the lines on its page.listed in its repository's .claude-plugin/marketplace.json: installs from there
Programs on WindowsWhether every program it starts through $.process exists on Windows (tail, date, open, osascript, /usr/… do not).hooks/register.tsx:424 uname (not on Windows)
NetworkWhether every fetch names its https host in the code.hooks/register.tsx:170 fetch(`${config.api}${path}`)
ProgramsWhether every program it starts is named in the code and is not a shell, an interpreter or a network tool.hooks/register.tsx:429 a program named at run time
Reads and sendsWhether it both reads something of yours (files, environment variables, the transcript, settings) and reaches outside (the network, an MCP server, another session, telemetry).reads environment variables, files, the prompt box and reaches the network
Keys in the sourceWhether the source holds what looks like an API key or a private key.no keys in the source
LicenceAn open licence (MIT, Apache-2.0, BSD, ISC, Unlicense, 0BSD, CC0) with its text lets ModsCode show its code; otherwise the code is linked.MIT
Settings hooksHooks declared in hooks/hooks.json or plugin.json beside the module: a command (a shell when it has no args), an HTTP request, an MCP tool or a model prompt at an event. They run outside $.no settings hooks: its function hooks alone
Servers it shipsMCP servers (a program, or a URL; a headersHelper is a shell command; a .mcpb bundle is unpacked at run time), LSP servers, monitors (a shell command for the whole session) and bin/ (on the PATH of the Bash tool).ships no MCP or LSP server, no monitor, no bin/
Skills, commands, agentsWhat its Markdown declares beyond text: allowed-tools granted for the turn, hooks added when a skill is invoked, a command run before Claude reads the skill.no skills, commands, agents or workflows
Tools and MCPWhether every tool it calls through $.tool.call and $.mcp.call is named in the code, and none is a shell (Bash through the tool runs a shell without $.process).calls no tool, MCP server or command
Asks of the modelCompletions it runs ($.model.complete, fork, classify), subagents it spawns, prompts it submits as you, and the tools, commands and agents it adds.asks nothing of the model
Events it hooksBy what a hook there can do: gates (refuse a tool call, a prompt, a setting, another plugin), shapes (what the model reads: the system prompt, tool descriptions, each request), reads (your input, the events of the settings hooks, every event with *), and the rest.gates: tool.call · also: session.start, turn.start, turn.complete, ui.render (AbovePrompt, Pane) (+1) · timers: clock.every
Reads, by nameThe environment variables and files it names, and whether it reads the transcript, settings.json, the prompt box or the mouse selection.env: WSL_DISTRO_NAME, OS; files: …….alarum; the prompt box
Writes, by nameThe files and environment variables it names, and whether it changes settings, the prompt box, the clipboard, the conversation (a row the model reads) or another session.writes no files, environment variables, settings or conversation rows

This is a reading of the code text, not a security review: it does not run the mod, and it cannot see what a program the mod starts does. The check before installing is yours. How mods are chosen

Install it

Check it yourself before you install it. Mods run unsandboxed, with your permissions, and ModsCode does not vouch for what this code does. Read its code (or run claude plugin validate . in its folder), weigh what it reaches, and install the commit you read.

From its marketplace

Its repository is its marketplace. Add that marketplace (in the terminal with these commands, or in the desktop app's plugin settings) and install the mod from it:

/plugin marketplace add FrBmt-BIGetNouf/alarum-claude-mod
/plugin install alarum@alarum
/reload-plugins

This installs the marketplace's latest commit, which may not be the one read here (17cb2fa24d5b). Compare them before you install. /reload-plugins loads it into a session that is already open.

Try the commit ModsCode read

No marketplace needed. In a terminal, clone the repository, check out the commit read, validate the mod, and load it for one session:

git clone https://github.com/FrBmt-BIGetNouf/alarum-claude-mod
git -C alarum-claude-mod checkout 17cb2fa24d5b5a2a51296e8108ac0634a2ca71ca
claude plugin validate alarum-claude-mod
claude --plugin-dir alarum-claude-mod

The validate line lists the events the mod hooks and what it asks Claude Code to do, without running it. The last line loads the mod for this session only and writes nothing to your settings. If the author has rewritten history, the commit may no longer exist.

Ask Claude or ChatGPT about it

With ModsCode added as a connector, Claude or ChatGPT can read this mod's code, what it reaches and how its controls are wired, and build on them. Ask it like this:

Read the ModsCode mod "frbmt-bigetnouf-alarum" with its code and make me one like it

Add the ModsCode MCP to Claude or ChatGPT

Similar mods

More by Bleh

Badge for your README

If this is your mod, paste this into your README. It links to this page.

README.md
[![ModsCode](https://modscode.com/badge/frbmt-bigetnouf-alarum.svg)](https://modscode.com/claude-mods/mods/frbmt-bigetnouf-alarum/)