Ranking|Claude Code Mods

ModsCode / Claude Code Mods / Ranking / cockpit

cockpit

One band above the prompt: quick replies, branch/PR/CI standing, decision cards, waiting-on-you items, standing-rule capture and a Hand off chip at natural breaks.

Code you can checkTerminal + desktopBandToastBoxButtonSelectText
writes files, runs programs, draws

What it does

  • Draws a band above the prompt, toasts
  • Watches tool calls and can refuse them
  • Hooks classic.Stop, prompt.submit, session.attach, session.end and 4 more
  • Keeps its own state between turns
  • Starts processes

Good points

  • No network calls
  • Written in TypeScript
  • Has a desktop-specific branch
  • Handles errors

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 cockpit by Joseph Ayoub (band, toast), as ModsCode read it from the mod's code:
// https://modscode.com/claude-mods/mods/joseph-ayoub-cockpit/
// 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, Button, Text, Select } = $.ui.resolve(e)
    const label = '…'
    const queuedLabel = '…'
    const text = '…'
    const label2 = '…'
    const text2 = '…'
    const label3 = '…'
    const text3 = '…'
    const standingLine = '…'
    const text4 = '…'
    const blockers = '…'
    const title = '…'
    const number = '…'
    const text5 = '…'
    const value = '…'
    const number2 = '…'
    const text6 = '…'
    const number3 = '…'
    const text7 = '…'
    const answersPreview = '…'
    const recommendedPreview = '…'
    const personText = '…'
    const personText2 = '…'
    const personText3 = '…'
    const sentence = '…'
    return (
      <Box flexDirection="column">
        <Box flexDirection="row" flexWrap="wrap" columnGap={1}>
          <Button plain dimColor label="▸ Replies" />
          <Button label={`${label}`} />
          <Button label={`${label}`} />
          <Button label={`${label}`} />
          <Text dimColor>
            {"queued: "}
            {queuedLabel}
          </Text>
        </Box>
        <Text dimColor wrap="wrap">
          {label}
          {" sends: \""}
          {text}
          "
        </Text>
        <Text dimColor wrap="wrap">
          {label2}
          {" sends: \""}
          {text2}
          "
        </Text>
        <Text dimColor wrap="wrap">
          {label3}
          {" sends: \""}
          {text3}
          "
        </Text>
        <Box flexDirection="row" columnGap={1}>
          <Button plain dimColor label="▸ Standing" />
          <Box flexShrink={1}>
            <Text dimColor wrap="truncate-end">
              {standingLine}
            </Text>
          </Box>
          <Button label="Archive session" />
          <Text dimColor>
            done: ready to archive (use the app)
          </Text>
          <Button label="Hand off" />
          <Text dimColor>
            {text4}
          </Text>
        </Box>
        <Text dimColor wrap="truncate-end">
          {"archive after: "}
          {blockers}
        </Text>
        <Box flexDirection="column">
          <Button plain dimColor label={`▸ ${title}`} />
          <Box flexDirection="column">
            <Text wrap="truncate-end">
              Q
              {number}
              {" "}
              {text5}
            </Text>
            <Select value={`${value}`} />
          </Box>
          <Box flexDirection="column">
            <Text wrap="truncate-end">
              Q
              {number2}
              {" "}
              {text6}
            </Text>
            <Select value={`${value}`} />
          </Box>
          <Box flexDirection="column">
            <Text wrap="truncate-end">
              Q
              {number3}
              {" "}
              {text7}
            </Text>
            <Select value={`${value}`} />
          </Box>
          <Box flexDirection="row" flexWrap="wrap" columnGap={1}>
            <Button variant="primary" label="Send answers" />
            <Button label="Accept all recommended" />
            <Button role="dismiss" label="Dismiss" />
          </Box>
          <Text dimColor wrap="wrap">
            Send answers sends: "
            {answersPreview}
            "
            {`; Accept all sends: "${recommendedPreview}"`}
          </Text>
        </Box>
        <Box flexDirection="column">
          <Button plain dimColor label={`▸ ${title}`} />
          <Box flexDirection="row" columnGap={1}>
            <Button label="Done" />
            <Box flexShrink={1}>
              <Text wrap="wrap">
                {personText}
              </Text>
            </Box>
          </Box>
          <Box flexDirection="row" columnGap={1}>
            <Button label="Done" />
            <Box flexShrink={1}>
              <Text wrap="wrap">
                {personText2}
              </Text>
            </Box>
          </Box>
          <Box flexDirection="row" columnGap={1}>
            <Button label="Done" />
            <Box flexShrink={1}>
              <Text wrap="wrap">
                {personText3}
              </Text>
            </Box>
          </Box>
        </Box>
        <Box flexDirection="column">
          <Button plain dimColor label="▸ Save as a standing rule?" />
          <Text>
            "
            {sentence}
            "
          </Text>
          <Box flexDirection="row" flexWrap="wrap" columnGap={1}>
            <Button label="Global rules" />
            <Button label="Project rules" />
            <Button label="Dismiss" />
          </Box>
        </Box>
        {await next(e)}
      </Box>
    )
  })

  on('session.start', async ($, e, next) => {
    const blockers = '…'
    await $.ui.toast(`Cockpit: not archived, the standing could not be re-read.`)
    await $.ui.toast(`Cockpit: not archived, something came up: ${blockers}.`)
    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.

cockpit/hooks/register.tsx lines 1161–1320 · Band
  on('ui.render', { component: 'AbovePrompt' }, async ($, e, next) => {
    // The band is shared with surveys, and a subagent's transcript is not the session's cockpit.
    if (e.props.hasSurvey || e.props.view.agentId !== undefined || (e.surface !== 'terminal' && e.surface !== 'desktop')) {
      return next(e)
    }

    const { Box, Button, Select, Text } = $.ui.resolve(e)
    const fold = await read($, collapsed)
    const queued = await read($, pending)
    const standingNow = await read($, standing)
    const toolAt = await read($, lastToolAt)
    const cardsNow = await read($, cards)
    const waitingNow = await read($, waiting)
    const ruleNow = await read($, rule)
    const reportAt = await read($, lastReportAt)
    const backgroundNow = await read($, background)
    const hostNow = await read($, host)
    const now = await $.clock.now()
    const isWorking = e.props.isWorking
    const done = completion({
      standing: standingNow,
      now,
      isWorking,
      hasPending: queued !== null && now - queued.at < PENDING_EXPIRY_MS,
      waiting: waitingNow.length,
      openDecisions: cardsNow === null ? 0 : cardsNow.questions.filter(q => q.picked === null).length,
      background: backgroundNow,
      lead: { state: hostNow.leadState, id: hostNow.lead },
      lastReportAt: reportAt,
    })
    const reason = archiveReason(standingNow)
    const contextNow = await read($, context)
    // Offered only while a plugin lists the command: nothing advertises a mod that is not there.
    const handoffAt =
      hostNow.handoffCommand === true
        ? handoffBreak({
            standing: standingNow,
            waiting: waitingNow.length,
            background: backgroundNow,
            context: contextNow,
            isWorking,
            hasPending: queued !== null && now - queued.at < PENDING_EXPIRY_MS,
            tokensLine,
          })
        : null
    // An idle session that is not done says what stands, so the missing button is never a mystery.
    const showBlockers = !done.isReady && !isWorking && standingNow !== null
    const width = Math.max(1, e.props.bodyColumns)
    const queuedLabel = queued !== null && now - queued.at < PENDING_EXPIRY_MS ? (replies.find(reply => reply.text === queued.text)?.label ?? 'reply') : null

    const toggle = (section: keyof CockpitCollapsed, title: string) => (
      <Button
        key={`fold-${section}`}
        plain
        dimColor
        label={`${fold[section] ? '▸' : '▾'} ${title}`}
        onPress={() => {
          void update($, collapsed, held => ({ ...held, [section]: !held[section] }))
        }}
      />
    )

    const allRecommended = cardsNow !== null && cardsNow.questions.every(question => question.recommended !== null)
    // A phrase set in the options can say anything, as the person: show it wherever it differs from the default.
    const custom = replies.filter(reply => reply.text !== reply.fallback)
    // What Send answers puts in the prompt (or sends as the person where there is no prompt box), shown before the press.
    const answersPreview =
      cardsNow === null
        ? ''
        : answersText(cardsNow.questions.map(question => ({ number: question.number, value: question.picked ?? question.recommended ?? '?' })))
    const recommendedPreview =
      cardsNow === null ? '' : answersText(cardsNow.questions.map(question => ({ number: question.number, value: question.recommended ?? '?' })))

    return (
      <Box flexDirection="column" width={width}>
        <Box flexDirection="row" flexWrap="wrap" columnGap={1}>
          {toggle('replies', 'Replies')}
          {!fold.replies &&
            replies.map(reply => (
              <Button
                key={`reply-${reply.id}`}
                {...(reply.hotkey === undefined ? {} : { hotkey: reply.hotkey })}
                label={reply.label}
                dimColor={isWorking}
                onPress={() => {
                  void sendReply($, reply.label, reply.text, isWorking)
                }}
              />
            ))}
          {!fold.replies && queuedLabel !== null && <Text dimColor>queued: {queuedLabel}</Text>}
        </Box>
        {!fold.replies &&
          custom.map(reply => (
            <Text key={`custom-${reply.id}`} dimColor wrap="wrap">
              {reply.label} sends: "{reply.text}"
            </Text>
          ))}
        <Box flexDirection="row" columnGap={1}>
          {toggle('standing', 'Standing')}
          {!fold.standing && (
            <Box flexShrink={1}>
              <Text dimColor wrap="truncate-end">
                {standingLine(standingNow, now, toolAt, isWorking)}
              </Text>
            </Box>
          )}
          {!fold.standing && done.isReady && hostNow.archiveTool && (
            <Button key="archive" label="Archive session" onPress={() => void archiveSession($, reason)} />
          )}
          {!fold.standing && done.isReady && !hostNow.archiveTool && <Text dimColor>done: ready to archive (use the app)</Text>}
          {/* No hotkey: a hand-off ends in a /clear, so it goes only on an explicit press. */}
          {!fold.standing && handoffAt !== null && <Button key="handoff" label="Hand off" onPress={() => offerHandoff($, isWorking)} />}
          {!fold.standing && handoffAt !== null && <Text dimColor>{handoffAt.text}</Text>}
        </Box>
        {!fold.standing && showBlockers && (
          <Text dimColor wrap="truncate-end">
            archive after: {done.blockers.join(', ')}
          </Text>
        )}
        {cardsNow !== null && (
          <Box flexDirection="column">
            {toggle('cards', `Decisions (${cardsNow.questions.length})`)}
            {!fold.cards &&
              cardsNow.questions.map(question => (
                <Box flexDirection="column">
                  <Text wrap="truncate-end">
                    Q{question.number} {question.text}
                  </Text>
                  <Select
                    key={`pick-${question.number}`}
                    options={question.options.map(option => ({
                      value: option.value,
                      label: `${option.value}) ${option.label}${option.value === question.recommended && !labelMarksRecommended(option.label) ? ' (recommended)' : ''}`,
                    }))}
                    value={question.picked ?? question.recommended ?? undefined}
                    onSelect={value => {
                      void pickAnswer($, cardsNow.turnId, question.number, value)
                    }}
                  />
                </Box>
              ))}
            {!fold.cards && (
              <Box flexDirection="row" flexWrap="wrap" columnGap={1}>
                <Button
                  key="cards-send"
                  variant="primary"
                  label="Send answers"
                  dimColor={isWorking}
                  onPress={() => {
                    void sendAnswers($, 'picked', isWorking)
                  }}
                />
                {allRecommended && (
                  <Button
                    key="cards-accept"
                    label="Accept all recommended"
                    dimColor={isWorking}
                    onPress={() => {
                      void sendAnswers($, 'recommended', isWorking)
                    }}
Licence text (MIT)
MIT License

Copyright (c) 2026 Joseph Ayoub

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: Band above the prompt, Deny a tool call

What its code calls

runs programswrites filesenv varsdrives Claudetool callsrememberscalls tools

What its code shows

Read from the source at commit 86951e26d68a. 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.cockpit/hooks/register.tsx
ParsesEvery file parses as TypeScript or JavaScript.2 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, with its own branch for the desktop
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).runs no program a Windows PC lacks
NetworkWhether every fetch names its https host in the code.no network
ProgramsWhether every program it starts is named in the code and is not a shell, an interpreter or a network tool.git (reaches the network)
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, an MCP server
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).cockpit/hooks/register.tsx:343 an MCP tool named at run time; cockpit/hooks/register.tsx:449 an MCP tool named at run time; command.run: /?
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.prompt.submit (as the person)
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, classic.Stop, prompt.submit · also: session.start, session.end, session.attach, turn.start (+3) · timers: clock.every, clock.after
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: HOME; files: a path computed at run time; 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.files: a path computed at run time; the prompt box

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 Joseph-Ayoub/claude-mods
/plugin install cockpit@joseph-mods
/reload-plugins

This installs the marketplace's latest commit, which may not be the one read here (86951e26d68a). 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/Joseph-Ayoub/claude-mods
git -C claude-mods checkout 86951e26d68a4ca2b7f4f444bb7956e57a43962c
claude plugin validate claude-mods/cockpit
claude --plugin-dir claude-mods/cockpit

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 "joseph-ayoub-cockpit" with its code and make me one like it

Add the ModsCode MCP to Claude or ChatGPT

Similar mods

More from this repository

See all 9 mods in this repository

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/joseph-ayoub-cockpit.svg)](https://modscode.com/claude-mods/mods/joseph-ayoub-cockpit/)