Case study · personal automation

AI automations on my home server

I love automating things. My home server runs many cron jobs and hosts Home Assistant, so I can control every device on my network. When I have to do a task more than twice, I ask AI to automate it.

Runs on
An old laptop with Ubuntu Server, always on
Started by
Cron jobs and systemd timers
Rule
More than twice by hand means I automate it
  • Claude Code
  • Python
  • Ubuntu Server
  • Home Assistant
  • ntfy

How it works

Over time my home server has collected notes on my setup and a library of reusable skills. Because of that, the AI usually gets a new automation right on the first try.

  1. I describe the task once

    I tell Claude Code on the server what I want and how often it should run.

  2. The agent reuses what it knows

    It reads the notes on my setup and uses existing skills, such as reading my mail or sending a notification.

  3. A timer runs it

    A cron job or systemd timer starts the automation. Nobody has to start it by hand.

  4. Results reach my phone

    Anything I need to act on arrives as a push notification through ntfy, my own notification server.

Two automations I use every day

every morning at 8

Inbox assistant

An AI agent reads my new mail. It moves spam and phishing to junk and unsubscribes me from newsletters I never asked for. For mail with a deadline, like an invoice or an appointment, it sends a notification to my phone.

always up to date

AI to-do list

An AI agent reads my mail and my school calendar and adds every task and deadline it finds. For each task, it looks for a way to make the task easier or to finish it itself. That way I always know what to do next.

See it work

A school deadline arrives, the to-do list updates, and the agent adds a suggestion for the task.

A recreation with example data. The real agent runs the same steps on my own mail and calendar.

What the agents can't do

An agent that runs every day without me watching needs firm limits. I set those limits in code, not only in the prompt.

  • The smallest set of commands that works. The inbox agent can only run one script, and that script has no delete, reply or send command.
  • Mail and calendar items are untrusted data. The agent never follows instructions written inside them, so a phishing mail that says "ignore your rules" has no effect.
  • No secrets in skills or notes. Passwords and tokens are stored in separate files that only my user can read.

What I learned

Context beats a better prompt

My first automations took several tries. Now the server keeps notes on my setup, so new automations usually work the first time.

Write a skill once

When I write a skill, for example "send a notification", every later automation uses it. Each new automation takes less work than the last.