automate-boring-stuff

automate-boring-stuff is a skill for Claude Code, Codex from DamiMartinez/book-skills. It costs 194 tokens per session (1,291 once invoked), scanned A, original, MIT.

A Python-focused guide for turning repetitive, rule-based computer tasks into scripts. It covers practical work with text, files, spreadsheets, PDFs, documents, web pages, schedules, messages, and desktop interfaces.

In plain words
What is it for?
Use it to automate tasks such as renaming files, processing CSV or Excel data, extracting text with patterns, scraping websites, generating documents, or sending scheduled messages.
Why use it?
It helps decide whether automation is worthwhile and choose a suitable approach without creating fragile or unsafe scripts.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to automate tasks such as renaming files, processing CSV or Excel data, extracting text with patterns, scraping websites, generating documents, or sending scheduled messages.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/damimartinez/book-skills/automate-boring-stuff
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.

Any agent
npx skills add DamiMartinez/book-skills --skill automate-boring-stuff
Clone the repo
git clone --depth 1 https://github.com/DamiMartinez/book-skills

Made for: Claude Code, Codex.

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-boring-stuff

README.md
[![agentmods](https://agentmods.dev/badge/skills/damimartinez/book-skills/automate-boring-stuff/github.svg)](https://agentmods.dev/skills/damimartinez/book-skills/automate-boring-stuff)
Your own site
<a href="https://agentmods.dev/skills/damimartinez/book-skills/automate-boring-stuff"><img src="https://agentmods.dev/badge/skills/damimartinez/book-skills/automate-boring-stuff/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for automate-boring-stuff

Your own site · 80×15
<a href="https://agentmods.dev/skills/damimartinez/book-skills/automate-boring-stuff"><img src="https://agentmods.dev/badge/skills/damimartinez/book-skills/automate-boring-stuff.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 194 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,291 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00194 $0.01291
Opus 5 $0.00097 $0.00646
Sonnet 5 $0.00039 $0.00258
Haiku 4.5 $0.00019 $0.00129

Measured 11d ago against content hash 417984b91dd1, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

automate-boring-stuff 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 11d 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.

skills/automate-boring-stuff/SKILL.md · 42 lines

How it starts

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

Automate the Boring Stuff with Python

Apply this skill when the user wants to turn a repetitive, manual, computer-based task into a script. The book's core value isn't clever code — it's picking the right practical tool for the task and not breaking things while automating them.

Core concepts

Is this worth automating? — Good candidates are tasks that are repetitive, rule-based (a human could write down the steps as a checklist), and either time-consuming or error-prone by hand. If a task is a one-off or requires real judgment calls each time, a script may cost more to write than it saves — flag this tradeoff rather than automating reflexively.

Regex and string handling — Use regular expressions for pattern-based text extraction/validation (emails, phone numbers, log lines, filenames matching a pattern); use plain string methods (split, strip, replace, f-strings) when the pattern is simple — regex adds power but also fragility and unreadability, so don't reach for it by default.

File and folder operations — Use os/shutil/pathlib for bulk copy/move/rename/delete across files and directories. For anything destructive or hard to undo (bulk rename, bulk delete, overwriting files), do a dry run first: print what would happen before actually doing it, and prefer generating a log of changes made — bulk file operations are one of the easiest ways to silently destroy real user data.

Structured file formats — Read/write CSV with the csv module, Excel with openpyxl, PDFs with a PDF library (extraction is often messy — text layout doesn't always extract cleanly), Word docs with python-docx, and JSON with the built-in json module. The goal is always to get data out of (or into) a format a script can work with programmatically instead of a human doing it by hand in the GUI.

Web scraping — Use requests + BeautifulSoup for static pages (fetch HTML, parse with selectors); use Selenium (or similar) only when the page requires JavaScript execution, logins, or interaction to reveal the content. Before scraping, check whether the site offers an API instead (more stable than scraping), and be mindful of rate limits, robots.txt, and the site's terms of service — flag this explicitly rather than assuming scraping is always fine.

Read the full file on GitHub · 42 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. 11d ago First seen · 42 lines · 194 tokens per session scan A 417984b91dd1

Subscribe to this mod's changes

automate-boring-stuff is a skill published in the GitHub repository DamiMartinez/book-skills (11 stars, last pushed 1mo ago), licensed MIT. It adds 194 tokens to every session and 1,291 once invoked, about $0.0010 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-30.