Topics ▾
Skills ·

Steps that must never vary: skill first, then a script

Advanced, 30 minutes

When part of a job must come out exactly the same every time, the Grok Bot team's advice is to write it as a skill first, and only if it still drifts, turn that one step into code the Bot runs through an MCP server or on its computer.

Published

How this helps you

The parts of a job that must be exact stop drifting between runs, and the Bot keeps its judgment for the parts that need it.

✦ Try it
Look at your [skill name] skill. List each step and mark the ones that must give exactly the same result every time (fixed formats, calculations, file names, the order of API calls). For those steps only, write a small script on your computer that does the step, test it on [sample input], and show me the output next to [expected output]. Then update the skill to run the script instead of doing that step by hand. If the script fails, stop and tell me; don't fall back to doing it by hand. Show me the updated skill before you save it.

Fill in: [skill name]: the skill to tighten. [sample input] and [expected output]: one real example and the exact result you want. The prompt is ours, built from the workshop advice.

What they did

In the official Team Bots workshop, someone asked whether part of a Team Bot can be fixed and predictable while it uses its own judgment elsewhere. Akshat Agrawal, who works on the product at SpaceXSI, said the skills standard was designed for agents to follow fairly strictly, and the team is confident in how well Grok Bot follows instructions, so encoding the steps in a skill often works. For work that really is a fixed step-by-step routine, he said many people build a custom MCP server that calls an API or runs code to do it. That part is then not agentic, costs nothing to run, and happens the same way every time, and the Bot simply calls it. Code the Bot can run on its own computer is the other option. His recommendation: start with a skill and make it good; if there are still gaps, turn that specific action into code the Bot can run.

Who it's for: People whose Bot does reports, invoices, file handling or data entry where one wrong format or number matters.

Before you start

How to try it

  1. Write the workflow as a skill first: ask the Bot to save the exact steps.
  2. Run it on the same sample input a few times and note where the results differ.
  3. For the step that drifts, such as a calculation, a file name or a fixed series of API calls, paste the prompt below so the Bot turns it into a script on its computer.
  4. If the step has to call another system for the whole team, have a developer wrap it in a small custom MCP server and connect it to the Bot.
  5. Check that the updated skill calls the script or tool, and that it stops and tells you when the script fails.

What to expect

Illustrative: an invoice skill gives totals rounded two different ways across three runs. The Bot writes a short script for the total, the skill now calls it, and three new runs give the same number.

Common mistakes

Related tips

Worth knowingIf the code has to reach a tool on your private network, Grok Bot can now join a Tailscale tailnet to reach private MCP servers (see the related tip). The claim that a coded step costs nothing refers to the code itself; the Bot still uses usage around it.
Next in Skills →Make a Bot the expert on a tricky tool before it starts

Learn more: Grok Bot Skills: How to Create, Use and Audit Them · All Grok Bot skills tips

Related Grok Bot tips

More Skills →
Skills

Audit unused skills and routines so Bots pick the right ones

A read-only prompt that lists every routine and skill, flags what hasn't run in 30 days or overlaps, and recommends what to archive, because stale skills can steer a Bot to the wrong instructions.

How this helps you Fewer stale and overlapping skills means your Bots are less likely to grab the wrong instructions, and you stop paying usage for routines nobody reads.
Spotted by @Michael_Fenech_ · 24 Nov 2026
Read more
Skills

Hire a Bot with Dr. Eggbot, train it from a YouTube video

In SpaceXSI's student workshop, field engineer Ria Goveas onboards an email triage Bot like a new teammate: a job brief from Dr. Eggbot, a skill learned from a YouTube video, her writing style, and a deadlines feed from a second Bot.

How this helps you Your new Bot starts with a proper job brief, a skill from a teacher you trust and your own writing style, so its first drafts are useful instead of generic.
Spotted by Ria Goveas, SpaceXSI (YouTube) · 20 Nov 2026
Read more
Skills

Turn a mentor's feedback into an advisor skill

Louise de Sadeleer feeds her mentor's script feedback into a skill, then runs it on each new draft to hear what her mentor would probably say. She uses the same idea for idea, hook and script advisors.

How this helps you You get your mentor's likely notes on every draft before they see it, so each real review can go deeper instead of repeating old points.
Spotted by Greg Isenberg (YouTube) · 18 Nov 2026
Read more