Ranking|Claude Code Mods

ModsCode / Claude Code Mods / Ranking / cortex-cockpit

cortex-cockpit

The harness cockpit, a viewer: Cortex memory health and grooming, the context window against the Stop guard's thresholds (from zetetic-autopilot), the spec-to-code pipeline as observed, worktree and test-process hygiene, the autopilot's an…

Code you can checkTerminal + desktopPaneBandStatus lineToastBoxButtonText
runs programs, drives Claude, draws

What it does

  • Draws a pane, a band above the prompt, the status line, toasts
  • Adds /cortex
  • Watches tool calls and can refuse them
  • Hooks session.start, turn.complete
  • Keeps its own state between turns

Good points

  • No network calls
  • Written in TypeScript
  • 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 cortex-cockpit by cdeust (pane, band, status, toast), as ModsCode read it from the mod's code:
// https://modscode.com/claude-mods/mods/cdeust-cortex-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 pane: open it with $.ui.open({ id: 'my-pane', title: "Cortex" })
  on('ui.render', { component: 'Pane', requestId: 'my-pane' }, async ($, e) => {
    const { Box, Text, Button } = $.ui.resolve(e)
    const bar = '…'
    const b = '…'
    const model = '…'
    const thresholdsSource = '…'
    const ageLabel = '…'
    const map = '…'
    const map2 = '…'
    const group = '…'
    const group2 = '…'
    const group3 = '…'
    const group4 = '…'
    const group5 = '…'
    const avg_heat = '…'
    const group6 = '…'
    const group7 = '…'
    const kind = '…'
    const grooming_staleness_threshold_days = '…'
    const kind2 = '…'
    const kind3 = '…'
    const ageLabel2 = '…'
    const ownershipError = '…'
    const shortPath = '…'
    const shortPath2 = '…'
    const shortPath3 = '…'
    const pid = '…'
    const elapsed = '…'
    const command = '…'
    const pid2 = '…'
    const elapsed2 = '…'
    const command2 = '…'
    const pid3 = '…'
    const elapsed3 = '…'
    const command3 = '…'
    const ageLabel3 = '…'
    const mode = '…'
    const quotaPercent = '…'
    const group8 = '…'
    const pressure = '…'
    const mode2 = '…'
    const classifierModel = '…'
    const skillShapesLoaded = '…'
    const geniusShapesLoaded = '…'
    const last = '…'
    const decisionRow = '…'
    const decisionRow2 = '…'
    const decisionRow3 = '…'
    const group9 = '…'
    const clock = '…'
    const tool = '…'
    const rule = '…'
    const target = '…'
    const clock2 = '…'
    const tool2 = '…'
    const rule2 = '…'
    const target2 = '…'
    const clock3 = '…'
    const tool3 = '…'
    const rule3 = '…'
    const target3 = '…'
    const summary = '…'
    const clock4 = '…'
    const tool4 = '…'
    const status = '…'
    const clock5 = '…'
    const tool5 = '…'
    const status2 = '…'
    const clock6 = '…'
    const tool6 = '…'
    const status3 = '…'
    const group10 = '…'
    const group11 = '…'
    const group12 = '…'
    const group13 = '…'
    const group14 = '…'
    return (
      <Box flexDirection="column" gap={1}>
        <Box flexDirection="column">
          <Text bold>
            Cortex cockpit
          </Text>
          <Text dimColor>
            ────────
          </Text>
        </Box>
        <Box flexDirection="column">
          <Text bold dimColor>
            CONTEXT
          </Text>
          <Box flexDirection="column">
            <Box>
              <Text>
                {bar}
                {" "}
              </Text>
              <Text>
                no reading
                {" · "}
                {b}
              </Text>
            </Box>
            <Text dimColor>
              {`no thresholds for ${model} (${thresholdsSource})`}
            </Text>
            <Text dimColor>
              rate limits: no reading
              {" · read "}
              {ageLabel}
              {" "}
              ago
            </Text>
            <Text dimColor>
              by category:
              {" "}
              {map}
            </Text>
            <Text dimColor>
              MCP schemas:
              {" "}
              {map2}
            </Text>
          </Box>
        </Box>
        <Box flexDirection="column">
          <Text bold dimColor>
            MEMORY
          </Text>
          <Box flexDirection="column">
            <Text>
              {group}
              {" memories · episodic "}
              {group2}
              {" · semantic"}
              {" "}
              {group3}
              {" · active "}
              {group4}
              {" · stale "}
              {group5}
            </Text>
            <Box>
              <Text>
                {"heat "}
                {avg_heat}
                {" "}
              </Text>
              <Text>
                <Text>
                  █
                </Text>
                <Text>
                  █
                </Text>
                <Text>
                  █
                </Text>
              </Text>
              <Text dimColor>
                {" "}
                {"· "}
                {group6}
                {" entities · "}
                {group7}
                {" relationships"}
              </Text>
            </Box>
            <Text dimColor>
              {"last consolidation "}
              none recorded
              {" · vector search"}
              {" "}
              available
            </Text>
            <Text>
              {"grooming "}
              {kind}
              :
              {" "}
              never run
              {` (stale, threshold ${grooming_staleness_threshold_days} d)`}
            </Text>
            <Text>
              {"grooming "}
              {kind2}
              :
              {" "}
              never run
              {` (stale, threshold ${grooming_staleness_threshold_days} d)`}
            </Text>
            <Text>
              {"grooming "}
              {kind3}
              :
              {" "}
              never run
              {` (stale, threshold ${grooming_staleness_threshold_days} d)`}
            </Text>
            <Box gap={1}>
              <Button label="Consolidate now" hotkey="c" />
              <Button label="Queue wiki curation" hotkey="w" />
            </Box>
            <Text dimColor>
              {"read "}
              {ageLabel2}
              {" ago"}
            </Text>
          </Box>
        </Box>
        <Box flexDirection="column">
          <Text bold dimColor>
            PIPELINE SPEC → CODE
          </Text>
          <Box flexDirection="column">
            <Text>
              ○
              {" "}
              config directory (fleet records)
              not reached
            </Text>
            <Text>
              ○
              {" "}
              config directory (fleet records)
              not reached
            </Text>
            <Text>
              ○
              {" "}
              config directory (fleet records)
              not reached
            </Text>
          </Box>
        </Box>
        <Box flexDirection="column">
          <Text bold dimColor>
            HYGIENE
          </Text>
          <Box flexDirection="column">
            <Text dimColor>
              no worktree beside the main checkout
            </Text>
            <Text>
              {"registry: no reading, "}
              {ownershipError}
            </Text>
            <Text>
              ✗
              {" "}
              {shortPath}
              {" · registry not read"}
            </Text>
            <Text>
              ✗
              {" "}
              {shortPath2}
              {" · registry not read"}
            </Text>
            <Text>
              ✗
              {" "}
              {shortPath3}
              {" · registry not read"}
            </Text>
            <Text>
              {"▶ pid "}
              {pid}
              {" · "}
              {elapsed}
              {" · "}
              {command}
            </Text>
            <Text>
              {"▶ pid "}
              {pid2}
              {" · "}
              {elapsed2}
              {" · "}
              {command2}
            </Text>
            <Text>
              {"▶ pid "}
              {pid3}
              {" · "}
              {elapsed3}
              {" · "}
              {command3}
            </Text>
            <Text dimColor>
              {"read "}
              {ageLabel3}
              {" ago"}
            </Text>
          </Box>
        </Box>
        <Box flexDirection="column">
          <Text bold dimColor>
            POLICY
          </Text>
          <Box flexDirection="column">
            <Text>
              <Text bold>
                {mode}
              </Text>
              <Text dimColor>
                {" "}
                {"· ladder from the graded rung, loop at medium, pressure at low · quota pressure from "}
                {quotaPercent}
                {" % of 5 h · results capped at "}
                {group8}
                {" chars"}
              </Text>
            </Text>
            <Text>
              {"pressure: "}
              {pressure}
              {` · ${group} chars kept out, about ${group} tokens (estimated)`}
            </Text>
            <Text dimColor>
              {"genius "}
              {mode2}
              {" · classifier "}
              {classifierModel}
              {" · "}
              {skillShapesLoaded}
              {" skills · "}
              {geniusShapesLoaded}
              {" genius shapes · "}
              {last}
            </Text>
            <Text>
              {decisionRow}
            </Text>
            <Text>
              {decisionRow2}
            </Text>
            <Text>
              {decisionRow3}
            </Text>
          </Box>
        </Box>
        <Box flexDirection="column">
          <Text bold dimColor>
            ENFORCED
          </Text>
          <Box flexDirection="column">
            <Text>
              {group9}
              {" refused · wiki pages only through wiki_write · worktrees inside the repo"}
            </Text>
            <Text>
              {clock}
              {" "}
              {tool}
              {" "}
              {rule}
              {" "}
              {target}
            </Text>
            <Text>
              {clock2}
              {" "}
              {tool2}
              {" "}
              {rule2}
              {" "}
              {target2}
            </Text>
            <Text>
              {clock3}
              {" "}
              {tool3}
              {" "}
              {rule3}
              {" "}
              {target3}
            </Text>
          </Box>
        </Box>
        <Box flexDirection="column">
          <Text bold dimColor>
            CORTEX CALLS
          </Text>
          <Box flexDirection="column">
            <Text>
              {summary}
            </Text>
            <Text>
              {clock4}
              {" "}
              {tool4}
              {" "}
              {"        …"}
              {" "}
              {"  no count"}
              {" "}
              {status}
            </Text>
            <Text>
              {clock5}
              {" "}
              {tool5}
              {" "}
              {"        …"}
              {" "}
              {"  no count"}
              {" "}
              {status2}
            </Text>
            <Text>
              {clock6}
              {" "}
              {tool6}
              {" "}
              {"        …"}
              {" "}
              {"  no count"}
              {" "}
              {status3}
            </Text>
          </Box>
        </Box>
        <Box flexDirection="column">
          <Text bold dimColor>
            TURNS
          </Text>
          <Box flexDirection="column">
            <Text>
              {group10}
              {" turns · in "}
              {group11}
              {" · out "}
              {group12}
              {" · cache read"}
              {" "}
              {group13}
              {" · cache write "}
              {group14}
            </Text>
            <Text dimColor>
              {"tools: "}
              none
            </Text>
          </Box>
        </Box>
        <Button label="Refresh" hotkey="r" />
      </Box>
    )
  })

  // 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 ctx = '…'
    const mem = '…'
    const group = '…'
    return (
      <Box flexDirection="column">
        <Box>
          <Text>
            {"cortex · "}
            {ctx}
            {" · "}
            {mem}
            {" · "}
            {group}
            {" calls · "}
            nothing refused
            {" "}
          </Text>
          <Button label="Cockpit" />
        </Box>
        {await next(e)}
      </Box>
    )
  })

  on('session.start', async ($, e, next) => {
    const short = '…'
    const group = '…'
    const error = '…'
    await $.ui.status(`cortex ${short} slow: ${group} ms`)
    await $.ui.toast(`consolidate: running`)
    await $.ui.toast(`/cortex is taken by another plugin: ${error}`)
    return next(e)
  })
}

The mod's own code

Its licence text was not found at the commit read, so only the places in the source are linked.

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

What its code calls

runs programsreads filesenv varsdrives Claudetool callsrememberscalls tools

What its code shows

Read from the source at commit 2c68ec09fdb2 on 2026-10-11. 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.mods/cortex-cockpit/hooks/register.tsx
ParsesEvery file parses as TypeScript or JavaScript.16 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).mods/cortex-cockpit/hooks/register.tsx:127 ps (not on Windows)
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.mods/cortex-cockpit/hooks/register.tsx:179 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 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.no licence
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).mods/cortex-cockpit/hooks/register.tsx:95 an MCP tool named at run time; mods/cortex-cockpit/hooks/register.tsx:182 an MCP tool named at run time; mods/cortex-cockpit/hooks/register.tsx:189 an MCP tool named at run time
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.adds command cortex, 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: command.run (cortex), tool.call · also: session.start, turn.complete, ui.render (Pane, ToolUse, ToolResult (+1)) · timers: 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, USERPROFILE, CLAUDE_CONFIG_DIR; files: a path computed at run time
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 cdeust/claude-mods
/plugin install cortex-cockpit@claude-mods
/reload-plugins

This installs the marketplace's latest commit, which may not be the one read here (2c68ec09fdb2). 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/cdeust/claude-mods
git -C claude-mods checkout 2c68ec09fdb251b7b0cbf0f01e9fe28528ed0037
claude plugin validate claude-mods/mods/cortex-cockpit
claude --plugin-dir claude-mods/mods/cortex-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 about it

With the ModsCode connector added, Claude can read this mod's code and what it reaches, and build on them. Ask it like this:

Read the ModsCode mod "cdeust-cortex-cockpit" with its code and make me one like it

Search them from Claude: the MCP connector

Similar mods

More from 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/cdeust-cortex-cockpit.svg)](https://modscode.com/claude-mods/mods/cdeust-cortex-cockpit/)