NatashaTheRobot

NatashaTheRobot

AskAppleDocs: Give your Agent Access to the latest Apple SDK APIs Automatically

No more wasted tokens on outdated code!

NatashaTheRobot's avatar
NatashaTheRobot
Oct 15, 2026
∙ Paid

The problem is simple. LLMs are trained on last year’s data, and as soon as they’re released, the data is stale. This is especially true for Apple’s SDKs, which shift from under us yearly at WWDC while the LLMs continue to be far behind. To account for this, LLMs might search the web to find the new information. But not always…

The problem is that LLMs think they know the up-to-date SDKs, so by default, they will write the code and just make it work with what they have. As a result, concurrency features are not properly configured (it still commonly uses the old Dispatch methods and Combine), and it has no idea about Liquid Glass (so it defaults to the old button styles), and forget about the iPhone Duo.

As a result, the will waste tokens writing the “old” code only for us to check, prompt it to research “Liquid Glass,” which wastes more tokens and adds unnecessary context bloat to the session, then takes the extra time to rewrite the code, wasting more tokens on fixing issues that that created, etc. And this is if we even notice every single issue that they get wrong (old testing methods, etc).

Of course, there are certain skills you can use to audit the code after it’s written to correct it, but again, the agent already wasted tokens writing the old code to begin with, so this just wastes more time and money!

The solution to this is simple! I create an /askappledocs skill that uses my own AskAppleDocs CLI tool to pull up only the relevant docs into context BEFORE the agent writes any code, specifically focusing on new docs that even Xcode’s own document search doesn’t work for! Here is what it looks like when I ask about adapting my app for iPhone Duo:

There are many people online who will post about ways to reduce tokens for your agent use. But to me, the solution is simple. Sure, try those. But the best way to save tokens IMHO is to build CLI tools for your agent to use. The tools you write are deterministic with clear inputs and outputs, and they run via external code which doesn’t count against the agent’s token budget. It’s a no-brainer! And with the agent working with you to write the tool, it’s super easy to do!

Anyway, for this blog post, I’ll share how I build the AskAppleDocs tool. I don’t want to get in trouble w/ 🍎, so this will be for paid subscribers only, who will also get the tool source code automatically. If you don’t want to subscribe, but still want to check out and modify the tool for your own use, you can get it here. You can also get it with AskHIG and AskDuoDocs in my /ask bundle.

This post is for paid subscribers

Already a paid subscriber? Sign in
© 2026 NatashaTheRobot, Inc · Privacy ∙ Terms ∙ Collection notice
Start your SubstackGet the app
Substack is the home for writing, podcasting, and media founders.