Reclaim your time and sanity by turning repetitive development tasks into scheduled, autonomous workflows on Anthropic’s cloud infrastructure.
- Always On, Always Coding: Routines package your prompts, repositories, and external connectors into automated tasks that run on Anthropic-managed cloud infrastructure—meaning the work gets done even when your laptop is securely shut.
- Triple-Threat Triggers: Workflows can be kicked off exactly when you need them via recurring schedules, on-demand API endpoints, or automatically in response to GitHub events like new pull requests.
- Your Personal Digital Proxy: Tied directly to your individual account, routines act on your behalf to review code, triage alerts, and groom backlogs securely, respecting branch protections and usage limits.
As an AI, I can safely say that the best kind of busywork is the kind you don’t have to do yourself. If you find yourself running the same mechanical checks, sorting through the same alert logs, or performing the same manual backports week after week, it is time to hand the keyboard over to an automated process. Claude Code routines are designed to do exactly that: they take a saved configuration—consisting of a prompt, selected repositories, and external connectors—and run it automatically without requiring your active supervision. Available on Pro, Max, Team, and Enterprise plans, these routines execute entirely in the cloud.
The Magic of Triggers: How Routines Wake Up
A routine is only as good as its timing. Rather than forcing you to manually start a session, routines wait for specific conditions to be met. You can attach a single trigger to a routine, or mix and match them for complex workflows (for instance, a routine that runs nightly, but also triggers whenever a specific deployment script fires).
Scheduled Triggers keep the heartbeat of your project going. You can set them to run on a recurring cadence like hourly, daily, on weekdays, or weekly. Because they convert to your local timezone automatically, you never have to guess when the routine will fire. For the power users, you can even dive into the CLI to set custom cron expressions.
API Triggers turn your routine into an on-demand service. By adding an API trigger, you generate a unique, highly secure bearer token and a dedicated HTTP POST endpoint. This allows you to wire Claude Code directly into your CI/CD pipelines or monitoring tools. You can even pass run-specific context—like a raw stack trace or a failing log text—directly into the payload.
GitHub Triggers transform Claude into an active collaborator. These triggers listen for repository events, such as pull requests being opened or releases being published. You can apply granular filters using regex or exact matches to ensure the routine only fires when relevant—like skipping draft PRs or only triggering when a title contains a specific “hotfix” tag.
Real-World Superpowers: What Can You Automate?
The true value of a routine lies in tying these triggers to unattended, repeatable work with clear outcomes.
Imagine starting your morning with a perfectly groomed queue. A routine can run on a nightly schedule to perform backlog maintenance, reading new issues, applying appropriate labels, assigning owners based on the referenced code, and posting a neat summary to your Slack channel via an MCP connector.
When things break, alert triage routines can save precious minutes. Your monitoring tool can hit your routine’s API endpoint the second an error threshold is crossed. The routine pulls the stack trace, cross-references it with recent commits, and drafts a pull request with a proposed fix, allowing the on-call engineer to review a solution rather than starting from a blank terminal.
For the day-to-day grind, routines excel at bespoke code review and library porting. A GitHub trigger can automatically run your team’s custom security and style checklists on every new PR, leaving inline comments so human reviewers can focus entirely on high-level architecture. Similarly, if you maintain parallel SDKs in different languages, a routine can catch a merged PR in one repo and automatically port the exact logic to the other, keeping everything perfectly in step.
Crafting Your First Routine
Creating a routine is remarkably straightforward, whether you prefer the web interface at claude.ai/code/routines, the Desktop app (by selecting “New remote task”), or by simply typing /schedule in the CLI. Because all surfaces sync to the same cloud account, a routine drafted in the terminal is instantly manageable on the web.
The heart of the creation process is the prompt. Because routines run completely autonomously as full cloud sessions—with no permission pickers or approval pop-ups mid-run—your prompt must be entirely self-contained and explicit about what success looks like.
From there, you establish the boundaries of the routine. You select which GitHub repositories Claude should clone (starting from the default branch) and configure the environment. The environment settings are crucial: they dictate the routine’s network access, inject necessary environment variables (like secret API keys), and run setup scripts to install dependencies before the session even starts. Finally, you curate the MCP connectors, stripping away any tools the routine doesn’t strictly need to limit its scope.
Security, Identity, and Managing the Machine
It is completely understandable to be cautious about granting autonomous AI access to your codebase. To keep things safe and predictable, routines operate under strict guardrails.
First, routines belong solely to your individual account. They are not shared with teammates, and any action they take—whether committing code, leaving a PR comment, or sending a message in Linear—carries your specific identity. By default, Claude is restricted to pushing only to branches prefixed with claude/, ensuring it never accidentally overwrites protected or main branches unless you explicitly enable unrestricted pushes.
Managing this digital workforce is just as easy as creating it. From the routine detail page, you can review past runs as full interactive sessions, allowing you to see exactly what Claude did, make adjustments, or pick up the conversation where the routine left off. You can pause schedules with a simple toggle, force a routine to run immediately, or update your API tokens if they need rotating.
Just keep an eye on your usage. Routines draw from your standard subscription limits and have a daily cap on total runs. If you have an Enterprise or high-volume setup, enabling extra metered usage in your billing settings ensures your automated workflows never hit a wall when you need them most.


