session-canvas
/session-canvas
Tworzy przeglądalne płótno HTML z analizą, porównaniem opcji i uzasadnieniem decyzji, gdy odpowiedź wymaga dyskusji.
- Autor
- akshaycj ↗
- Repozytorium
- session-canvas ↗
- Licencja
- MIT
- Ostatnia zmiana repozytorium
- 30.10.2026
Ocena i bezpieczeństwo
- Pliki w paczce
- 32
- Skrypty
- 5
- Komentarze HTML
- 0
- Adresy URL w SKILL.md
- 0
Brak sygnałów. Repozytorium zmienione 30.10.2026, bez odwołań do wycofanych modeli i API.
MIT, otwarta: można używać i zmieniać, z zachowaniem informacji o autorze.
- 5 skryptów w paczce. Przejrzyj je przed instalacją, bo Claude może je uruchomić.
Skrypty: scripts/canvas_add.py, scripts/canvas_common.py, scripts/canvas_init.py, scripts/start.py, scripts/use_template.py
Co robi i kiedy
Tworzy przeglądalne płótno HTML z analizą, porównaniem opcji i uzasadnieniem decyzji, gdy odpowiedź wymaga dyskusji.
Oryginalny opis (EN)
Live, skimmable HTML canvas for discussion-heavy answers. Use only when the reply is a discussion, analysis, comparison of options, research findings, a decision with rationale, or a detailed explanation, or when the user asks for the canvas or a structured visual write-up. Do not use for code changes, builds, quick answers, or routine chores. Also provides HTML templates for finished deliverables (code reviews, status reports, plans, explainers, diagrams, decks).
Jak działa
- Start the project canvas
- On Claude Code
- On Codex
- Why this exists
- What to put on the canvas (and what not to)
- How to author
- Component vocabulary (matches the html-effectiveness examples)
- Full-page deliverable templates (router) — read templates/manifest.md
- Storage and troubleshooting
Podgląd SKILL.md
---
name: session-canvas
description: >
Live, skimmable HTML canvas for discussion-heavy answers. Use only when the
reply is a discussion, analysis, comparison of options, research findings,
a decision with rationale, or a detailed explanation, or when the user asks
for the canvas or a structured visual write-up. Do not use for code changes,
builds, quick answers, or routine chores. Also provides HTML templates for
finished deliverables (code reviews, status reports, plans, explainers,
diagrams, decks).
---
# Session Canvas
## Start the project canvas
Run the scripts from the project you are working in. `canvas_init.py` creates `.sessions/<id>/` in the git root (or current directory outside git) and adds `.sessions/` once to `.git/info/exclude`. Add the session content, then start the local server:
```bash
python3 <skill>/scripts/canvas_init.py <session-id>
python3 <skill>/scripts/canvas_add.py .sessions/<session-id> --page-title "<topic>" --page-eyebrow "<kind>" --page-status "<what's happening>"
python3 <skill>/scripts/start.py <session-id>
```
`start.py` prints the page URL. The server serves this project's `.sessions/`, chooses a free port, and records its port and PID in `.sessions/.server.json`; starting again reuses the server. The session index is at `.sessions/index.html`. See `references/setup.md` for git handling and host-specific opening notes.
## On Claude Code
Open the printed URL in the browser pane. Add sections with `canvas_add.py` as the discussion develops; use only for substantive answers, not code chores or routine updates.
## On Codex
Run the same commands and open the printed URL with `open "<url>"` on macOS, or in your browser. No Claude Code hooks or settings are needed.
## Why this exists
Terminal output is verbose, flat, and high-effort to read: no hierarchy, nothing
to skim, every answer a paragraph you have to parse linearly. That's a cognitive
tax. A rendered HTML page fixes it — headings, sections, a table of contents,
collapsible detail — so the reader *glances* instead of *reads*. This skill makes
that page the primary surface for the session's substance.
**The single rule: the canvas shows only what the user needs.** It is not a log of
what you did. Tool calls, todos, file lists, your reasoning trail — all noise to
them. Keep that out. Put the *answer* on the page, structured to skim.
## What to put on the canvas (and what not to)
✅ **Belongs on the canvas** — the deliverable:
- Plans and phased work, comparisons of options/approaches, findings & review
notes, decisions and their rationale, explanations of how something works,
summaries, anything with parts (steps, columns, before/after, severity).
❌ **Never on the canvas** — your working memory:
- Tool calls, command output, todo lists, "files touched", activity feeds,
step-by-step narration of what you're doing. The user explicitly does not want
this. If you're tempted to show progress, set a one-line page status instead.
Rule of thumb: if it has structure, it's a section. If it's a paragraph of prose,
ask whether it should be a `tldr` box, a list, or a small table instead.
## How to author
The exact canvas directory and command are injected into your context at session
start (look for "Session Canvas is LIVE"). Two moves:
**1. Set the header once**, as soon as you know the topic:
```
python3 <canvas_add.py> "<canvas_dir>" \
--page-title "Auth token refactor" \
--page-eyebrow "Implementation plan" \
--page-status "Drafting the migration steps"
```
**2. Post a section** for each substantive thing (body is HTML on stdin):
```
python3 <canvas_add.py> "<canvas_dir>" --type plan --title "Migration steps" --id plan <<'HTML'
<ol><li>Add the new column …</li><li>Backfill …</li></ol>
HTML
```
- **`--type`**: `plan` · `comparison` · `finding` · `decision` · `diff` · `note`.
Each gets a small typographic accent and a table-of-contents entry.
- **`--id <slug>`**: makes a section **updatable** — post again with the same id
to replace it in place (keeps its position). Use it for anything that evolves
(a living plan, a growing findings list) so the page stays clean.
- Keep a brief pointer in chat ("posted the three approaches to the canvas") and
let the detail live on the page. Don't duplicate the whole thing as prose too.
### Theme
Every session canvas includes a persistent light/dark theme control in the left
rail. On first load it follows the operating-system color preference; after the
reader chooses a mode, the choice is stored per session and restored on reload.
When extending the canvas template, keep the `btnTheme` control, the
`data-theme="dark"` token overrides, and the early theme bootstrap script in
`assets/page.html` together so new canvases created by `canvas_init.py` inherit
the same behavior. Existing canvas directories are intentionally not overwritten
by `canvas_common.ensure_page`; update an existing page explicitly if a template
change needs to be backported.
## Component vocabulary (matches the html-effectiveness examples)
Author bodies with these classes — the page styles them in the Anthropic look:
| Markup | Use for |
|--------|---------|
| `<div class="tldr"><b>TL;DR</b> — …</div>` | one-line summary at the top of a section |
| `<div class="grid"><div><h4>A</h4>…</div><div><h4>B</h4>…</div></div>` | side-by-side option comparison |
| `<div class="callout"><span class="ico">★</span><div>…</div></div>` | a tip / important aside |
| `<details><summary>Step <span class="where">file.ts:21</span></summary><div class="dbody">…</div></details>` | collapsible detail — keeps the page skimmable |
| `<table>…</table>` | structured comparison / data |
| `<pre><code>…</code></pre>` with `<span class="hl">` / `<span class="cm">` | annotated code |
| `<ul>` / `<ol>`, `<h3>`/`<h4>`, `<dl class="faq">` | lists, sub-structure, Q&A |
| `<ul class="check"><li class="done">…</li><li>…</li></ul>` | checklist that auto-renders a **progress bar** (done/total %) — use for plans; re-post with same `--id`, flipping `<li>` to `done` as steps land |
### Rich visual components — read `references/components.md`
Beyond the basics above, the page loads a **component library** (`assets/components.css`)
distilled from the html-effectiveness gallery, so your sections can look like those
examples — charts, diagrams, timelines, not just prose. **`references/components.md`
is the cheatsheet: read it before authoring a substantive section** and reach for a
visual whenever the data has shape:
| The data is… | Use |
|---|---|
| headline numbers / metrics | `sc-kpis`, `sc-bars` (bar chart), `sc-ring` (gauge) |
| a sequence over time | `sc-timeline` (events), `sc-milestones` (phased plan) |
| a system / pipeline / flow | `sc-flow` (data-flow), `sc-fc` (flowchart with decisions) |
| risks / trade-offs | `sc-risk` (severity table), `sc-bars` |
| design tokens / specs | `sc-swatches`, `sc-scale`, `sc-spec` |
| status / labels | `sc-pill`, `sc-tag`, `sc-badge`, `sc-legend` |
| a UI idea | `sc-mockup` (window frame), `sc-sheet` (variant grid) |
Don't *describe* what a chart would show — draw it. A bar chart of "PRs/day" beats a
sentence; a flowchart of the request path beats three paragraphs. All components use
the same warm palette and are drop-in HTML (see the cheatsheet for exact markup).
**Reader affordances are automatic** — every section gets a type colour + icon (in
the TOC and its header), is collapsible (with a one-line summary when collapsed),
and is navigable via scroll-spy, `j`/`k` keys, and a focus mode that dims
everything but the section being read. You don't author any of that; just write
good section bodies, pick the right `--type`, and use the rich components above.
These exist to lower cognitive load — so prefer several short, visual, well-typed
sections over one long wall of prose.
Tabs (e.g. config vs. code vs. response):
```
<div class="tabs" data-tabs>
<div class="tabbar"><button class="on" data-t="0">a.yaml</button><button data-t="1">b.ts</button></div>
<pre class="on">…</pre><pre>…</pre>
</div>
```
Prefer `<details>` for anything long — collapsed-by-default detail is what makes a
page skimmable instead of a scroll. Lead each section with a `tldr` so the reader
gets the point before deciding to expand.
## Full-page deliverable templates (router) — read `templates/manifest.md`
Two modes live in this skill:
- **Live canvas sections** (everything above) — the evolving page of session substance.
- **Deliverable templates** (this section) — 20 purpose-built, standalone `.html`
pages kept **verbatim** in `templates/` (code review, PR writeup, slide deck,
status report, incident report, implementation plan, design system, flowchart,
module map, feature/concept explainers, triage board, feature-flag editor, prompt
tuner, animation/interaction prototypes, …). Each is a complete artifact — full
CSS, SVG, fonts, animations, and (for editors/decks) real JavaScript.
**When the user wants a discrete deliverable that matches one of these, use the exact
template — don't rebuild it and don't approximate it with canvas blocks.** This is the
router:
1. Open `templates/manifest.md` and match the request to a template by its "Use when".
2. Instantiate it:
```
python3 <skill>/scripts/use_template.py "<canvas_dir>" <id> <output.html>
```
(e.g. `… use_template.py "<canvas_dir>" 03 auth-pr-review.html`) — this copies the
exact template into the session and opens it in the browser.
3. `Edit` the copied file: replace the sample content with the real content. **Keep
every `<style>`, `<svg>`, class, and `<script>` intact — change only text, numbers,
table rows, diagram nodes, and code snippets.** The look is the template's; the
content is yours.
4. Tell the user it's open. It's a self-contained file they can share as-is.
Routing examples: "review this PR" → `03-code-review-pr`; "write the PR description"
→ `17-pr-writeup`; "turn this into slides" → `09-slide-deck`; "weekly update" →
`11-status-report`; "post-mortem" → `12-incident-report`; "plan this feature" →
`16-implementation-plan`; "explain how X works in the repo" → `14-research-feature-explainer`;
"map this module" → `04-code-understanding`; "draw the deploy pipeline" → `13-flowchart-diagram`.
Use a deliverable template for a finished artifact; use live canvas sections for the
ongoing back-and-forth of the session. They complement each other.
## Storage and troubleshooting
- **Files:** each project stores sessions in `.sessions/<session_id>/`; the session index is `.sessions/index.html`.
- **Git:** init adds `.sessions/` to `.git/info/exclude`, not the project's `.gitignore`. To commit canvases, remove the `.sessions/` line from `.git/info/exclude` and add the files.
- **Server:** one local static server per project serves `.sessions/`. Its port and PID are in `.sessions/.server.json`; it reuses a live server on the next start.
- **Offline or blank page:** run `start.py <session_id>` again and open the printed URL.
Pliki w paczce (32)
- SKILL.md 11 KB
- assets/components.css 16 KB
- assets/page.html 26 KB
- references/components.md 7 KB
- references/setup.md 1 KB
- scripts/canvas_add.py 8 KB
- scripts/canvas_common.py 5 KB
- scripts/canvas_init.py 1 KB
- scripts/start.py 1 KB
- scripts/use_template.py 3 KB
- templates/01-exploration-code-approaches.html 14 KB
- templates/02-exploration-visual-designs.html 14 KB
- templates/03-code-review-pr.html 26 KB
- templates/04-code-understanding.html 18 KB
- templates/05-design-system.html 18 KB
- templates/06-component-variants.html 16 KB
- templates/07-prototype-animation.html 12 KB
- templates/08-prototype-interaction.html 11 KB
- templates/09-slide-deck.html 16 KB
- templates/10-svg-illustrations.html 18 KB
- templates/11-status-report.html 16 KB
- templates/12-incident-report.html 15 KB
- templates/13-flowchart-diagram.html 15 KB
- templates/14-research-feature-explainer.html 12 KB
- templates/15-research-concept-explainer.html 13 KB
- templates/16-implementation-plan.html 28 KB
- templates/17-pr-writeup.html 24 KB
- templates/18-editor-triage-board.html 18 KB
- templates/19-editor-feature-flags.html 19 KB
- templates/20-editor-prompt-tuner.html 21 KB
- templates/index.html 38 KB
- templates/manifest.md 4 KB
Wersje
W bazie nie ma innych skilli o nazwie session-canvas.
Migawka bazy z 13.11.2026 · wersja paczki e59256892c3c (skrót SHA-256 całej paczki)
Pobrania w ostatnich 30 dniach: 0 · ranking
Zgłoś problem z tym skillem: szkodliwa treść, błędny opis albo prośba autora o usunięcie.
Podobne skille
- 90docs-canvas
Renderuje dokumentację jako interaktywne, nawigowalne płótno HTML, bez pisania i restrukturyzacji dokumentów. - 85work-canvas
Zamienia pracę agenta (postęp, debugowanie, analizę, porównania, decyzje) w jedną samodzielną stronę HTML do przeglądu w przeglądarce, z komentarzami, porównaniem opcji i krokami dalej. - 100show-me-html
Tworzy samodzielne strony HTML z raportami, planami, diagramami, wykresami i prezentacjami, gdy układ i wizualizacja mają znaczenie. - 100visual-reports
Tworzy i aktualizuje kompaktowe raporty HTML, porównania i prototypy lokalne z gotowych szablonów i eksportów. - 100visual-brief
Publikuje obszerne raporty z implementacji, analiz, przeglądów lub projektów jako lokalną, warstwową stronę HTML, gdy wynik pracy wymaga szczegółów. - 100visual-review-page
Buduje lokalną stronę HTML z planem lub porównaniem opcji i zbiera odpowiedzi użytkownika przez dołączony lokalny serwer.