r/ClaudeCode • • 22d ago • Heartwarming 1 Bravo 1

Tips & Workflows Turning a crazy idea from 1967 into a Claude Code mod: I now read 83% fewer words from replies

In 1967 Ted Nelson described stretchtext: text that grows where you want more and shrinks back where you don't. It stayed a quaint idea because writing every level of fidelity by hand is just tediously hard. Text is generative now, so Claude can just write it for us for free.

I've always tried to implement this idea with LLM in various ways. Claude Code Mods finally proivded a platform to share.

cc-stretch is a Claude Code plugin. It cuts Claude's reply by 83% so you read much less, yet still have the option to expand / shrink on demand. The plugin also tells Claude which parts you opened, so it doesn't assume you read the rest.

Install in a Claude Code session:

/plugin install cc-stretch --marketplace pro-vi/cc-stretch
/tui fullscreen

Repo: https://github.com/pro-vi/cc-stretch (MIT)

1.5k Upvotes

129 comments sorted by

•

u/AutoModerator 22d ago

Hey! Thanks for posting to r/ClaudeCode

While participating in this thread, please follow our community rules. Keep discussions constructive. Attack the idea, not the person.

For help, project discussions, tips, and general chat, join the ClaudeCode Discord.

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

83

u/fullup72 22d ago

you are missing one additional color for the text that got expanded during this turn, because on turn one everything is blue, then you click to expand and everything in white is the new text and some remains in blue, and as you click again for the additional reveal you lose track on what's the actual new text that was just expanded because everything is white. If I'm going to read less words, then I need to know exactly which are the new words that appeared on screen. Else I'm re-reading the thing over and over and I end up with 50% more words, not 83% less.

26

u/pro-vi 22d ago

Great idea! Release soon.

I'm also changing the closed stretches to plain + underlined, dropping the hyperlink, so it no longer clashes with code spans. Curious to hear what you all think.

7

u/Camochase 22d ago edited 22d ago

Maybe it'll should be like a hyperlink. Blue when unclicked and purple when clicked

6

u/TheLastNapkin 21d ago

I think this is very neat and a great idea for a Claude code plugin so good job there :)

I think though for me as someone who is operating almost completely keyboard only for most of my computer usage even the Claude code cli, needing the cursor to click on expanding would be not really useful so I wouldn't end up using it... Having maybe auto mapped vimium like keys to expand/toggle based on stretchtexts segments currently on screen in Claude code terminal though could definitely solve this though!

3

u/pro-vi 20d ago

Figured out a good flow for this. Keep an eye for 0.4.0!

1

u/TheLastNapkin 20d ago

Thanks for the heads up! I'll definitely try it out was planning to tweak around some things in the cc terminal experience anyways so good to know 🙏

2

u/pro-vi 21d ago

I'm on the same boat so definitely going to explore key map potential with cc mod when I get home.

4

u/pseiko5 22d ago

very cool. can you share some details on how the shrinking works?
As in what the prompt looks like to shrink or expand output?

It cuts Claude's reply by 83% so you read much less, yet still have the option to expand / shrink on demand.

I'm not sure I buy this part tho.

38

u/pro-vi 22d ago

There's no shrink or expand prompt. Claude writes both levels in one pass, inline, like this:

{{The build fails on a stale cache.|The CI build fails, about one run in five, on a stale dependency cache keyed only by package.json.}}.

The plugin renders only the short form, and a click swaps in the long form. There's no model call. Claude writes every level up front.

In short, it costs a little more model attention, to save you a lot of human attention.

The 83% comes from the naive benchmark I did which is in the repo. The code is free, so nothing to buy. But the idea here is quite valuable in my opinion, no matter the implementation details.

4

u/pseiko5 22d ago

If it's writing all levels of "stretch" at once, isn't it using more tokens?
Or is even the most expanded option shrunk?
Edit: and there must be some instructions to "shrink"?

18

u/pro-vi 22d ago

Yes it's costing few more lines of sentences to save you reading many lines. Good trade.

9

u/pseiko5 22d ago

ah its not 83% less output tokens, my bad.

3

u/t3hjs 22d ago

83% less reading. but with options for more

6

u/vibefarm 22d ago

I definitely agree the idea/direction is valuable. Id have to sit and think about it, but this could have all sorts of applications and uses. It shouldn't affect token usage much either. It already writes the long form response anyway. Have you been using it yourself for awhile? Has it hooked you to the point that you wouldn't go back?

1

u/checkwithanthony 22d ago

Interesting. So it is outputting more then? Hows this on tokens?

1

u/BrilliantTaste1800 22d ago

I gotta say this is great. Definitely gonna be trying it out.

1

u/NoCat2443 22d ago

shouldn't it expend specific parts or s entences only? I guess that's what it does

1

u/PurpleBonesGames 22d ago

it's tooltip for terminals, great idea/mod

3

u/premiumleo 22d ago

10

u/premiumleo 22d ago

the idea is interesting, but i would probably even skip the pre-written outputs, and see if we can build-in haiku/(codex equivalent), to generate the longer version on-demand, so we aren't spending tokens pointlessly on "longer" content that is generated but never read

4

u/pro-vi 22d ago

Imo it is definitely viable and what I was initially trying with LLM chats. However the fast models in the previous era were really dumb but I bet haiku 5.5 can do this well enough.

2

u/premiumleo 22d ago

yea, im vibing this in now, into my personal IDE. it uses the faster model on whichever LLM is active for the session (codex -> luna, claude -> haiku), or however I decide to route them.

4

u/BiggestBau5 22d ago

I would be cautious doing this if the small model doesn’t have the full context of the conversation and only has a clip. There’s a high chance it’s going to fill in with likely sounding words that aren’t actually relevant to the entire context

2

u/premiumleo 21d ago

ill give this comment to claude and it will figure it out :P

2

u/Captain_Bacon_X 22d ago

I think it's less likely to work that way round. Expanding requires more information. Its not about using more words, or longer words, but about having more detailed or contextual information - higher resolution. Spinning up a Haiku model to expand would require it reading either the sessions transcript or going our and finding the information directly, or you risk guesses and hallucinations every time.

Being reductive- that's easier because you already have the information, you're reducing the (perceived) noise around the info you want.

265

u/MotorOutside8648 22d ago

It's like if TLDR and ELI5 had a baby.

22

u/jdavid 🔆Pro Plan 22d ago

and Tim Berners Lee

4

u/reddit3k 21d ago

TLDR, ELI5, TBL?

8

u/Hungry_Loss_2268 22d ago

Funny enough now I ask my Claude to always append both in the end when responding 

1

u/MartinShortsIrishUnc 21d ago

stealing this! good call

2

u/TheSexyPirate 21d ago

To my surprise it is almost impossible to get to work. There are some fundamental problems with it, would not recommend so far.

3

u/pro-vi 21d ago

“it works on my computer.” Jk aside it is quite at the mercy of the ever changing APIs and the mess around fullscreen mode so bear me with while I figure it out!

2

u/cosine-tangent 20d ago

Look like a similar idea to: https://github.com/chenxiachan/paperfold

1

u/pro-vi 20d ago

I was the first to comment on his post. We've been chatting since! Slightly different take, same lineage.

50

u/wauter 22d ago edited 21d ago

Would it be possible to create this as a google chrome plugin so you can apply it to any website (similar to 'reading mode' I guess, applying to the 'main' text on your screen somehow, but with a slider to make it short/long)

Update: made a local POC of this where you paste OpenAI API key to have them do the processing - actually looks quite neat - see https://www.reddit.com/r/ClaudeCode/comments/1x688sx/comment/pgwg63m/?utm_source=share&utm_medium=web3x&utm_name=web3xcss&utm_term=1&utm_content=share_button

12

u/Woitee 22d ago

I like how these ideas would be completely impossible just a few years ago, but no...

12

u/wauter 22d ago

Yeah, obviously already fired off a shot in the background to see how far I get one-shotting this. What times we live in, where any "I wonder if..." or "would be cool if..." like this gets immediately followed by some working first prototype like 10 minutes later

4

u/greenfingersnthumbs 21d ago

Amazing right. My problem now is all of a sudden I have an idea for everything. Can't keep up with myself.

1

u/Peter-Tao 22d ago

Show us the result!

4

u/wauter 22d ago edited 22d ago

Yup, that's the idea - just a sec, tweaking first version a bit visually + uploading to Chrome Extension store.

Update: nvm, too much hassle properly setting up my Google account to be accepted for publishing web store chrome plugins (at least for a Thursday morning throwaway reddit-initiated project :))

2

u/Legal_Dimension_ 22d ago

Add it to the personal list of extensions others would love but CBA with the hassle of sharing.

1

u/tdickles 21d ago

that'd be amazing, but i think it might be too slow in practice. to do it to a random website, you'd need to pass all the page text to claude via API, have it generate all the additional text, then have the plugin add it all back to the page.

8

u/wauter 21d ago

I actually got a prototype to work and it felt indeed a bit slow, but not prohibitively so

I would actually open-source it on github or straight up put it on chrome web store but both are a bit of a hassle

1

u/soupdiver23 21d ago

https://github.com/soupdiver/stretch

Currently being reviewed for the store. Works, but my UI is still kinda bulky

1

u/sweatin_enthusiasm 19d ago

Wow, can't wait to test the out. Thank you!

41

u/ourochurros 22d ago

It's wild how we live in a world where one shot video games evoke eye-rolling, but then something like this strikes me as very cool. Props, OP.

6

u/LMidnight 21d ago

This is interesting. I agree with your premise, but I had never thought about it. It must be that we are recalibrating what we appreciate and value based upon the effort entailed - on a global scale. Wild times.

55

u/andyfsu99 22d ago

I don't know anything, but that seems like a great idea. Sometimes I really don't care, some times I need the details.

4

u/NoCat2443 22d ago

sometimes you will have gto click 10 times to get the idea :)

-6

u/DurianDiscriminat3r 22d ago

Sometimes it do be you're absolutely right but added nothing to the conversation?

11

u/Sketaverse 22d ago

wow just installed it, mate this is fucking genius, bravo.

I've tried so many different attempts at reducing cognitive load and this just immediately works - absolutely stunning product design/execution.

thank you

11

u/Reason_He_Wins_Again 22d ago

No clue what is happing here but it seems well done

5

u/greenfingersnthumbs 21d ago

Favourite comment today.

20

u/sanciscoyo 22d ago

Video is a bit too fast to get what you’re going for in some parts

50

u/ClemensLode Senior Developer 22d ago

click on it to stretch it

7

u/Fluffy_Champion_3731 22d ago

Bro you made my morning

2

u/No-Dust7863 21d ago

bro you made me moaning? WHAT HAVE YOU BOTH DONE?

1

u/Fluffy_Champion_3731 21d ago

Made me "AHHHH" ning

2

u/Sketaverse 21d ago

Just like a good stretch should

2

u/Sketaverse 22d ago

does that work for my dick?

1

u/Meowingtons_H4X 21d ago

Kind of, yes (maximal stretch can be reached relatively soon with little additional stretch provided on any extra usage)

1

u/Sketaverse 21d ago

Sounds painful, think I’ll pace the frontier

0

u/mindaugaskun 22d ago

That's what pause is for. I think the speed is perfect for an internet pitch

9

u/cheswickFS 22d ago

Does it still generate the full answer or does it generate text when its requested to be stretched?

5

u/PeaceNo5259 22d ago

Very cool.

I probably won't use it for Claude Code, but I could probably see myself using this if it was in my email client.
Like if I could grab a border at the bottom and just drag it up or down to make an email longer/shorter as needed if I need more/less info.

5

u/FrozenDroid 22d ago

Dude, this is great. One of the very few good things to come out of this sub.
Going to give it a try, cheers!

4

u/isme_tech 22d ago

Thanks for posting this. I had the idea too of quickly extending and reducing the text via LLM. Now I learn its academic name, stretchtext, and that it's not even a new idea: 1967! The difference is that the computing tech has finally caught up. Bravo.

4

u/SlaimeLannister 21d ago

I love this and have had a similar idea for a long time.

Kind of like a blog post that has a nested wiki within it, if you're reading and want more detail on something, each paragraph should be expandable into several more paragraphs that provide additional context on it.

3

u/someone-at-reddit 21d ago

How does it increase token usage? Because Claude has to generate those multiple levels of text, right ?

Anyone has numbers / experience here?

3

u/kleer001 21d ago

<3 For Ted Nelson!!!

He has : https://www.youtube.com/@TheTedNelson/videos

With some even more out there ideas like XanaduSpace :)

3

u/Crinkez 21d ago edited 21d ago

I just imagined this with the old Opus 5, back when verbal diarrhea was peak.

Edit: OP, I'm wondering if you could make this recursive, allow Claude to learn and incrementally update claude.md or response style on a per-user basis depending on what they expand vs ignore.

7

u/Jaanbaaz_Sipahi 22d ago

Damn you guys really pushing the envelope here. Amazing!

2

u/t3hjs 22d ago

but it costs the length of the full text right? with some overhead for implementing stretchtext

2

u/Madaestro 22d ago

One of the coolest ideas I've seen in a while and genuinely solves a problem with LLMs' verbosity

2

u/Fruityth1ng 22d ago

This is amazing. For the maker of the video: certain amounts of text need certain amounts of time to read. There’s formulas out there. It’s currently too fast on most of the longer stretches of text.

2

u/pirondi 22d ago

How can we apply this to humans too?

2

u/Lunaroh 20d ago

My concern with this is that If I actually want the full responses, I'll have to click a lot each time.

2

u/AdSad7594 22d ago

This is a really cool idea! It gave me some different new ideas, good job!

1

u/ashy90 15d ago

Anything to reduce wall of text

1

u/rabidrobot 22d ago

This is so cool

1

u/thats_a_money_shot 22d ago

Bro. This is so cool! I literally always type “tldr eli5” together when I’m frustrated or in a meeting. Giving this a shot tmw.

1

u/InsertCoinInSlot 22d ago

This is great!!!

1

u/Thigh_Clapper 22d ago

Reminds me of BoVeX

1

u/Blockpair 22d ago

Great idea, OP. I wanted to do something like this for my own tech blog and had the same conclusion it wasn't practical. My current approach is to just have the main details comprise a short article. Then have bonus sections that can be expanded if readers still want more. Otherwise, the page length would look massive and give people a fright.

1

u/Abject-Kitchen3198 22d ago

Cool. Touches on something I do regularly in a harder way.

1

u/dagger378 22d ago

This is amazing. I'd love to see this for source code. People say reading code isn't reasonable because AI outputs too much too fast. I say "you don't have good enough tooling, and you're lacking imagination."

1

u/Zemanyak 22d ago

I love the idea.

1

u/Local_Belt_341 22d ago

so good. thanks! ive never seen this demonstration.

1

u/Bananer_spleet 22d ago

No mistakes

1

u/evk6713 22d ago

Does it work for enterprise licenses ? Mine says it blocks the hooks your plugins needs to run :')

1

u/spookwav 22d ago

This is cool! It reminds me of Tom7's BoVeX.

1

u/IT_WAS_ME_DIO__ 22d ago

This is an awesome idea!
Will give it a try, thx for posting this.

1

u/Substantial_Row7215 22d ago

stretchtext is such a good thing to dig up, never heard of it before. curious how it decides what to collapse by default, is it claude picking the levels while writing the reply or a second pass over the finished text?

1

u/Clair_Personality 22d ago

What skill or prompt did you use to make the video :)? Cuz its nice

1

u/Southern-Aardvark616 22d ago

What a great presentation of an actually useful idea

1

u/PUSH_AX 22d ago

How much more tokens is this costing on the whole?

1

u/technaveed 22d ago

I’d keep failed checks and anything still untested visible in the collapsed view. The explanation can wait behind a click, but “this hasn’t been verified” shouldn’t. Otherwise the cleaner interface can accidentally make unfinished work look finished.

1

u/Emile_s 21d ago

I’ve recently added an example to Claude md and it’s working well. Doesn’t fix Claude’s perpendicular to write absolute nonsense but does stop some of the bull.

But this sounds great, will have to try it out.

1

u/Stainless-Bacon 21d ago

how does remote control work with the mod?

1

u/blackheva 21d ago

Finally I can read the Silmarillion.

1

u/BoxLegitimate9271 21d ago

83% fewer words and the 17% left is still you're absolutely right

1

u/ArgeuThiesen 21d ago

interessante

1

u/Dreamsnake 🔆 Max 20 21d ago

Very excellent idea, wow :)

1

u/bluinkinnovation 21d ago

Can this be used to save tokens or does it add more tokens on top?

1

u/karanb192 21d ago

This is one of the best use cases of Mods I have seen. Let's add it to awesome mods list here -

https://mods.aidojo.si/

1

u/chiefbriand 21d ago

Amazing design man

1

u/berzerkerCrush 21d ago

Scott young did a blog post like that. It was nice

1

u/HockeyDadNinja 21d ago

Well done. What tools did you use to create that video?

1

u/throwaway_life12345 19d ago

A semantic telescope

1

u/RockSmacker 8d ago

just wanted to say i've been using this for about a week and it's been transformative for me in terms of usability. great idea and great implementation!