/routines just completely changed Claude Code tasks

CChase AI
Computing/SoftwareSmall Business/StartupsInternet Technology

Transcript

00:00:00Just a couple of hours ago,
00:00:01Anthropic released a huge upgrade for anybody
00:00:04who uses Claude code for scheduled tasks.
00:00:06And that is routines because now we can have Claude code
00:00:10do things for us automatically in the cloud.
00:00:12We no longer are stuck with session-based loops
00:00:15and session-based scheduled tasks.
00:00:17And there's three ways we can do this.
00:00:19We can run them on a schedule.
00:00:20Like I want you to do X, Y, or Z every morning at 9 a.m.
00:00:24We can do it from an API call.
00:00:25So it's pretty much on demand,
00:00:27or we can have it be event-based,
00:00:29have it respond to an event
00:00:31like something going on in your GitHub repo.
00:00:34And the big thing here is it runs
00:00:36on Claude code's web infrastructure.
00:00:38So nothing depends on your laptop being open.
00:00:40I'm sure we've all been in situations where like, wow,
00:00:42I wish I could have Claude just do this one thing
00:00:45every single day.
00:00:46And I didn't have to have that exact terminal up.
00:00:48And I also didn't have to create a web app,
00:00:50go host it on railway and pay for API fees.
00:00:53We can now do that.
00:00:54Now this comes with a few restrictions,
00:00:56namely how many runs we can do in a 24 hour period.
00:00:58For max users, it's 15 runs every 24 hours.
00:01:00We will see if that changes,
00:01:02but don't think of this as some replacement for, you know,
00:01:05what you've created in N8N in the past,
00:01:07where you're running hundreds of automations in a single day.
00:01:10This is more small scale stuff for a single user
00:01:13where you want it to run when you're not at your computer
00:01:15and you don't want to have to pay for API costs.
00:01:18But even with those restrictions,
00:01:19this is a much needed addition to the Claude code ecosystem.
00:01:23So today I'm going to show you how it works
00:01:24and we're going to run through an example.
00:01:26Now the way it works is pretty simple.
00:01:28If we are in the CLI,
00:01:29it's going to be done with forward slash schedule,
00:01:31or we can do all this through the actual
00:01:34Claude code desktop app as well.
00:01:36If I'm on the Claude code desktop app,
00:01:37I'm just showing this because it's a little easier
00:01:39to tell what's going on visually.
00:01:41You just go over here to the left,
00:01:43you go to scheduled and you go to new task
00:01:45and you hit new remote task.
00:01:47Cause again, it's going to be on the cloud.
00:01:48And what we fill out here is the same thing
00:01:50we would fill out in a prompt in the CLI.
00:01:52We're going to tell it what we want to call it,
00:01:54what we want it to do.
00:01:55We need to connect it to some sort of GitHub repository
00:01:59because whatever it completes in the cloud,
00:02:01it's going to shoot it into some sort of repository.
00:02:04We need to set up some sort of cloud environment.
00:02:06If you haven't done that before, if you've used ultra plan,
00:02:08it's probably already happened for you.
00:02:10If not, you just need to add it.
00:02:11And then you need to select your trigger.
00:02:13For most people,
00:02:14it's just going to be a daily schedule trigger,
00:02:16like a cron job.
00:02:17But again, you can tie this to specific GitHub events,
00:02:20or you can do this as an API.
00:02:22Now for today's example,
00:02:23we are going to create a Claude code routine
00:02:25that scrapes GitHub for the top 10 trending GitHub repos
00:02:28in the AI space over the last week,
00:02:30as well as the top five over the last month.
00:02:32What you see here is what I already do automatically,
00:02:35but it's done through Windows and it's a simple API call.
00:02:38But now we're going to offload that to Claude code
00:02:40and better yet, since it's now AI powered,
00:02:43it can do some additional analysis for me.
00:02:45Now for this, the work you need a GitHub repo
00:02:47tied to that routine because Claude code
00:02:49needs somewhere to put whatever it delivers.
00:02:51And to make sure that works,
00:02:52you need a couple of things ready to go.
00:02:55If you're going to eventually use stuff like GitHub web hooks,
00:02:58you need the GitHub app, the Claude GitHub app installed.
00:03:01I'll put a link to that in the description.
00:03:03And if you're doing just basic scheduled routines,
00:03:05you need the GitHub integration connected,
00:03:07which you can do inside of the settings tab on Claude.ai.
00:03:11So this is the prompt I'm going to give Claude code.
00:03:12I'm saying, I want this routine done.
00:03:14I give it a link to the GitHub repo I created.
00:03:17And I'm saying, call the GitHub search API,
00:03:20search the top 10 repos over the last seven days,
00:03:22check it over the last 30 days,
00:03:24figure out if it's relevant.
00:03:25And then I want you to write a markdown file
00:03:28explaining all this,
00:03:29including something like an editor's take.
00:03:30And I had Claude code open in another session
00:03:32and I had Claude code create the prompt
00:03:34for Claude code for routines.
00:03:36And so things you need to include in this prompt
00:03:38is the name, the repository you've created, the environment.
00:03:43You can just go with default, a schedule,
00:03:45and then obviously the prompt itself.
00:03:47So I gave it the prompt and it's saying,
00:03:48it's creating the trigger 8 a.m.
00:03:51What model is it using?
00:03:52And I'm just going to have it use on at 4.6.
00:03:54We don't need Opus for this.
00:03:55The repo and then the environment is,
00:03:57my default is my ultra plan one environment.
00:04:00So, hey, the trigger has been created
00:04:01and let's tell it to run the routine right now
00:04:03to make sure it actually works.
00:04:05And it said the GitHub access isn't authorized.
00:04:08So I just need to reauthorize GitHub real fast.
00:04:10And to do that, you go into your settings
00:04:12and you just head to your connectors and you click on GitHub.
00:04:15And so you can see mine is now connected.
00:04:18So we'll have it,
00:04:19we'll have it try again
00:04:22and we'll move over here so you can see this better.
00:04:24It gives me a link where I can actually watch the run
00:04:26happening in real time.
00:04:28So you can see the instructions I gave it.
00:04:29This is basically the prompts
00:04:31and then now it's manually doing the run.
00:04:33So it completed the run and it posted it inside of my GitHub.
00:04:36And let's make this not so freakishly huge.
00:04:40So we can see right away, GitHub trending.
00:04:43Here's the editor's take.
00:04:44If we compare that to what I usually have,
00:04:47you know, it's kind of just like straight data.
00:04:50In here, it gives me a quick summary of what's been going on
00:04:54just right up front.
00:04:55Then we get the top 10 trending repos.
00:04:58The link seemed to work.
00:05:00So this is exactly what I asked for.
00:05:02And now I'll have it every single day inside of my GitHub.
00:05:04Now we mentioned there's two additional ways
00:05:06to use this routine and that's APIs
00:05:09and have it be event-based.
00:05:10If you do want to use this as an API trigger,
00:05:13just remember we only have so many hits we can do each day,
00:05:16which is 15.
00:05:17So, you know, understand what your use case is gonna be,
00:05:20but you can't do the API trigger or set it up via the CLI.
00:05:24You actually have to do it through the web.
00:05:26So if you go to Clod Code Docs,
00:05:28it sort of walks you through how to do that.
00:05:30You have to go to clod.ai/code/routines
00:05:33and you'll set it up through here.
00:05:35And same thing with adding GitHub triggers.
00:05:37They can be configured from the web UI only.
00:05:40So same exact place,
00:05:41but the documents walk you through exactly how to do that,
00:05:44as well as a bunch of actual supported events.
00:05:46So you feel like, hey, does this actually make sense
00:05:48to use something like this inside of GitHub?
00:05:51Well, you can check right here.
00:05:52But all in all, I think this is a great update.
00:05:54Pretty much everyone I know has at least a handful of tasks
00:05:57they wish Clod Code could do automatically every day,
00:05:59whether they're at the computer,
00:06:00whether a session's open
00:06:01or whether their computer's even turned on at all.
00:06:04And this solves that problem.
00:06:06So let me know what you think about this.
00:06:07Make sure to check out Chase AI Plus
00:06:09if you want to get your hands on my Clod Code masterclass.
00:06:11But besides that, I'll see you around.

Key Takeaway

Claude Code Routines allow users to automate up to 15 cloud-based tasks daily using scheduled, API, or GitHub event triggers without maintaining a local terminal session or paying separate API fees.

Highlights

Claude Code routines now run on Anthropic's web infrastructure, removing the requirement for an open terminal or active session on a local laptop.

The system supports three distinct trigger types: cron-style schedules, on-demand API calls, and event-based triggers tied to GitHub repository activities.

Usage for the Ultra/Max plan is limited to 15 automation runs per 24-hour period.

Routine setup requires the Claude GitHub app or a manual GitHub integration via the Claude.ai settings menu to deliver outputs to a repository.

API and GitHub event triggers require configuration through the web UI at claud.ai/code/routines rather than the CLI.

Automated routines do not incur additional API fees as they are included in the Claude subscription model.

Timeline

Cloud-Native Automation Capabilities

  • Routines execute on Claude Code's web infrastructure instead of local hardware.
  • Users can set tasks to run at specific times, via API calls, or in response to GitHub repository events.
  • Cloud execution eliminates the need to host separate web apps on platforms like Railway to run simple scripts.

The upgrade shifts Claude Code from a session-based tool to a persistent automation platform. This allows for tasks like daily data scraping or repo maintenance to occur even when the user's computer is powered off. It serves as a middle ground between manual prompts and full-scale automation platforms, focusing on single-user utility.

Usage Limits and Constraints

  • Max users are restricted to 15 routine executions every 24 hours.
  • The system is designed for small-scale personal utility rather than high-volume enterprise automation.
  • No additional API costs are applied for these 15 daily cloud runs.

While powerful for individual workflows, the 15-run limit distinguishes routines from tools like N8N that handle hundreds of daily tasks. The primary value lies in offloading routine analysis or reporting to the cloud without the overhead of managing API keys or billing. It is specifically positioned as a much-needed addition for the Claude ecosystem's consistency.

Task Configuration and Integration

  • New tasks are initiated via the /schedule command in the CLI or the 'New Remote Task' button in the desktop app.
  • Every routine must be connected to a GitHub repository to store the generated deliverables.
  • Authentication requires the Claude GitHub app for webhooks or a standard GitHub integration for basic schedules.

Configuration involves naming the task, defining the prompt, and selecting a cloud environment. The visual interface in the desktop app allows for easier tracking of scheduled vs. local tasks. Users must ensure their GitHub connectors are authorized in the Claude.ai settings to prevent permission errors during the automated push process.

Practical Example: AI Trend Scraper

  • A routine can scrape the GitHub search API for top 10 trending AI repositories over seven-day and 30-day windows.
  • The AI analyzes data relevance and generates a markdown report including an 'editor's take' summary.
  • Live execution monitoring is available via a web link provided at the start of the run.

In a test case, a prompt directed Claude to identify trending AI repos and output a formatted markdown file to a specific repository. Unlike static API calls, the AI adds value by synthesizing the data into a readable summary rather than just providing raw data points. The resulting file is automatically pushed to GitHub at the scheduled time, in this case 8 a.m. daily.

Web-Only Triggers and Documentation

  • API and event-based triggers must be configured through the web UI at claud.ai/code/routines.
  • The Claude Code documentation lists specific supported GitHub events for trigger-based workflows.
  • Routines solve the problem of needing an active session or terminal for repetitive daily tasks.

While basic schedules can be managed in the CLI, advanced triggers require the web interface for security and configuration reasons. The documentation provides a roadmap for which GitHub events, such as pull requests or commits, can kick off a Claude Code routine. This functionality effectively turns Claude into a serverless agent for personal developer workflows.

Community Posts

View all posts