Back to Blog
AI & AutomationAIClaudeCodeAutomationEngineeringLeadership

Claude Code Routines: Your Dev Pipeline Just Got a Cloud Scheduler

Claude Code Routines lets you define AI agent prompts triggered by schedule, API call, or GitHub event — running on Anthropic-managed cloud infrastructure while your laptop is closed.

4 min read
770 words
Claude Code Routines: Your Dev Pipeline Just Got a Cloud Scheduler

Claude Code Routines: Your Dev Pipeline Just Got a Cloud Scheduler

Anthropic shipped something this week that changes the economics of running an engineering team. Claude Code Routines lets you define an AI agent prompt, connect it to a repo, and pick a trigger: scheduled time, API call, or GitHub event. The agent runs on Anthropic-managed cloud infrastructure. While your laptop is closed.

577 points on Hacker News this morning. That signal is accurate.

The Problem Every AI Coding Tool Shares

Every AI coding assistant — Cursor, Claude Code, Copilot — shares one constraint: a human has to be driving. The agent can write code, review PRs, find bugs, and refactor functions. But only when someone opens the laptop and asks it to. Your best AI tooling sits idle for 16 hours a day.

That is not a workflow problem. That is an architecture problem.

What a Routine Actually Is

A Routine is an agent with a trigger and a context window. You write the prompt, Anthropic handles the infrastructure.

Three trigger types:

  • Schedule: run hourly, nightly, weekly
  • API: fire from any external system — monitoring, CI/CD, Zapier
  • GitHub event: PR opened, issue created, release pushed

The Routine reads your repo, executes your instructions, and posts results wherever you point it: Slack, GitHub comments, a database, another API.

Here are three routines worth deploying this week.

Routine 1: Nightly Issue Triage

name: nightly-issue-triage
trigger:
  schedule: "0 22 * * *"  # 10 PM nightly
prompt: |
  Review all GitHub issues opened or updated today.
  For each issue:
  1. Assign a label: bug / feature / question / needs-info
  2. Assign to the appropriate team member based on codebase area
  3. Close duplicates with a reference to the original
  4. Post a Slack summary to #engineering: new issues (count),
     bugs found, and any critical issues needing immediate attention
repo: your-org/your-repo
output:
  slack_channel: "#engineering"

The team wakes up to a sorted inbox. Bugs are labeled and assigned before standup. No one spends the first 20 minutes of the day doing triage.

Routine 2: PR Quality Gate on Every Push

name: pr-quality-review
trigger:
  github_event: pull_request.opened
prompt: |
  Review this PR and post a comment:
  1. Does it include tests for new functionality?
  2. Are there obvious security issues (SQL injection, unescaped input,
     exposed secrets)?
  3. Does it follow patterns in /src/lib/patterns/?
  4. Flag any functions longer than 50 lines as refactor candidates
  Format: short bullet list per category. Approve or flag for human review.
repo: your-org/your-repo
output:
  github_pr_comment: true

Every PR gets reviewed before a human sees it. Junior devs get immediate feedback. Senior devs spend time on decisions, not checklists.

Routine 3: Production Alert Triage

name: alert-triage
trigger:
  api: true  # Webhook from Datadog or PagerDuty
prompt: |
  A production alert fired.
  Error: {{alert.message}}
  Service: {{alert.service}}

  Steps:
  1. Search the codebase for likely source files
  2. Check git log for recent changes to those files
  3. Draft a Slack message to #incidents: probable cause,
     affected code area, and a first-response recommendation
  4. Do NOT make any code changes  investigation only
repo: your-org/your-repo
output:
  slack_channel: "#incidents"

By the time an engineer acknowledges the alert, there is already a starting point. No more staring at a stack trace at 2 AM trying to remember which service owns that endpoint.

What This Changes for Engineering Leaders

Three shifts worth understanding:

Prompting skill becomes a first-class engineering competency. The teams that benefit most will be the ones with engineers who can write prompts precise enough to trust in production. That skill is not evenly distributed on most teams today.

Small teams get disproportionate leverage. A 4-person startup can now run background agents doing triage, review, and monitoring — work that previously required a dedicated platform engineer.

The invisible taxes on your repo just shrank. Issue hygiene, PR consistency, and first-response incident analysis were all engineering time that produced no features. Routines automate the tax.

The teams that deploy this in the next 90 days will run faster. Not because they wrote more code — because they stopped doing work that an agent handles while they sleep.


Work With Me

I help engineering orgs adopt AI across their entire team — not just the code, but how product, support, and operations work too. If you want to move faster without growing headcount, let's talk.