---
title: "Claude Routines"
url: "https://zuey.me/articles/claude-routines?lang=en"
locale: en
access: members
full_text: false
published_at: "2026-08-11T02:00:00.000Z"
tags: ["Claude Code", "MCP", "AI"]
translations:
  vi: "https://zuey.me/articles/claude-routines.md?lang=vi"
  zh: "https://zuey.me/articles/claude-routines.md?lang=zh"
  ko: "https://zuey.me/articles/claude-routines.md?lang=ko"
  ja: "https://zuey.me/articles/claude-routines.md?lang=ja"
---
# Claude Routines

> Turn GitHub into your control center: Issues are the input, PRs are the review gates, and Claude Routines work while you sleep. But only automate PART of it, and here's why.

> **INFO:** **TL;DR:** You can use Claude Routines to partially automate your development workflow through GitHub: small, clear Issues are the input, PRs are the review gates, and humans still check and verify the output. To do it safely you need a `CLAUDE.md`, tests, CI/CD, a status-label workflow, and you should only automate into a beta/dev branch. Don't hand agents oversized issues or brand-new projects; speed isn't worth losing control of your codebase.

Turn GitHub into your bottleneck (wait, what). Okay, "turn GitHub into your control center" is more accurate. Here's how I do it.

### Preparation: this part matters!

- **`CLAUDE.md`:** you can check out the post I wrote on Substack the other day. You've probably heard people call this file "the map", right? But it's not a map of the codebase. Agents can dig up the folder structure super fast on their own, no guidance needed. The "map" here is more like a "map of rules" (a list of **DOs and DON'Ts**), think of it like the "Playground Rules" sign: whenever you want to do something, you know where to read the rule for it. This file isn't a hard gate that guarantees agents will always do EXACTLY that, but it definitely improves how agents work.
- **Tests & CI/CD:** to automate safely, you have to control the input and output well. The input is the prompt, the output is code. Whether the code runs correctly depends on tests; whether it does what you expected depends on the input (the prompt) and your development rules (`CLAUDE.md` and rules).
- **Repo structure:** always have a `dev` branch (or `beta`/`staging`) and a `main` branch (for `stable`/`production`). Only automate into `dev`!

### Claude Routines: let Claude work automatically while you sleep!

Sounds fancy, huh? But there's a reason I put "partially" in parentheses in the title. The whole flow is 3 routines chained together:

```mermaid
flowchart TD
  A["Small, clear issue (written with a skill)"] -->|"label ai-handle"| B["Routine 1: /ak-vibe --ship --beta --advice"]
  B --> C["PR into dev/beta branch"]
  C -->|"label ai-handle"| D["Routine 2 (2:00AM): /ak-review-pr --merge"]
  D --> E["PR merged, CI green (ai-merged)"]
  E --> F["Routine 3 (7:30AM): daily report"]
  F --> G["Human review & verify"]
```

*Issue → PR → review → report flow with Claude Routines*

#### Automation readiness checklist

- [ ] Small scoped issue with measurable acceptance criteria and evidence
- [ ] CLAUDE.md defines rules, tests reviewed by humans
- [ ] Concurrency protection prevents duplicate sessions
- [ ] Automated merging only to dev; watch post-merge CI
- [ ] Human reviews the daily report before production

> **WARN:** Labels are not atomic locks. Add concurrency controls and always re-check state.

```mermaid
flowchart LR
 A["GitHub Issue"] --> B["Agent implementation"]
 B --> C["PR to dev"]
 C --> D["CI and security review"]
 D --> E["Daily human verification"]
```

*Automation readiness checklist*

#### 1/ Input: GitHub Issues = TODO list

- **Idea:** Claude reads the Issues and implements them automatically, then opens a PR into `dev` (`beta`) when done.
- **Important: each issue is a VERY SMALL task.** Break work down into tasks small and specific enough to raise the completion rate of the agents' output. When creating an issue, keep asking yourself: "is this enough to be sure the agent will build exactly what I want?"
- **Writing issues:** don't write them by hand. Write them with a Skill, using Claude or any AI tool that can connect to your GitHub repo (via GitHub MCP/CLI). Why: in the issue-writing skill we ask the agent to scout the codebase first so it understands it, even verify whether the issue has already been addressed (someone else may have done it), scan existing issues to avoid duplicates (someone may have already filed it), always make the agent provide evidence (absolutely no guessing or assuming), and include a `STOP GATE` to halt when the evidence isn't strong enough (the codebase isn't ready or there's a risk that can't be automated).
- **Issue template** (just put this in the issue-writing skill): Context (scout status), Requirements (yours), Expectations (yours), Purpose (the why), Risks (AI analyzes), Evidence (AI scouts).
- **Status labels:** `ai-handle`, `in-progress`, `beta-shipped`; these keep agents from stepping on each other's toes.

---

*Phần còn lại dành cho thành viên có quyền đọc toàn bài (Knowledges, Kết hợp, Cộng đồng) — see plans at https://zuey.me/pricing*
