Using AI to repeatedly perform file operations is wasteful and unreliable. A better workflow is to use AI once to generate a deterministic, reusable script (Bash, PowerShell, or Python), then run that script as many times as needed without additional AI requests. This saves AI credits, produces reviewable and auditable code, and integrates into team workflows via source control and CI. Key practices include adding dry-run modes, excluding generated folders, printing summaries, and ensuring idempotency. The post also introduces a 'model ladder' concept where deterministic scripts sit at the base, reserving expensive frontier models for judgment-heavy tasks like architecture and debugging.

Table of contents
Stop Using The Model As An Expensive File ScannerThe Better Prompt PatternExample: Use AI To Generate A Repeatable PowerShell ScriptWhy This Saves More Than MoneyUse AI For Judgment, Not Button ClickingBash, PowerShell, Python: Pick The Right HammerA Reusable Prompt For Generating ToolsAdd Scripts To Your AI Model LadderDeterministic Does Not Automatically Mean SafeCommon Mistakes To AvoidWhere This Pattern Works WellWhat This Means For Developer TeamsFinal Thoughts2 Impressions