Claude Toolkit

Claude Code Routines: How to Automate Your Dev Workflows in 2026

Mike Kwal
· 10 min read
A blueprint-style diagram of a clock connected to a robotic arm that is writing code, representing automated tasks.

What’s in this article

🚀 Plug this into Claude Code or Claude Desktop

This spec contains a complete, working routine for automating pull request reviews on GitHub. Drop it into Claude Code to create a new routine, connect it to your repo’s webhook, and let your AI assistant handle the first pass on all new code.

We build and share workflows like this every week inside the Talk-to-Build community.

There is now a version of Claude Code that does the work overnight and shows you the results in the morning. That version is called Routines, and it changes the job of anyone who builds websites or apps for a living.

Anthropic announced Claude Code Routines at their Code with Claude event in London. You can now save a build configuration and trigger it on a schedule, from a webhook, or based on a GitHub event, completely unattended. This post gives you the exact spec to automate your first workflow today.


What are Claude Code Routines?

Claude Code Routines are saved configurations that allow a Claude Code session to run autonomously in the background. Instead of requiring a user to be present, a Routine can be triggered automatically by a schedule (like a cron job), a webhook call, or a specific event from a connected service like GitHub, such as a new pull request.


The Automated PR Review Routine You Can Copy Now

This is a complete Claude Code spec for a Routine that automatically reviews new pull requests in a GitHub repository. To use it, save this as a Markdown file, create a new Routine in Claude Code, upload this spec, and connect it to your repository’s `pull_request` webhook. It will then act as a tireless junior developer on your team.

---
spec_name: "Automated PR Review Routine"
description: "A Claude Code routine to perform a first-pass review on new GitHub pull requests. It checks for common issues and leaves a formatted comment."
---

# GOALS

1.  When triggered by a new GitHub pull request, analyze the changed files.
2.  Check for common issues: console logs, commented-out code, missing error handling, and non-compliance with the project's style guide (if provided).
3.  Post a single, concise, and helpful comment on the pull request with findings.
4.  The tone should be constructive and collaborative, not critical.

# RULES

-   NEVER commit code or approve/merge the pull request. This is a read-and-comment-only routine.
-   The review comment must be formatted in Markdown.
-   If no issues are found, post a simple comment: "LGTM! No immediate issues found on first pass. ✅"
-   Operate only on the files included in the pull request diff.

# STEPS

1.  **Receive Webhook Payload:** Ingest the `pull_request` event data from GitHub to identify the repository, PR number, and changed files.
2.  **Fetch PR Diff:** Use the GitHub API to get the diff for the pull request to see the exact code changes.
3.  **Analyze Changes:** For each changed file, scan the code for the following:
    -   `console.log` or `print()` statements left in the code.
    -   Large blocks of commented-out code.
    -   `try...catch` blocks that are empty or just log to console without proper handling.
    -   Violations of basic style conventions (e.g., inconsistent indentation, mixed tabs and spaces).
4.  **Construct Comment:** Assemble a Markdown-formatted comment. Start with a positive opening. Use a bulleted list for any issues found, referencing the file name and line number.
5.  **Post to GitHub:** Use the GitHub API to post the constructed comment on the pull request identified in Step 1.

When I set this up for my own build pipeline, it caught three leftover `console.log` statements in the first hour. It’s the simplest way to add an automated quality gate to your process, and it’s a perfect first use case for the Claude Toolkit.

+----------------+      +----------------+      +-----------------+
| GitHub Push    |----->| Webhook Fires  |----->| Claude Routine  |
| (New PR)       |      | (sends payload)|      | (runs spec)     |
+----------------+      +----------------+      +-----------------+
                                                      |
                                                      v
                                                +-----------------+
                                                | PR Comment      |
                                                | (review posted) |
                                                +-----------------+

Here’s exactly how I’d do this

To set up a Claude Code Routine, you create a spec file defining the task, configure a new Routine in the Claude Code interface, and connect it to a trigger like a GitHub webhook. This process turns a manual, interactive coding session into a fully automated, background workflow that runs without your direct involvement.

  1. Write the Spec File. Create a Markdown (`.md`) file like the asset above. This is the brain of your routine. It tells Claude the goals, rules, and steps for the task. Be explicit and clear.
  2. Create a New Routine in Claude Code. In the Claude Code dashboard, navigate to the “Routines” tab and click “New Routine.” Give it a name like “PR Review Bot” and upload the spec file you just created.
  3. Configure the Trigger. Select how the routine will be activated. For our example, you’d choose “Webhook” and then “GitHub.” Claude will provide a unique webhook URL.
  4. Connect the Trigger Service. Go to your GitHub repository’s settings, find the “Webhooks” section, and add a new webhook. Paste the URL from Claude Code, set the content type to `application/json`, and choose to trigger on “Pull requests” events.

Once you save the webhook in GitHub, the routine is live. The next time someone opens a pull request, your Claude Routine will run automatically.


What this changes for designer-run agency work

Claude Code Routines change the core workflow from interactive assistance to autonomous execution. This means the AI graduates from being a tool you actively use to a platform that runs processes for you. For agencies and builders, this shift impacts how you scope work, manage quality, and even price your services.

Dimension Old Way (Claude as a Tool) New Way (Claude as a Platform)
Workflow You type a prompt, Claude gives you code, you copy-paste it. You define a process once, Claude runs it on its own forever.
Initiation Human-driven. You have to start the session. Event-driven. A schedule, webhook, or API call starts the work.
Use Case Code generation, debugging, refactoring. CI/CD, automated testing, scheduled reports, data processing.
Value Makes the developer faster. Creates an automated system that replaces manual tasks.

This is the key difference between a coding assistant and a true development platform. The former helps you do the work; the latter does the work for you. This is a core part of the modern talk-to-build stack.


My $0.02 — How I’d roll this out

I would treat Routines as a new class of service offering for my agency, starting with internal processes and then productizing it for clients. The goal is to build automated assets that provide continuous value, moving beyond one-off project work. This is a three-day sprint to turn the feature into revenue.

Day 1 — Automate Internal QA. I’d start with the PR Review Routine from this post and apply it to every internal and client repository we manage. This is a zero-cost way to improve code quality and save senior developers’ time. I’d also set up a daily routine that scans our sites for broken links and reports back to Slack.

Day 2 — Build a Client-Facing Routine. I’d identify the most common, repetitive task a client asks for. A great example is a weekly analytics report. I’d write a Routine that connects to their Google Analytics, pulls key metrics, formats them into a clean summary, and emails it to the client every Monday morning. This is a perfect, sticky retainer service.

Day 3 — Productize and Sell. I’d package the analytics routine as a fixed-price product: “Automated Weekly Performance Report, powered by Claude AI.” I’d sell it for a flat monthly fee. It’s a real, automated asset that provides tangible value without requiring weekly manual effort from my team. *If you can talk it, you can build it* — and then you can automate it.


FAQ

What is Claude Code Dreaming?
Dreaming is a related feature where Claude Code reviews its own past work sessions in the background to find patterns and improve its internal memory. It’s a self-optimization process. While Routines are for executing tasks, Dreaming is for improving the AI’s ability to perform those tasks over time.

How much do Claude Code Routines cost?
Pricing is based on compute usage during execution, similar to other serverless platforms like AWS Lambda or Cloudflare Workers. There isn’t a flat monthly fee for the feature itself. You pay for what you use, which makes it cost-effective for tasks that run infrequently but powerful for high-volume workflows.

Is it secure to give a Routine access to my code?
Yes, security is managed through fine-grained permissions. When you connect a service like GitHub, you use OAuth and can specify read-only or read/write access for specific repositories. The Routine operates within the security context you define, just like any other third-party application.

How is this different from GitHub Actions?
GitHub Actions is a general-purpose CI/CD platform that runs predefined scripts in containers. Claude Code Routines are AI-native, executing tasks based on natural language specs. You tell a Routine *what* to do, not just *how* to do it with code, allowing for more complex, reasoning-based workflows.

Can Routines work with tools other than GitHub?
Yes. While GitHub is a primary integration, Routines can be triggered by any service that can send a webhook. This means you can connect them to project management tools like Asana or Jira, CRMs like HubSpot, or communication platforms like Slack to automate a wide range of business processes.

What is the “Outcomes” feature mentioned with Routines?
Outcomes are a feature for multi-agent orchestration within Claude Code. You can chain multiple Routines together, where the outcome of one routine can trigger another. This allows you to build complex, stateful workflows where different AI agents collaborate to achieve a larger goal.

Do I need to be a developer to use Routines?
You need to be able to define a clear process in plain English. The power of Routines is that the spec is written in natural language, not a programming language like YAML or Python. It’s designed for technical operators, designers, and project managers, not just hardcore engineers.


Want help applying this?

Four ways to go deeper:

  • Build with Builders. Join the Talk-to-Build community to learn to build AI-native websites, cinematic AI video, and agent-driven workflows you can sell.
  • 1-on-1 working session. Book a screen-share with me — bring a real problem, leave with a working piece of it.
  • Done-for-you. MK-Way builds AEO-ready websites, apps, and AI agent workflows.
  • Quick question. DM me on Instagram or LinkedIn. I read every message.

Part of the AI Pulse series. If you commented “ROUTINES” on one of my videos — this is the breakdown. Sources: Code with Claude London Announcement, InfoQ Coverage.

Last updated: 2026-06-25.