FYI, I turned ~3k tokens into ~1k by asking Claude to compress the prompt:
Compress the following text in a way such that you (Claude 3.5) can reconstruct it as close as possible to the original. This is for yourself. Do not make it human readable. Aggressively compress it, while still keeping ALL the information to fully reconstruct it. Also use the fewest token possible, your text should be way smaller than the one I give you.
I am going to clear your context and have you reconstruct it WITHOUT the original to refer to. You MUST be able to reconstruct it to 95% of the original. You must keep the code examples to eliminate all syntax errors.
## Text to compress:
[lots of Convex examples]
And it outputs this type of thing:
CVX^dev^spec^React,Vite,Shadcn,TW^3xchk^code^run1st^
Style:concise TS,func,decl,iter,mod,desc vars,struct:exp comp,subcomp,help,static,types
Name:dash-dir,named exp
TS:all,iface>type,no enum,func comp
Syntax:func kw,concise,decl JSX
Err:early,log,user-msg,Zod form,ret vals SA,err bound
UI:Shadcn,Radix,TW,resp,mobile1st
Perf:min useClient/Effect/State,RSC,Susp,dyn load,img opt
Key:nuqs URL,Web Vitals,lim useClient
CVX docs:data fetch,file store,HTTP Act
react-router-dom route,TW style,Shadcn if avail
It's pretty cool.