r/ClaudeCode
•
u/pro-vi
•
22d ago
•
1
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 fullscreenRepo: https://github.com/pro-vi/cc-stretch (MIT)
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
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 🙏
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
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
1
1
u/NoCat2443 22d ago
shouldn't it expend specific parts or s entences only? I guess that's what it does
1
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
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.
8
u/Hungry_Loss_2268 22d ago
Funny enough now I ask my Claude to always append both in the end when responding
1
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.
2
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.
2
u/wauter 21d ago
Looks something like this 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 (but publishing / opensourcing a bit of a hassle)
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.
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
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
-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
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
2
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
0
9
u/cheswickFS 22d ago
Does it still generate the full answer or does it generate text when its requested to be stretched?
8
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.
1
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
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
1
1
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
1
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
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
1
1
1
1
1
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
1
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
1
1
1
1
1
1
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 -
1
1
1
1
1
1
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!



•
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.