Skip to content
Back to skills

2505 00 Plan Overview B35a7edc

ASecurity

> Transform Claude Code Usage Monitor from a read-only Rich dashboard to an interactive Textual TUI. **Status:** Implementation Complete **Created:** 2025-12-13 **Updated:** 2025-12-14 **Documents:** 4 supporting documents in this folder ---

  • 9 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added October 11, 2026
developmentrustbashreact

Works with

  • claude code
  • terminal
  • cli

Security analysis

A100/100

Scanned October 11, 2026

npx -y skills add tools-only/X-Skills --skill 2505-00-plan-overview_b35a7edc --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of 2505 00 Plan Overview B35a7edc?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for 2505 00 Plan Overview B35a7edc
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/tools-only-2505-00-plan-overview-b35a7edc/badge)](https://www.skillsdirectory.com/skills/tools-only-2505-00-plan-overview-b35a7edc)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

SKILL.md
# Interactive TUI Implementation Plan

> Transform Claude Code Usage Monitor from a read-only Rich dashboard to an interactive Textual TUI.

**Status:** Implementation Complete
**Created:** 2025-12-13
**Updated:** 2025-12-14
**Documents:** 4 supporting documents in this folder

---

## Vision

An interactive terminal experience that empowers developers to monitor, analyze, and control their Claude AI token usage through efficient keyboard-driven interactions—without breaking their development flow.

---

## Jobs To Be Done

### Primary Job
> "When using Claude Code, I want to understand my token consumption and remaining capacity so I can make informed decisions about my work session without interruption."

### Supporting Jobs

| Job | Success Metric |
|-----|----------------|
| **Session Planning** | Know budget before starting work |
| **Real-Time Awareness** | Glanceable status, no flow interruption |
| **Crisis Prevention** | Early warnings before hitting limits |
| **Historical Analysis** | Understand patterns to optimize usage |
| **Cost Control** | Track and optimize AI spend |

---

## Experience Principles

| Principle | Meaning |
|-----------|---------|
| **Flow-First Awareness** | Info is glanceable. Interaction is intentional. |
| **Context Over Data** | Show insights, not just numbers. Answer "so what?" |
| **Progressive Expertise** | Simple by default. Powerful when needed. |
| **Trust Through Transparency** | Show your work. Explain predictions. |
| **Proactive Partnership** | Anticipate needs. Suggest actions. |

---

## Feature Set

### Phase 1: Foundation
- [x] Textual app skeleton
- [x] Dashboard view with real-time updates
- [x] Basic keyboard navigation
- [x] Pause/Resume functionality

### Phase 2: Views
- [x] Daily aggregation view
- [x] Monthly aggregation view
- [x] Agents activity view
- [x] View switching (1-4 keys)

### Phase 3: Interactivity
- [x] Panel focus/navigation
- [x] Drill-down into details
- [x] Filter/search functionality
- [x] Help overlay (?)

### Phase 4: Analysis
- [x] What-if scenario calculator
- [ ] Comparison mode (today vs yesterday) - future
- [ ] Historical trends with sparklines - future
- [ ] Peak hours analysis - future

### Phase 5: Advanced
- [ ] Configurable alert thresholds - future
- [ ] Agent relationships view - future
- [ ] Model efficiency metrics - future
- [ ] Density modes (compact/normal/detailed) - future

---

## Technical Approach

**Framework Migration:** Rich → Textual (parallel development)

```
Current: Rich Live (read-only)
    ↓
New: Textual App (interactive)
    - Screen-based views
    - Widget composition
    - Reactive state
    - Keyboard events
```

**Key Technical Decisions:**
1. **Parallel development** - New `tui/` module alongside existing `ui/`
2. **Centralized state** - `AppState` dataclass with reactive properties
3. **Thread safety** - `call_from_thread()` for background updates
4. **TCSS theming** - Dark/light detection, CSS-like styling

---

## Implementation Summary

### Files Created

```
src/claude_monitor/tui/
├── __init__.py
├── app.py                 # ClaudeMonitorApp main class
├── bindings.py            # Keyboard bindings configuration
├── events.py              # Custom Textual events
├── styles.tcss            # Textual CSS theme
├── screens/
│   ├── __init__.py
│   ├── base.py            # BaseMonitorScreen class
│   ├── dashboard.py       # Real-time monitoring
│   ├── daily.py           # 7-day aggregation
│   ├── monthly.py         # 3-month aggregation
│   ├── agents.py          # Agent activity
│   ├── help.py            # Help overlay modal
│   └── whatif.py          # What-if calculator modal
├── widgets/
│   ├── __init__.py
│   ├── header.py          # App header
│   ├── footer.py          # App footer with hints
│   ├── usage_panel.py     # Token/cost overview
│   ├── progress_bars.py   # TokenBar, CostBar, TimeBar
│   ├── burn_rate.py       # Consumption rate display
│   ├── predictions.py     # Usage projections
│   ├── model_usage.py     # Per-model breakdown
│   ├── session_table.py   # Daily/monthly data table
│   └── agent_table.py     # Agent data table
└── state/
    ├── __init__.py
    └── app_state.py       # AppState, SessionState
```

### Files Modified

| File | Change |
|------|--------|
| `pyproject.toml` | Added textual>=0.47.0, textual-dev>=1.0.0 |
| `core/settings.py` | Added `tui: bool` field |
| `cli/main.py` | Added `_run_tui()` function, `--tui` flag handling |

---

## Usage

```bash
# Launch interactive TUI
claude-monitor --tui

# With specific plan
claude-monitor --tui --plan max5

# With custom refresh rate
claude-monitor --tui --refresh-rate 5
```

### Keyboard Shortcuts

| Key | Action |
|-----|--------|
| `1-4` | Switch views |
| `Space` | Pause/Resume |
| `r` | Force refresh |
| `?` | Show help |
| `w` | What-if calculator |
| `q` | Quit |

---

## Documents

| Document | Purpose |
|----------|---------|
| [01-experience-design.md](./01-experience-design.md) | JTBD, user journey, struggling moments, principles |
| [02-interaction-design.md](./02-interaction-design.md) | Navigation, shortcuts, screen layouts, patterns |
| [03-technical-architecture.md](./03-technical-architecture.md) | Module structure, data flow, state management |
| [04-phase-tasks.md](./04-phase-tasks.md) | Detailed task breakdown by phase |

---

## Success Criteria

1. ✅ **Developers can check usage in <3 seconds** (glanceable dashboard)
2. ✅ **No mouse required for any task** (keyboard-first)
3. ✅ **Works on smallest reasonable terminal** (60x20 minimum)
4. ✅ **Advanced features discoverable but not intrusive**
5. ✅ **Users report feeling "in control" of their usage**

---

## Future Enhancements

1. Comparison mode (today vs yesterday)
2. Historical trends with sparklines
3. Peak hours analysis
4. Configurable alert thresholds
5. Agent relationships visualization
6. Model efficiency metrics
7. Density modes (compact/normal/detailed)

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.