canvas
Spawn interactive terminal TUI components (calendars, documents, flight bookings) with real-time IPC communication. Display rich content and collect user selections in tmux split panes.
Best use case
canvas is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Spawn interactive terminal TUI components (calendars, documents, flight bookings) with real-time IPC communication. Display rich content and collect user selections in tmux split panes.
Teams using canvas should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/canvas/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How canvas Compares
| Feature / Agent | canvas | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Spawn interactive terminal TUI components (calendars, documents, flight bookings) with real-time IPC communication. Display rich content and collect user selections in tmux split panes.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
# Canvas TUI Toolkit
Interactive terminal displays (TUIs) that spawn in tmux split panes and communicate via IPC. Use for calendars, documents, flight bookings, and other rich interactive scenarios.
## When to Use
- Displaying calendars and picking meeting times
- Showing markdown documents with text selection
- Comparing flights and selecting seats
- Any scenario requiring visual display + user interaction
- When you need to show rich content without blocking the conversation
## Quick Start
```bash
cd ${SKILL_DIR}
# Display calendar in current terminal
bun run src/cli.ts show calendar
# Spawn interactive meeting picker in tmux split
bun run src/cli.ts spawn calendar --scenario meeting-picker --config '{
"calendars": [
{"name": "Alice", "color": "blue", "events": [...]},
{"name": "Bob", "color": "green", "events": [...]}
]
}'
```
## Available Canvas Types
| Canvas | Purpose | Scenarios |
|--------|---------|-----------|
| `calendar` | Display calendars, pick meeting times | `display`, `meeting-picker` |
| `document` | View/edit markdown documents | `display`, `edit`, `email-preview` |
| `flight` | Flight comparison and seat selection | `booking` |
## Spawning Canvases
**Always use `spawn` for interactive scenarios** - opens canvas in tmux split pane.
```bash
bun run src/cli.ts spawn [kind] --scenario [name] --config '[json]'
```
**Parameters:**
- `kind`: Canvas type (calendar, document, flight)
- `--scenario`: Interaction mode
- `--config`: JSON configuration for the canvas
- `--id`: Optional canvas instance ID for IPC
## Calendar Canvas
### Display Scenario
View-only calendar display.
```bash
bun run src/cli.ts show calendar --config '{
"title": "My Week",
"events": [
{
"id": "1",
"title": "Meeting",
"startTime": "2026-01-07T09:00:00",
"endTime": "2026-01-07T10:00:00"
}
]
}'
```
### Meeting Picker Scenario
Interactive time slot selection across multiple calendars.
```bash
bun run src/cli.ts spawn calendar --scenario meeting-picker --config '{
"calendars": [
{
"name": "Alice",
"color": "blue",
"events": [
{"id": "1", "title": "Standup", "startTime": "2026-01-07T09:00:00", "endTime": "2026-01-07T09:30:00"}
]
}
],
"slotGranularity": 30,
"minDuration": 30,
"maxDuration": 120
}'
```
**Controls:**
- Mouse click: Select a free time slot
- `←/→`: Navigate weeks
- `t`: Jump to today
- `q` or `Esc`: Cancel
**Returns:**
```json
{
"startTime": "2026-01-07T14:00:00",
"endTime": "2026-01-07T15:00:00",
"duration": 60
}
```
## Document Canvas
### Display Scenario
Read-only markdown document.
```bash
# Spawn in new tmux pane (recommended)
bun run src/cli.ts spawn document --config '{
"content": "# Hello World\n\nThis is **markdown**.",
"title": "My Document"
}'
# Or show inline in current terminal
bun run src/cli.ts show document --config '{
"content": "# Hello World\n\nThis is **markdown**.",
"title": "My Document"
}'
```
### Edit Scenario
Interactive document with text selection and diff highlighting.
```bash
bun run src/cli.ts spawn document --scenario edit --config '{
"content": "# Blog Post\n\nSelect some text here.",
"title": "Edit Mode",
"diffs": [
{"startOffset": 20, "endOffset": 30, "type": "add"}
]
}'
```
**Controls:**
- Mouse click and drag: Select text
- `↑/↓`: Navigate document
- `q`: Close
**Returns:**
```json
{
"selectedText": "some text",
"startOffset": 12,
"endOffset": 21,
"startLine": 3,
"endLine": 3
}
```
## Flight Canvas
### Booking Scenario
Flight comparison and seat selection with cyberpunk theme.
```bash
bun run src/cli.ts spawn flight --scenario booking --config '{
"flights": [
{
"id": "ua123",
"airline": "United Airlines",
"flightNumber": "UA 123",
"origin": {
"code": "SFO",
"name": "San Francisco International",
"city": "San Francisco",
"timezone": "PST"
},
"destination": {
"code": "DEN",
"name": "Denver International",
"city": "Denver",
"timezone": "MST"
},
"departureTime": "2026-01-08T12:55:00-08:00",
"arrivalTime": "2026-01-08T16:37:00-07:00",
"duration": 162,
"price": 34500,
"currency": "USD",
"cabinClass": "economy",
"aircraft": "Boeing 737-800",
"stops": 0,
"seatmap": {
"rows": 30,
"seatsPerRow": ["A", "B", "C", "D", "E", "F"],
"aisleAfter": ["C"],
"unavailable": ["1A", "1B", "1C"],
"premium": ["2A", "2B"],
"occupied": ["3A", "4B"]
}
}
]
}'
```
**Controls:**
- `↑/↓`: Navigate between flights
- `Tab`: Switch to seatmap
- `←/→/↑/↓` (in seatmap): Move cursor
- `Space`: Select seat
- `Enter`: Confirm
- `q`: Cancel
**Returns:**
```json
{
"selectedFlight": { ... },
"selectedSeat": "12A"
}
```
## IPC Communication
Canvases communicate via Unix domain sockets.
**Canvas → Controller:**
```typescript
{ type: "ready", scenario } // Canvas ready
{ type: "selected", data } // User made selection
{ type: "cancelled", reason? } // User cancelled
{ type: "error", message } // Error occurred
```
**Controller → Canvas:**
```typescript
{ type: "update", config } // Update canvas config
{ type: "close" } // Close canvas
{ type: "ping" } // Health check
```
## Programmatic API
```typescript
import { pickMeetingTime, editDocument, bookFlight } from "${SKILL_DIR}/src/api";
// Meeting picker
const meeting = await pickMeetingTime({
calendars: [...],
slotGranularity: 30,
});
// Document editor
const doc = await editDocument({
content: "# My Document",
title: "Edit Mode",
});
// Flight booking
const flight = await bookFlight({
flights: [...]
});
```
## Requirements
- **tmux**: Canvas spawning requires active tmux session
- **Bun**: Runtime for executing canvas commands
- **Terminal with mouse support**: For interactive scenarios
## File Structure
```
canvas/
├── SKILL.md # This file
├── README.md # Additional documentation
├── package.json # Dependencies
├── run-canvas.sh # Wrapper script
├── src/
│ ├── cli.ts # CLI entry point
│ ├── canvases/ # React/Ink canvas components
│ ├── scenarios/ # Scenario definitions
│ ├── ipc/ # IPC server/client
│ └── api/ # High-level API
└── scripts/ # Helper scripts
```
## Tips
- Always check for tmux session before spawning: `tmux list-sessions`
- Use `show` for quick displays, `spawn` for interactive scenarios
- Canvas IDs are optional but useful for managing multiple canvases
- IPC sockets are created in `/tmp/canvas-*.sock`
- Canvases auto-cleanup on exit or error
## Examples
### Example 1: Pick Meeting Time
```bash
# User: "Find a time for Alice and Bob to meet tomorrow"
# You: Spawn meeting picker
bun run src/cli.ts spawn calendar --scenario meeting-picker --config '{
"calendars": [
{"name": "Alice", "color": "blue", "events": [...]},
{"name": "Bob", "color": "green", "events": [...]}
],
"slotGranularity": 30
}'
# Wait for selection, then confirm with user
```
### Example 2: Review Document
```bash
# User: "Show me the email draft"
# You: Display email in document canvas
bun run src/cli.ts spawn document --config '{
"content": "Dear Team,\n\nPlease review...",
"title": "Email Draft"
}'
```
### Example 3: Book Flight
```bash
# User: "Compare these flights and pick a seat"
# You: Spawn flight booking canvas
bun run src/cli.ts spawn flight --scenario booking --config '{
"flights": [...]
}'
# Wait for user to select flight + seat
```Related Skills
canvas-design
Create beautiful visual art in .png and .pdf documents using design philosophy. You should use this skill when the user asks to create a poster, piece of art, design, or other static piece. Create ...
anthropic-design-canvas
Create beautiful visual art in .png and .pdf documents using design philosophy. You should use this skill when the user asks to create a poster, piece of art, design, or other static piece. Create original visual designs, never copying existing artists' work to avoid copyright violations.
anthropic-canvas-design
Create beautiful visual art in .png and .pdf documents using design philosophy. You should use this skill when the user asks to create a poster, piece of art, design, or other static piece. Create original visual designs, never copying existing artists' work to avoid copyright violations.
concept-to-canvas
Transform any concept, idea, experience, or philosophical question into an interactive visual-computational investigation using p5.js or HTML5 Canvas. Use this skill whenever the user wants to explore an idea visually, asks to "make something" from a concept, requests generative art, wants to visualize a mathematical or philosophical idea, says "let's build/explore/investigate/paint/visualize" a concept, or wants to turn any abstract subject into an interactive experience. Also trigger when the user provides a concept and the best response would be showing rather than telling — a working visual artifact beats a wall of text. This skill layers on top of the works-on-becoming skill when available, but operates independently.
agent-canvas-setup
Dependency checker and installer for agent-canvas, agent-eyes, and canvas-edit skills. Use BEFORE running any canvas skill for the first time, or when canvas skills fail with import/browser errors. Triggers on "setup agent canvas", "install canvas dependencies", "canvas not working", "playwright not found", or any setup/installation request for canvas skills.
json-canvas
Create and edit JSON Canvas files (.canvas) with nodes, edges, groups, and connections. Use when working with .canvas files, creating visual canvases, mind maps, flowcharts, or when the user mentions Canvas files in Obsidian.
agent-canvas
Interactive element picker for web pages. Opens a browser with click-to-select UI overlay. Use when you need to let users visually select DOM elements, identify element selectors, or get detailed element information interactively. Triggers on "select an element", "pick element", "let me choose", "which element", or any interactive element selection task. Integrates with agent-eyes for visual context.
bgo
Automates the complete Blender build-go workflow, from building and packaging your extension/add-on to removing old versions, installing, enabling, and launching Blender for quick testing and iteration.
cc-routine-and-class-design
Evaluate routine and class design quality using Code Complete checklists (43 items). Use when designing routines or classes, reviewing class interfaces, choosing between inheritance and containment, or evaluating routine cohesion. Also trigger when tempted to use inheritance as a quick fix under deadline pressure, or when rationalizing 'but it works' for code with deep inheritance or many parameters. Produce severity-tagged reviews (VIOLATION/WARNING/PASS) in CHECKER mode or design decisions in APPLIER mode. Symptoms: vague routine names, >7 parameters, deep inheritance, mixed abstraction levels.
cc-get-session-id
Get the current Claude Code session ID. Use when you need to reference or display the session ID.
canva-branded-presentation
Create on-brand Canva presentations from an outline or brief. Use when the user asks to create a branded presentation, make an on-brand deck, turn an outline into slides, or generate a presentation from a brief. Input can be text directly in the message, a reference to a Canva doc by name, or a Canva design link (e.g., https://www.canva.com/design/...).
caching-utilities
Guide for using caching utilities in speedy_utils, including memory, disk, and hybrid caching strategies for sync and async functions.