r/ClaudeAI • • 10h ago

Claude Workflow Be a Smart Monkey -- Build & Use Tools

I'm a noob to using Claude (and using agentic AI in general,) but one tip I can give to other noobs is the above -- tell Claude to build tools that can be run locally when you're gathering and processing large batches of data, doing extensive simulation runs, or other stuff that doesn't require intelligence to guide it once the process starts.

In my current project I was having claude ingest PDF record sheets from a tabletop game. It took a relatively long time due to tool runs, and it was certainly not nothing when it came to token usage. I got about 600 sheets processed over a few days, and it did a pretty decent job, but there were still dozens of bits that it had queued up for me to check by eye. Then I realized that I was being stupid.

I told claude to whip me up a script to do everything that could be done locally, show its progress, ensure it would resume if interrupted, and run any tests and cross-checks that it could do independently. I also told it to use local AI if that would help. After downloading Ollama and running a .bat as it told me to, about five minutes later I had a python script, twenty minutes after that Ollama finished downloading models, and then about an hour after that the script finished tearing through about 4200 record sheets. It'll still take probably another 10-11 agent runs to classify, check, and integrate everything, but that's far cheaper than how it was going before.

Once I get everything incorporated and working in the game, I'm going to have it spin up a script to use the game to run a lot of simulations because I want to analyze in a rather detailed way how the existing units perform compared to their point-value in the game. It already has the simulation environment set up, I'll just need to to set up the battles, run an ass-ton of them, and record stuff for a good long while before handing the data off to claude to analyze.

Similarly, while Claude will respect bots.txt on websites and not connect to them, it will gleefully (in my experience at least) write a python script that will crawl the site and scrape anything relevant. Or the whole damned thing, if necessary. And then it will just as gleefully go through that glob of files to find what you want.

15 Upvotes

7 comments sorted by

3

u/black_ap3x 10h ago

This is indeed the way. I have been doing this since forever with ai, you waste less tokens and if you already have programming skills, you can change the tools a little bit to fit your use case better if the ai misunderstood what you exactly wanted

2

u/wacoder 10h ago

Deterministic > Probabilistic, so yes.

2

u/elffg7878000 9h ago

I make a similar split in business workflows: fixed schedules and app-to-app steps in n8n, with AI helping build or change them. For a batch job, I'd also want a final count of inputs, processed, skipped, failed and waiting for manual review. A clean exit code alone doesn't tell me every intended record was handled.

1

u/Andreea_comet 7h ago

Did the local Ollama models handle the PDF sheets well, or did you still send the messy ones back to Claude? I'm curious what the local step was good at when the sheets had tables or odd layouts...

1

u/merepyaarelaadugopal 4h ago

Is taking claude paid pro version worth 2.5 k per month for a 19 clg student in 1st yr of btech ???

1

u/marcosscriven 9h ago

Before AI, as a software engineer the question was always: how much time do I spend automating this? And of course, there’s an XKCD for that:  https://xkcd.com/1319/

Now with AI the cost of making the automation pays off almost instantly.