# carreirodev/mod-status-pills architecture

> Architecture diagram of the GitHub repository carreirodev/mod-status-pills, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-19). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/carreirodev/mod-status-pills
- Repository: https://github.com/carreirodev/mod-status-pills

## Overview

Status Pills is a Claude Code plugin that gathers session and repository status, turns it into model, context, usage-limit, project, and branch pills, then renders them in the terminal or desktop UI. The sampled registration code shows session reads, refresh triggers, Git branch lookup, and both UI render paths; the README documents placement and appearance. Source excerpts do not show every helper or the complete desktop handler, so the graph stays at subsystem level where details are unavailable.

Main entry points: [`hooks/register.tsx`](https://github.com/carreirodev/mod-status-pills/blob/main/hooks/register.tsx) (Plugin event hooks), [`types/index.d.ts`](https://github.com/carreirodev/mod-status-pills/blob/main/types/index.d.ts) (Status snapshot), [`hooks/picture.ts`](https://github.com/carreirodev/mod-status-pills/blob/main/hooks/picture.ts) (SVG pill pictures)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_collect["Status collection"]
  node_session_data["Session status<br/>[register.tsx]"]
  node_branch_lookup["Git branch lookup<br/>[register.tsx]"]
  node_snapshot["Status snapshot<br/>[index.d.ts]"]
end

subgraph group_present["Pill presentation"]
  node_pill_model["Pill composition<br/>[register.tsx]"]
  node_terminal_render["Terminal pills<br/>[register.tsx]"]
  node_desktop_render["Desktop pills<br/>[register.tsx]"]
  node_svg_picture["SVG pill pictures<br/>[picture.ts]"]
end

subgraph group_integrate["Claude Code integration"]
  node_plugin_hooks["Plugin event hooks<br/>[register.tsx]"]
end

node_claude(("Claude Code"))
node_terminal["Claude terminal"]
node_desktop["Claude desktop app"]

node_plugin_hooks -->|"refreshes from"| node_session_data
node_plugin_hooks -->|"queries branch"| node_branch_lookup
node_session_data -->|"updates"| node_snapshot
node_branch_lookup -->|"adds branch"| node_snapshot
node_plugin_hooks -->|"reads snapshot"| node_pill_model
node_pill_model -->|"supplies pills"| node_terminal_render
node_pill_model -->|"supplies pills"| node_desktop_render
node_desktop_render -->|"builds pictures"| node_svg_picture
node_plugin_hooks -->|"renders hint line"| node_terminal_render
node_plugin_hooks -->|"renders prompt band"| node_desktop_render
node_terminal_render -->|"draws pills"| node_terminal
node_desktop_render -->|"shows SVG pills"| node_desktop
node_claude -->|"dispatches events"| node_plugin_hooks

click node_session_data "https://github.com/carreirodev/mod-status-pills/blob/main/hooks/register.tsx"
click node_branch_lookup "https://github.com/carreirodev/mod-status-pills/blob/main/hooks/register.tsx"
click node_snapshot "https://github.com/carreirodev/mod-status-pills/blob/main/types/index.d.ts"
click node_pill_model "https://github.com/carreirodev/mod-status-pills/blob/main/hooks/register.tsx"
click node_terminal_render "https://github.com/carreirodev/mod-status-pills/blob/main/hooks/register.tsx"
click node_desktop_render "https://github.com/carreirodev/mod-status-pills/blob/main/hooks/register.tsx"
click node_svg_picture "https://github.com/carreirodev/mod-status-pills/blob/main/hooks/picture.ts"
click node_plugin_hooks "https://github.com/carreirodev/mod-status-pills/blob/main/hooks/register.tsx"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_session_data,node_branch_lookup,node_snapshot toneBlue
class node_pill_model,node_terminal_render,node_desktop_render,node_svg_picture toneAmber
class node_plugin_hooks toneMint
class node_claude,node_terminal,node_desktop toneIndigo
```

## Components

### Status collection

- [Session status](https://github.com/carreirodev/mod-status-pills/blob/main/hooks/register.tsx): `hooks/register.tsx`
- [Git branch lookup](https://github.com/carreirodev/mod-status-pills/blob/main/hooks/register.tsx): `hooks/register.tsx`
- [Status snapshot](https://github.com/carreirodev/mod-status-pills/blob/main/types/index.d.ts): `types/index.d.ts`

### Pill presentation

- [Pill composition](https://github.com/carreirodev/mod-status-pills/blob/main/hooks/register.tsx): `hooks/register.tsx`
- [Terminal pills](https://github.com/carreirodev/mod-status-pills/blob/main/hooks/register.tsx): `hooks/register.tsx`
- [Desktop pills](https://github.com/carreirodev/mod-status-pills/blob/main/hooks/register.tsx): `hooks/register.tsx`
- [SVG pill pictures](https://github.com/carreirodev/mod-status-pills/blob/main/hooks/picture.ts): `hooks/picture.ts`

### Claude Code integration

- [Plugin event hooks](https://github.com/carreirodev/mod-status-pills/blob/main/hooks/register.tsx): `hooks/register.tsx`

### Other components

- **Claude Code**
- **Claude terminal**
- **Claude desktop app**

## Connections

- Plugin event hooks → Session status: refreshes from (evidence: `hooks/register.tsx`)
- Plugin event hooks → Git branch lookup: queries branch (evidence: `hooks/register.tsx`)
- Session status → Status snapshot: updates (evidence: `hooks/register.tsx`)
- Git branch lookup → Status snapshot: adds branch (evidence: `hooks/register.tsx`)
- Plugin event hooks → Pill composition: reads snapshot (evidence: `hooks/register.tsx`)
- Pill composition → Terminal pills: supplies pills (evidence: `hooks/register.tsx`)
- Pill composition → Desktop pills: supplies pills (evidence: `hooks/register.tsx`)
- Desktop pills → SVG pill pictures: builds pictures (evidence: `hooks/register.tsx`)
- Plugin event hooks → Terminal pills: renders hint line (evidence: `hooks/register.tsx`)
- Plugin event hooks → Desktop pills: renders prompt band (evidence: `README.md`)
- Terminal pills → Claude terminal: draws pills (evidence: `README.md`)
- Desktop pills → Claude desktop app: shows SVG pills (evidence: `README.md`)
- Claude Code → Plugin event hooks: dispatches events (evidence: `hooks/register.tsx`)
