pro-vi/cc-stretch

Stretchtext replies for Claude Code: short by default, each phrase grows in place when you click it

What it is

cc‑stretch is a small plugin for Claude Code, Anthropic’s terminal‑based AI coding assistant. It implements stretchtext – a concept from the 1960s where a piece of text can be collapsed or expanded phrase by phrase. When Claude writes a long reply, the plugin initially shows a short version (the skim). Clicking a highlighted phrase expands that part in‑place, revealing the extra words Claude generated for that segment while keeping the surrounding text unchanged. Clicking the « symbol collapses it again.

Why it matters

Claude already produces verbose explanations. Reading everything can be overwhelming and costly (tokens are still consumed). cc‑stretch lets you progressively disclose the content: you see only what you choose to expand, keeping your place and focusing attention on one idea at a time. The plugin also folds tool‑call summaries, making streamed replies cleaner.

How to use it

  1. In a Claude Code session run:
    /plugin install cc-stretch --marketplace pro-vi/cc-stretch
    /tui fullscreen
    
  2. The plugin works in Claude Code’s fullscreen terminal renderer and in the Claude desktop app. Click a linked phrase to expand it; click « to shrink it back.
  3. Three view modes are defined:
    • skim – all stretches collapsed (default view).
    • full – every stretch expanded (shows the entire reply).
    • read – the skim plus any stretches you have opened.

Key features

  • Nested stretches – a stretch can contain further stretches, allowing deep hierarchical expansion.
  • Clean streaming – while Claude streams a reply, already‑expanded stretches stay expanded and the rest appear in their short form.
  • Tool‑call folding – completed tool calls are collapsed to a one‑line summary; running or errored calls stay open.

Limitations

  • Clickable expansion only works in the fullscreen terminal layout and the Claude desktop app. In other environments all stretches appear expanded.
  • Windows click support is currently broken (see issue #1).
  • The plugin does not reduce token usage; Claude still generates the full text up‑front.
  • The {{short|long}} markup is visible if the plugin isn’t loaded.
  • It depends on Claude Code’s early‑access function‑hook API, which may change between releases.

Development & testing

  • Run npm test to validate the plugin and execute Claude’s test harness.
  • npm run typecheck runs the benchmark scripts used for the measurements described in the README.
  • The repository includes a film directory that can recreate a recorded demo session using WezTerm.

Who built it

The plugin was created by pro‑vi (not affiliated with Anthropic). It revives Ted Nelson’s stretchtext idea by letting Claude automatically generate the multiple text levels.

Related

  • Project
  • Project
  • Project
  • Project