automate

automate is a command for coding agents from xiaolai/mac-it-guy-pro. It costs 20 tokens per session (916 once invoked), scanned A, original, MIT.

A command for turning a repeated computer chore into a reusable tool. It first defines the files, action, frequency, and test for success.

In plain words
What is it for?
Automating tasks such as renaming scans or converting HEIC photos before emailing them on a Mac.
Why use it?
It avoids repeating manual steps and makes the desired result clear before anything is built.

Command

Installs and runs on its own, but its text points at files inside its plugin — anything it tells you to read at a ${CLAUDE_PLUGIN_ROOT} path is only there once the plugin is installed. Installing the plugin gets both.

Part of the mac-it-guy-pro plugin — 8 skills, 12 commands, 4 agents, 2 hooks shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/xiaolai/mac-it-guy-pro/automate
Clone the repo
git clone --depth 1 https://github.com/xiaolai/mac-it-guy-pro

Or install mac-it-guy-pro, the plugin that ships this one along with the rest of its 8 skills, 12 commands, 4 agents, 2 hooks.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for automate

README.md
[![agentmods](https://agentmods.dev/badge/commands/xiaolai/mac-it-guy-pro/automate.svg)](https://agentmods.dev/commands/xiaolai/mac-it-guy-pro/automate)
Your own site
<a href="https://agentmods.dev/commands/xiaolai/mac-it-guy-pro/automate"><img src="https://agentmods.dev/badge/commands/xiaolai/mac-it-guy-pro/automate.svg" alt="Measured on agentmods" height="20"></a>
Per session 20 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 916 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00020 $0.00916
Opus 5 $0.00010 $0.00458
Sonnet 5 $0.00004 $0.00183
Haiku 4.5 $0.00002 $0.00092

Measured 4d ago against content hash 9c85f2f67759, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

automate scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

commands/automate.md · 53 lines

How it starts

The opening of the file, as written. The whole thing — 53 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Automate — turn a chore into a tool you keep

Read ${CLAUDE_PLUGIN_ROOT}/skills/it-core/SKILL.md and ${CLAUDE_PLUGIN_ROOT}/skills/toolbox-contract/SKILL.md first — the safety contract and the toolbox contract are binding. Read ~/ITGuy/machine.md if it exists. If uname is not Darwin, say this version supports Mac only and stop. If ~/ITGuy/ does not exist, create it (with toolbox/, undo/, reports/) — automate may be a user's first command.

Step 1: Clarify the chore into a spec

$ARGUMENTS is the chore in the user's words ("every week I rename my scans", "I always convert HEIC photos before emailing them"). If $ARGUMENTS is empty, ask first: "What's the chore? Describe it the way you'd describe it to a friend." — then continue. Turn the description into a spec — at most one AskUserQuestion round for whatever is genuinely ambiguous:

  • Input: which folder/files, identified how
  • Action: what happens to them, including the exact naming/format rule
  • Frequency: how often the chore recurs
  • Success criteria: one testable sentence — "afterwards, every scan in X is named YYYY-MM-DD-"

Step 2: Apply the acceptance test

The toolbox contract's three criteria: real problem, repeat use, evolvable. A one-off task fails the test — do it directly instead (with the same safety rules), tell the user why no tool was built, log the visit, done.

Step 3: Check the toolbox, then the catalogue

Read ~/ITGuy/toolbox.json. An existing tool covers the chore → show its README and how to run it, bump nothing, done. A near-miss exists → offer evolving it instead of duplicating.

Then check ${CLAUDE_PLUGIN_ROOT}/skills/toolbox-contract/references/pattern-catalogue.md: if the described chore matches a catalogue pattern, build that recipe rather than improvising one. The catalogue entries carry gotchas learned the expensive way — keeping originals when converting HEIC, labelling a fallback date as a fallback, confirming duplicates by checksum before trusting a filename. Improvising past them reinvents the bugs.

Read the full file on GitHub · 53 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 4d ago First seen · 53 lines · 20 tokens per session scan A 9c85f2f67759

Subscribe to this mod's changes

automate is a command published in the GitHub repository xiaolai/mac-it-guy-pro (5 stars, last pushed 1mo ago), licensed MIT. It adds 20 tokens to every session and 916 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.