Umais Siddiqui's blog← All posts

Let a script fetch the files, let the skill judge them

When an agent step is slow bulk fetching, move it into a one-time script and keep the skills for judgment, documentation, and assignment.

Hari works on the Site Reliability team at NRG, and he had a clean goal: find every web application that uses a restricted font. He had already built a skill for the job. Then he hit the slow part, getting the code to scan.

This post is for engineers who build agent skills and pipelines. You'll see how a one-time script took over the bulk fetching so the skills could keep the judgment work, and you'll get one question to ask about your own slowest step.

The job: find restricted fonts across every web app

Some fonts are restricted inside NRG. Each one found has to be flagged, written up in a document, and published. The team that owns the code then gets a task to change the font.

Hari created a skill for the scanning and came to me with a practical question. How should he get the repositories in front of it? Azure DevOps (ADO) has an MCP server, and that was his first route.

It worked, but it took a lot of time. That was the signal I looked at, because the scan itself was not the hard part.

The MCP route was too slow for a full sweep

Hari found the MCP route slow, and that is all we know for certain. My hypothesis, which we did not measure, is that an MCP server suits looking up a few things. Reading every font-related file in every repository becomes a long run of near-identical calls, each one passing through the agent.

Anthropic's argument about code versus token generation is an analogy here, not proof of that diagnosis. They note that "sorting a list via token generation is far more expensive than simply running a sorting algorithm." They also say that "because code is deterministic, this workflow is consistent and repeatable." You can read both in their post on Agent Skills.

The idea carries over. Fetching files needs no judgment, so a script is a better fit than model time.

The fix: a one-time script that builds the file list

I suggested a one-time script. It uses the ADO API and a personal access token (PAT) to collect every font-related file reference: .css, .html, .htm and similar files. It decides nothing about fonts. It only narrows the world to the files worth reading.

Hari then passes that list to the checker skill. The checker scans just those files, finds the culprits, and produces output for the next skill. That is the division I like: the script gathers, and the skill judges.

A script's output is also a plain file, so you can inspect the list before any skill reads it. If the list looks too short or too long, you fix the script once and rerun it.

The downstream skills keep the judgment work

The rest of the flow is a chain of skills:

  1. The checker scans the listed files and finds the restricted fonts.
  2. The document creator turns the checker's output into the document.
  3. The assignment step takes that document and creates a new ADO work item.
  4. The work item gets the document attached and is assigned to the team lead, who triages it and works it with the team.

Every step after the file list involves reading, writing, or deciding. That is the work worth giving to a skill.

Where this approach has limits

I don't have results to share yet, including timing numbers. "A lot of time" is how Hari described the MCP route, and I'm not claiming a measured speedup.

A one-time script also goes stale. New repositories and new restricted fonts mean running it again. In my view, a narrow extension list could miss fonts declared in places the script doesn't look, so the list is worth reviewing. That is my inference, not something we hit.

A PAT is a credential. My recommendation is a read-only scope, kept out of the repository and out of the skill. And if you only need to inspect a handful of files, the MCP is simpler and the script is not worth writing.

One thing to try this week

Take the slowest step in one of your agent workflows. Ask whether the time goes to deciding or to fetching.

If it is fetching, write a script that outputs a plain list, and hand that list to the skill. The skill then spends its effort on the part that needs judgment.

Let scripts gather and skills decide

Hari's design gives each part the work it is good at. The script fetched files, and the skills judged, documented, and assigned. If your agent is slow, check whether it is doing a script's job.

If you try this, I'd like to hear which step you moved out of the agent. Send me what you changed and what got faster.