FREE TOOLS · REAL TESTS ·98.7% FEWER TOKENS IN THIS TEST
SEVEN JOBS ADDED TOGETHER, NOT ANYONE'S LIVE WEEK
02 / THE SETUP
I'm sharing nine GitHub repos.
9 GITHUB REPOSAll free to use
STEP ONEInstall them once
on your own computer
GROK BOT TOKEN USAGE
CUT WAY DOWN
every job after sends less
Cut token usage as far as it goes.
03 / FROM THIS TO THIS
From this usage, to this usage.
Seven real jobs. Whole file vs short version. Added together. Not one week of use.
usage · before · the whole files
BEFORE
4,343,098
tokens sent, 7 jobs
HIGH USAGE
The meter only goes up until reset.
Airport listthe whole file
3,841,232
Costco Wikipedia pagethe whole file
399,936
Two versions of a pagethe whole file
35,425
Seven code filesthe whole file
30,336
Nine replies from GitHubthe whole file
17,848
A 9-page research PDFthe whole file
12,792
The last 30 jq updatesthe whole file
5,529
usage · after the tools
AFTER
57,944
tokens sent, same 7 jobs
98.7% FEWER ABOUT 75x LESS
Same bar scale as the left board.
Clean articletrafilatura
26,938
Changes onlychangedetection.io
20,070
Clean PDF textDocling
7,900
Short update listRTK
2,399
Matching linesripgrep
374
Just 3 thingsjq
174
Question + answerDuckDB
89
IN THIS TEST. THESE 7 JOBS ADDED TOGETHER. TIKTOKEN CL100K_BASE ESTIMATE, NOT THE GROK BOT METER. NO DOLLAR OR CREDIT CLAIMS. TENACITY AND PYDANTIC NOT COUNTED.
04 / THE NINE
The nine token cutters.
01trafilaturaKeeps only the article words
02jqPicks only the things you need
03ripgrepFinds only the matching lines
04DuckDBAnswers a question about a spreadsheet
05DoclingTurns a PDF into cleaner text
06changedetection.ioSends only what changed on a page
07RTKShrinks long command output
08TenacityRetries one failed call
09PydanticChecks the answer has the right shape
05 / THE TEST
I ran seven jobs two ways.
First I sent the whole file. Then I sent the short version after a tool cleaned it up. Biggest first.
THIS TEST · MOST TO LEAST · WHOLE FILE VS SHORT VERSIONMy test, not your Grok Bot bill
#WHAT I HADTHE REPOWHAT I SENT INSTEAD
1
Airport list3,841,232 tokens
DuckDB
Question + answer89 tokens
2
Costco Wikipedia page399,936 tokens
trafilatura
Clean article26,938 tokens
3
Two versions of a page35,425 tokens
changedetection.io
Changes only20,070 tokens
4
Seven code files30,336 tokens
ripgrep
Matching lines374 tokens
5
Nine replies from GitHub17,848 tokens
jq
Just 3 things174 tokens
6
A 9-page research PDF12,792 tokens
Docling
Clean PDF text7,900 tokens
7
The last 30 jq updates5,529 tokens
RTK
Short update list2,399 tokens
Tenacity and Pydantic are not on this list. They do not shrink the text you send.
ILLUSTRATED FROM THIS TEST, TIKTOKEN CL100K_BASE ESTIMATE. NOT A REAL BILLING PAGE.
06 / HOW WE PROVE IT
How we prove it.
1
STEP 1Pick a real job
a real page, file, or website reply
2
STEP 2Do it the long way
save what the bot would read
3
STEP 3Do it with the tool
same job, same source
4
STEP 4Count both
characters and tokens
REAL SOURCES
Wikipedia, GitHub, a public airport list, a research PDF
HOW WE COUNT
We count the tokens in the exact text we would send
THE FINE PRINT
Numbers from this test only. Not the Grok Bot meter.
TOKENS COUNTED WITH TIKTOKEN CL100K_BASE, AN ESTIMATE. NOT THE GROK BOT METER.
07 / HOW YOU USE THESE
How you use these.
1GET THE TOOLDownload it once and put it on your computer. You do not talk to the GitHub page.
2RUN IT TWO WAYSOpen the tool and type into it yourself. Or type into Grok Bot, and Grok Bot calls the tool and runs it for you.
3SEND LESSThe tool shrinks or cleans the file first. Grok Bot never has to read the huge original.
Most of these are programs you type a command into. Tenacity and Pydantic are extra code that run inside a Python script. changedetection.io is a small app you open on your computer.
08 / REPO 1 OF 9
01
REPO 1 OF 9 · TRAFILATURA · WHAT IT DOES
Strip the page, keep the words.
WHAT IT IS
A free tool that cleans up web pages.
WHAT IT DOES
This tool reads a messy webpage and keeps only the article words. It drops menus, ads, and page code.
93.3%FEWER TOKENS IN THIS TEST
github.com/adbar/trafilatura
09 / TRAFILATURA · HOW IT WORKS
010203040506070809
How trafilatura works.
1STEP 1Save the webpage.
2STEP 2Run trafilatura on your computer.
3STEP 3Send the clean article to Grok Bot, not the whole page.
WHAT I TYPEDtrafilatura --output-format txt < costco_raw.html
10 / TRAFILATURA · THE TEST
010203040506070809
How I used it.
You can type into this tool yourself, or you can ask Grok Bot. Grok Bot then runs the tool for you.
THE GOAL
Send only the article to Grok Bot, not a whole messy webpage.
WHAT I DID
I saved the public Costco page from Wikipedia (en.wikipedia.org/wiki/Costco) on my computer as costco_raw.html. Then I ran this tool on that file.
WHAT I TYPEDtrafilatura --output-format txt < costco_raw.html
BEFOREthe whole Wikipedia page399,936tokens
AFTERjust the article26,938tokens
IN THIS TEST. TIKTOKEN CL100K_BASE ESTIMATE, NOT THE GROK BOT METER.
11 / TRAFILATURA · THE RESULT
010203040506070809
93.3% fewer tokens. Same article.
IN THIS TESTSAME JOB, BEFORE AND AFTER
BEFOREthe whole page
399,936 tokens
AFTERthe clean article
26,938 tokens
93.3%
fewer tokens26,938 TOKENS INSTEAD OF 399,936
14.8xLESS
WHAT THIS MEANSI would send the article, not the junk around it.
IN THIS TEST. TIKTOKEN CL100K_BASE ESTIMATE, NOT THE GROK BOT METER. SOURCE: en.wikipedia.org/wiki/Costco
12 / TRAFILATURA · HOW YOU CAN USE THIS
010203040506070809
How you can use this.
DAILY LIFE
Ask Grok Bot about a news story: send the article, not the ads and menus
Ask about a Wikipedia page: send just the article
Ask about a store page: send the product words, not the buttons
IN YOUR BUSINESS
Ask about another company's website: send the article words, not their menus
Ask about a research page: send just the article
Ask about a blog post: send the post, not the menus around it
13 / REPO 2 OF 9
02
REPO 2 OF 9 · JQ · WHAT IT DOES
Pick the fields you asked for.
WHAT IT IS
A free tool that picks out bits from a big reply from a website.
WHAT IT DOES
This tool looks at a big reply from a website and keeps only the bits you asked for, like the name and the star count.
99.0%FEWER TOKENS IN THIS TEST
github.com/jqlang/jq
14 / JQ · HOW IT WORKS
010203040506070809
How jq works.
1STEP 1Get the big reply.
2STEP 2Tell jq which bits you want.
3STEP 3Send only those bits to Grok Bot.
WHAT I TYPEDjq -c '{name: .full_name, stars: .stargazers_count, lang: .language}'
15 / JQ · THE TEST
010203040506070809
How I used it.
You can type into this tool yourself, or you can ask Grok Bot. Grok Bot then runs the tool for you.
THE GOAL
Keep only 3 things from each GitHub reply: the name, the stars, and the language.
WHAT I DID
I asked GitHub about 9 repos. Then I kept only those 3 things.
WHAT I TYPEDjq -c '{name: .full_name, stars: .stargazers_count, lang: .language}'
BEFOREthe full replies17,848tokens
AFTERthe 3 things174tokens
IN THIS TEST. TIKTOKEN CL100K_BASE ESTIMATE, NOT THE GROK BOT METER.
16 / JQ · THE RESULT
010203040506070809
99.0% fewer tokens. Same 3 things.
IN THIS TESTSAME JOB, BEFORE AND AFTER
BEFORE9 full replies
17,848 tokens
AFTER3 things each
174 tokens
99.0%
fewer tokens174 TOKENS INSTEAD OF 17,848
102.6xLESS
WHAT THIS MEANSI would send 3 things, not the whole reply.
IN THIS TEST. TIKTOKEN CL100K_BASE ESTIMATE, NOT THE GROK BOT METER. SOURCE: api.github.com, 9 repos
17 / JQ · HOW YOU CAN USE THIS
010203040506070809
How you can use this.
DAILY LIFE
A store site sends a long list: keep only the prices, then send those to Grok Bot
A contact file has extra junk: keep only names and emails, then send those
A website reply is huge: keep only the bits you asked for, then send those
IN YOUR BUSINESS
An order list has extra details: keep only the totals, then send those
A product list is huge: keep only the name and price of each item, then send those
A contact list you downloaded has extra details: drop them before you send it
18 / REPO 3 OF 9
03
REPO 3 OF 9 · RIPGREP · WHAT IT DOES
Find the lines, skip the rest.
WHAT IT IS
A free, very fast search tool for your files.
WHAT IT DOES
This tool searches your files and gives you only the lines that match.
98.8%FEWER TOKENS IN THIS TEST
github.com/BurntSushi/ripgrep
19 / RIPGREP · HOW IT WORKS
010203040506070809
How ripgrep works.
1STEP 1Keep the files on your computer.
2STEP 2Search for the word you need.
3STEP 3Send only the matching lines to Grok Bot.
WHAT I TYPEDrg -n DOWNLOAD_TIMEOUT
20 / RIPGREP · THE TEST
010203040506070809
How I used it.
You can type into this tool yourself, or you can ask Grok Bot. Grok Bot then runs the tool for you.
THE GOAL
Send only the lines that say DOWNLOAD_TIMEOUT, not 7 whole files.
WHAT I DID
I kept 7 code files on my computer and searched them for that word.
WHAT I TYPEDrg -n DOWNLOAD_TIMEOUT
BEFORE7 whole files30,336tokens
AFTER16 matching lines374tokens
IN THIS TEST. TIKTOKEN CL100K_BASE ESTIMATE, NOT THE GROK BOT METER.
21 / RIPGREP · THE RESULT
010203040506070809
98.8% fewer tokens. Same answer.
IN THIS TESTSAME JOB, BEFORE AND AFTER
BEFORE7 whole files
30,336 tokens
AFTER16 matching lines
374 tokens
98.8%
fewer tokens374 TOKENS INSTEAD OF 30,336
81.1xLESS
WHAT THIS MEANSI would send 16 lines, not 7 whole files.
IN THIS TEST. TIKTOKEN CL100K_BASE ESTIMATE, NOT THE GROK BOT METER. SOURCE: adbar/trafilatura code, 7 files
22 / RIPGREP · HOW YOU CAN USE THIS
010203040506070809
How you can use this.
DAILY LIFE
Search your files for a password, then send only those lines to Grok Bot
Search your files for a customer's name, then send only those lines
Search your notes for one word, then send those lines, not the whole folder
IN YOUR BUSINESS
Search your work files for a client name, then send only those lines
Search a big pile of code for one setting, then send only that line
Search a long error list for one error, then send only those lines, not the whole list
23 / REPO 4 OF 9
04
REPO 4 OF 9 · DUCKDB · WHAT IT DOES
Ask the spreadsheet, don't paste it.
WHAT IT IS
A free tool that answers questions about a big spreadsheet on your computer.
WHAT IT DOES
This tool answers a question about a big spreadsheet so you do not have to paste the whole file.
99.99%FEWER TOKENS IN THIS TEST
github.com/duckdb/duckdb
24 / DUCKDB · HOW IT WORKS
010203040506070809
How DuckDB works.
1STEP 1Keep the spreadsheet on your computer.
2STEP 2Ask DuckDB one question.
3STEP 3Send the question and the short answer to Grok Bot, not the spreadsheet.
WHAT I TYPEDduckdb.sql(open("query.sql").read())
25 / DUCKDB · THE TEST
010203040506070809
How I used it.
You can type into this tool yourself, or you can ask Grok Bot. Grok Bot then runs the tool for you.
THE GOAL
Find which countries have the most big airports, without pasting the whole list.
WHAT I DID
I left a public list of 86,343 airports on my computer and asked that one question. I saved the question in a file called query.sql.
WHAT I TYPEDduckdb.sql(open("query.sql").read())
BEFOREthe whole airport list3,841,232tokens
AFTERquestion + answer89tokens · 43 + 46 = 89
IN THIS TEST. TIKTOKEN CL100K_BASE ESTIMATE, NOT THE GROK BOT METER.
WHAT THIS MEANSI would send one question and a short answer, not the whole spreadsheet.
IN THIS TEST. TIKTOKEN CL100K_BASE ESTIMATE, NOT THE GROK BOT METER. SOURCE: datasets/airport-codes, 86,343 rows
27 / DUCKDB · HOW YOU CAN USE THIS
010203040506070809
How you can use this.
DAILY LIFE
Ask which products sold the most, then send that short answer, not the whole sales file
Ask how many customers live in each city, then send that short list
Ask for the top 10 rows in a huge spreadsheet, then send those 10 rows
IN YOUR BUSINESS
Ask for the total from a sales spreadsheet, then send that number, not the whole file
Ask which store sold the most, then send that answer
Ask for one monthly number from a huge spreadsheet, then send that number
28 / REPO 5 OF 9
05
REPO 5 OF 9 · DOCLING · WHAT IT DOES
Turn a PDF into cleaner text.
WHAT IT IS
A free tool that reads PDFs and other documents.
WHAT IT DOES
This tool turns a PDF into cleaner text that is easier to send and read.
38.2%FEWER TOKENS IN THIS TEST
github.com/docling-project/docling
29 / DOCLING · HOW IT WORKS
010203040506070809
How Docling works.
1STEP 1Save the PDF.
2STEP 2Run Docling on your computer.
3STEP 3Send the cleaner text to Grok Bot, not a messy copy of the PDF.
WHAT I TYPEDdocling convert docling_report.pdf --to md
30 / DOCLING · THE TEST
010203040506070809
How I used it.
You can type into this tool yourself, or you can ask Grok Bot. Grok Bot then runs the tool for you.
THE GOAL
Get clean text from a 9-page PDF, with headings and tables kept.
WHAT I DID
I ran this tool on a public 9-page research PDF, saved as docling_report.pdf.
WHAT I TYPEDdocling convert docling_report.pdf --to md
BEFOREa messy PDF copy12,792tokens
AFTERthe clean text7,900tokens
IN THIS TEST. TIKTOKEN CL100K_BASE ESTIMATE, NOT THE GROK BOT METER.
31 / DOCLING · THE RESULT
010203040506070809
38.2% fewer tokens. Tables kept.
IN THIS TESTSAME JOB, BEFORE AND AFTER
BEFOREmessy PDF copy
12,792 tokens
AFTERthe clean text
7,900 tokens
38.2%
fewer tokens7,900 TOKENS INSTEAD OF 12,792
1.6xLESS
WHAT THIS MEANSI would send a cleaner, shorter paper. Words in pictures are left out.
IN THIS TEST. TIKTOKEN CL100K_BASE ESTIMATE, NOT THE GROK BOT METER. SOURCE: arXiv 2408.09869, docling_report.pdf, 9 pages
32 / DOCLING · HOW YOU CAN USE THIS
010203040506070809
How you can use this.
DAILY LIFE
Turn a PDF bill into text, then send that text to Grok Bot
Turn a PDF paper into cleaner text, then send that
Pull the tables out of a PDF report, then send those tables
IN YOUR BUSINESS
Turn a client's PDF into text before you ask a question about it
Turn a contract PDF into cleaner text, then send that
Pull tables out of a report PDF, then send those tables
33 / REPO 6 OF 9
06
REPO 6 OF 9 · CHANGEDETECTION.IO · WHAT IT DOES
Send only what changed.
WHAT IT IS
A free tool that watches web pages for changes.
WHAT IT DOES
This tool watches a webpage and sends you only what changed.
43.3%FEWER TOKENS IN THIS TEST
github.com/dgtlmoon/changedetection.io
34 / CHANGEDETECTION.IO · HOW IT WORKS
010203040506070809
How changedetection.io works.
1STEP 1Point it at a page.
2STEP 2When the page changes, it writes down the difference.
3STEP 3Send only that difference to Grok Bot, not the whole page again.
IN THE APPAdd the page to my watch list, then read the change
35 / CHANGEDETECTION.IO · THE TEST
010203040506070809
How I used it.
You can type into this tool yourself, or you can ask Grok Bot. Grok Bot then runs the tool for you.
THE GOAL
Send only what changed, not the whole new page again.
WHAT I DID
I compared two real versions of the Costco Wikipedia page.
IN THE APPAdd the page to my watch list, then read the change
BEFOREthe whole new page35,425tokens
AFTERonly the changes20,070tokens
IN THIS TEST. TIKTOKEN CL100K_BASE ESTIMATE, NOT THE GROK BOT METER.
36 / CHANGEDETECTION.IO · THE RESULT
010203040506070809
43.3% fewer tokens. Only the change.
IN THIS TESTSAME JOB, BEFORE AND AFTER
BEFOREthe whole new page
35,425 tokens
AFTERonly the changes
20,070 tokens
43.3%
fewer tokens20,070 TOKENS INSTEAD OF 35,425
1.8xLESS
WHAT THIS MEANSI would send only what changed, not the whole page again.
IN THIS TEST. TIKTOKEN CL100K_BASE ESTIMATE, NOT THE GROK BOT METER. SOURCE: Costco on Wikipedia, 2 real edits
37 / CHANGEDETECTION.IO · HOW YOU CAN USE THIS
010203040506070809
How you can use this.
DAILY LIFE
Watch a product page: when the price changes, send only that change to Grok Bot
Watch a Wikipedia page: when it is edited, send only the edit
Watch a jobs page: when a new job appears, send only that new job
IN YOUR BUSINESS
Watch another company's price page: send only the price change
Watch a supplier page: send only the stock change
Watch a hiring page: send only the new job posting
38 / REPO 7 OF 9
07
REPO 7 OF 9 · RTK · WHAT IT DOES
Shrink long output before you send it.
WHAT IT IS
A free tool that shortens what your computer prints out.
WHAT IT DOES
This tool shortens long command output so you send less text.
56.6%FEWER TOKENS IN THIS TEST
github.com/rtk-ai/rtk
39 / RTK · HOW IT WORKS
010203040506070809
How RTK works.
1STEP 1Run your command through RTK.
2STEP 2It keeps the key lines and drops extra noise.
3STEP 3Send the short output to Grok Bot.
WHAT I TYPEDrtk git log -n 30
40 / RTK · THE TEST
010203040506070809
How I used it.
You can type into this tool yourself, or you can ask Grok Bot. Grok Bot then runs the tool for you.
THE GOAL
Send a shorter version of the same 30 updates.
WHAT I DID
I ran this tool on the list of the last 30 updates from the jq project. That list is called the git log.
WHAT I TYPEDrtk git log -n 30
BEFOREthe full list5,529tokens
AFTERthe short list2,399tokens
IN THIS TEST. TIKTOKEN CL100K_BASE ESTIMATE, NOT THE GROK BOT METER.
41 / RTK · THE RESULT
010203040506070809
56.6% fewer tokens. Same 30 updates.
IN THIS TESTSAME JOB, BEFORE AND AFTER
BEFOREthe full list of updates
5,529 tokens
AFTERthe short list
2,399 tokens
56.6%
fewer tokens2,399 TOKENS INSTEAD OF 5,529
2.3xLESS
WHAT THIS MEANSI would send the same 30 updates with a lot less text.
IN THIS TEST. TIKTOKEN CL100K_BASE ESTIMATE, NOT THE GROK BOT METER. SOURCE: jqlang/jq, last 30 commits
42 / RTK · HOW YOU CAN USE THIS
010203040506070809
How you can use this.
DAILY LIFE
Your computer prints a long result: send the short version to Grok Bot
You have a long list of updates: send only the useful lines
A command prints extra words: cut those extra words before you send it
IN YOUR BUSINESS
Putting your website live prints a huge report: send the short version
Your code tests print a long result: send the short version
Your website keeps a huge list of what happened: send only the key lines
43 / REPO 8 OF 9
08
REPO 8 OF 9 · TENACITY · WHAT IT DOES
Retry one call, not the whole chat.
WHAT IT IS
A free extra for your code that tries a failed call again.
WHAT IT DOES
This tool retries one failed call in code, so you do not have to ask the bot to start over.
RETRIES IN CODENO TOKEN PERCENT
github.com/jd/tenacity
44 / TENACITY · HOW IT WORKS
010203040506070809
How Tenacity works.
1STEP 1Add Tenacity to the call that keeps failing.
2STEP 2If it fails, it waits and tries that same call again.
3STEP 3The bot is not asked to redo the whole job.
WHAT I TYPED@retry(stop=stop_after_attempt(5), wait=wait_fixed(1))
45 / TENACITY · THE TEST
010203040506070809
How I used it.
You can type into this tool yourself, or you can ask Grok Bot. Grok Bot then runs the tool for you.
THE GOAL
If one call fails, retry that same call. Do not ask the bot to start the whole job over.
WHAT I DID
I made a test call that failed two times on purpose, then worked. This tool tried 3 times in 2.2 seconds.
WHAT I TYPED@retry(stop=stop_after_attempt(5), wait=wait_fixed(1))
TRY 1the test callFAIL
TRY 2the same call againFAIL
TRY 3the same call againOK
IN THIS TEST. NO TOKEN PERCENT. THIS TOOL DOES NOT SHRINK TEXT.
46 / TENACITY · THE RESULT
010203040506070809
Fixed in code. Bot not asked again.
TRY 1FAILserver busy
TRY 2FAILwait 1 second, try again
TRY 3OKgot the answer
3 TRIES IN 2.2 SECONDSNO TOKEN PERCENT THIS DOES NOT SHRINK TEXT
WHAT THIS MEANSThe one call was tried again. The bot was not asked to start the job over.
IN THIS TEST. NO TOKEN NUMBER CLAIMED. SOURCE: my own test call that fails on purpose
47 / TENACITY · HOW YOU CAN USE THIS
010203040506070809
How you can use this.
DAILY LIFE
If a website is busy, this tool tries again by itself
If a download fails, it tries 3 times without asking you
If a call takes too long and stops, it tries again so you do not start over
IN YOUR BUSINESS
If a website you need fails, it tries that one call again
If a report download fails, it tries again
If one call fails, you do not have to restart the whole bot job
48 / REPO 9 OF 9
09
REPO 9 OF 9 · PYDANTIC · WHAT IT DOES
Check the shape before the next try.
WHAT IT IS
A free extra for your code that checks an answer has the right pieces.
WHAT IT DOES
This tool checks that an answer has the right shape before you use it.
CHECKS THE SHAPENO TOKEN PERCENT
github.com/pydantic/pydantic
49 / PYDANTIC · HOW IT WORKS
010203040506070809
How Pydantic works.
1STEP 1Say what the answer should look like.
2STEP 2Pydantic checks it on your computer.
3STEP 3If something is wrong, you fix only those bits, not the whole job.
WHAT I TYPEDRepo.model_validate_json(reply)
50 / PYDANTIC · THE TEST
010203040506070809
How I used it.
You can type into this tool yourself, or you can ask Grok Bot. Grok Bot then runs the tool for you.
THE GOAL
Catch a badly shaped answer on my computer before I use it.
WHAT I DID
I checked a sample reply. The star count was written as 70.2k and the web link was missing. This tool caught 2 problems. A fixed reply passed.
WHAT I TYPEDRepo.model_validate_json(reply)
BADthe sample reply2 PROBLEMS
FIXEDthe fixed replyPASS
IN THIS TEST. NO TOKEN PERCENT. THIS TOOL DOES NOT SHRINK TEXT.
51 / PYDANTIC · THE RESULT
010203040506070809
Caught on my computer. Before I used it.
THE BAD REPLY2 PROBLEMSthe stars said "70.2k", the web link was missing
THE FIXED REPLYPASSthe stars are a number, the link is there
NO TOKEN PERCENTTHIS DOES NOT SHRINK TEXT
WHAT THIS MEANSI would fix only the 2 bad bits, not redo the whole job.
IN THIS TEST. NO TOKEN NUMBER CLAIMED. SOURCE: a sample bad reply + a fixed one
52 / PYDANTIC · HOW YOU CAN USE THIS
010203040506070809
How you can use this.
DAILY LIFE
If a price is written as 70.2k instead of a number, it catches that
If a web link is missing, it catches that before you use the answer
If a contact is missing a name or email, it catches that before you save it
IN YOUR BUSINESS
If an order is missing a price or a name, it catches that
If a lead is missing an email, it catches that before you save it
If data is in the wrong shape, it catches that before it goes into a sheet
53 / THE RECAP
Nine tools, one habit.
01 · TRAFILATURAStrip the page, keep the words
93.3% LESS
02 · JQPick the fields you asked for
99.0% LESS
03 · RIPGREPFind the lines, skip the rest
98.8% LESS
04 · DUCKDBAsk the spreadsheet, don't paste it
99.99% LESS
05 · DOCLINGTurn a PDF into cleaner text
38.2% LESS
06 · CHANGEDETECTION.IOSend only what changed
43.3% LESS
07 · RTKShrink long output before you send it
56.6% LESS
08 · TENACITYRetry one call, not the whole chat
RETRY IN CODE
09 · PYDANTICCheck the shape before the next try
CHECKS FIRST
PERCENTS ARE FEWER TOKENS SENT IN THIS TEST ONLY. TIKTOKEN CL100K_BASE ESTIMATE.
54 / THE PROMPT
PASTE THIS INTO GROK BOT · SAVE IT AS A SKILL
Save this as a skill called "Lean Input". Use it before you read anything big.THE GOAL
Do the same job, but send less text into this chat. Never read a raw dump when a free tool can cut it down first.SET UP (once)
pip install trafilatura duckdb docling changedetection.io tenacity pydantic
Install jq, ripgrep and RTK from their official releases.
If a tool is missing, install it first, then carry on.THE 9 RULES
1. A web page link: get clean text with trafilatura, not the raw HTML.
trafilatura-u"URL"--output-formattxt2. JSON or an API reply: pull only the fields the job needs with jq.
curl-s"URL"|jq'{name,price}'3. A folder of files: search first with ripgrep, then read only the lines that match.
rg-n"word"folder/4. A CSV or spreadsheet: load it in DuckDB and ask one SQL question. Read only the result.
SELECTcol,count(*)FROM'file.csv'GROUPBYcol5. A PDF or Word file: turn it into markdown with Docling first.
doclingconvertfile.pdf--tomd6. A page I want watched: track it with changedetection.io. Read only the change, never the whole page again.7. Long command output (git, tests, logs): run it through RTK so the output is short.
rtkgitlog-n308. A flaky API: retry the call in code with Tenacity. Do not redo the whole job in chat.9. A structured answer: check it with a Pydantic model in code. If it fails, fix only the fields that failed.HOW TO REPORT
- Each time you cut something, tell me the size before and after, in characters.
- If a tool might drop something the job needs, say so and use the full text for that part.
- Never make up numbers.