▸ TLDR
CHECK 02 12 MIN · HANDS-ON

Create your first routine

What you’ll know by the end of this check

  • Three surfaces to create a routine — web, Desktop, CLI — and when to pick each
  • The five pieces every routine needs (prompt, repos, environment, connectors, triggers)
  • Why scoping each piece tightly is the whole game

The shortest possible answer

Three ways to create a routine, one cloud account:

Web:      claude.ai/code/routines → New routine
Desktop:  New task → New remote task
CLI:      /schedule  (or /schedule "daily PR review at 9am")

All three write to the same place. A routine you create from the CLI shows up in the web UI immediately.

The CLI is the fastest way to get started. The web UI is the only way to add API and GitHub triggers.

The five pieces of a routine

Every routine has the same skeleton:

PieceWhat you configureScope tightly
PromptThe instructions Claude runs each timeSpecific outcome, not “help with X”
RepositoriesWhich repos get cloned into the cloud sessionOnly what the routine actually needs
EnvironmentNetwork access, env vars, setup scriptsLeast-privilege
ConnectorsMCP servers the routine can use (Slack, Linear, etc.)Remove anything unused
TriggersWhat starts a run — schedule, API, or GitHubOne or more, can combine

Routines run autonomously. No permission-mode picker, no approval prompts mid-run. Whatever you configure here is what happens in the cloud while you’re not watching. Which means scoping matters more than it does in an interactive session.

CLI-first walkthrough (fastest path)

/schedule

Claude walks you through a conversational setup — what should the routine do, which repo, how often. Or pass a description directly:

/schedule daily PR review for my-app at 9am weekdays

Claude builds the routine and saves it. Open the web at claude.ai/code/routines to verify it landed and inspect the exact cron expression.

CLI limits: /schedule only creates scheduled triggers. To add an API or GitHub trigger, edit the routine in the web UI.

Web-first walkthrough (full control)

At claude.ai/code/routines, click New routine. The form walks through all five pieces in one place, including API token generation and GitHub event filters.

Use the web when you need any of:

  • API triggers
  • GitHub triggers with filters (branch matching, label gates, fork detection)
  • Multiple triggers on one routine
  • Fine control over environment variables or setup scripts

Key defaults to know

  • Default branch: Claude clones the repo’s default branch unless your prompt says otherwise.
  • Branch push restriction: By default, Claude can only push to branches prefixed claude/. This is safety, not lock-in. To allow pushes elsewhere, toggle Allow unrestricted branch pushes on the repo when creating/editing the routine.
  • Connector inclusion: When you create a routine, every connector you have attached gets included by default. Prune anything not relevant — routines run with everything you leave in.
  • Identity: Anything the routine does through your GitHub or connectors appears as you. Commits, PRs, Slack messages, Linear tickets. Your account, your face on the output.

Things to try right now (15 minutes)

  1. Run claude in a safe project repo.
  2. Run /schedule and create a scheduled routine with a trivial prompt like “List the three most recently modified files in the repo and post the list to my notes.”
  3. Set it to run hourly for the next day.
  4. Open claude.ai/code/routines and verify the routine appears.
  5. Click Run now to trigger it immediately instead of waiting.
  6. Open the session URL. Watch Claude do the thing with no laptop involvement.

The canonical version

Full official docs: code.claude.com/docs/en/routines.

Ready to verify this check?

You’ve created a routine. You’ve watched it run. You can name the five pieces without looking. Mark it cleared.