記事一覧へ
ほとんどの人はAnthropicがClaude Code Routinesを発表したとき、「また別の自動化ツールか。Make、Zapier、n8nはもう使ってる」と思いました。
違います。これは全く別次元のものです。
実際に何が変わったのか、あなたのビジネスにとって何が重要なのか、そして次の30分で最初のルーティンを構築する正確な手順を説明します。
## Routinesがこれまでできなかったこと
何年もの間、自動化のゲームは同じでした:ドラッグアンドドロップのビルダー。ツールAをツールBに接続。クリック。保存。うまくいくことを祈る。
問題は、何か壊れたとき(必ず壊れます)に詰まることです。エッジケースに当たる。ツールがAPIを変更する。ワークフローが問題について推論できない。夜中の3時に起きて修正する。
Claude Code Routinesはこれをひっくり返します。
ルーティンはワークフロービルダーではありません。AnthropicのクラウドインフラでClaudeが実行され、コードリポジトリ、GitHubイベント、接続した外部ツールへのアクセスを持ちます。実行すると、事前定義されたシーケンスを実行するだけではありません。考えます。推論します。適応します。
それが解放するもの:
**1. 問題についての知的な推論**
PRレビューのルーティンは、テストが通過するかどうかを確認するだけではありません。コードベースを読み込み、アーキテクチャのパターンを理解し、チームの実際のレビュー基準をすべてのPRに適用します。
セキュリティの問題をキャッチします。パフォーマンスの改善を提案します。特定の行にインラインコメントを残します。ドラッグアンドドロップのツールにはこれができません。Claudeにはできます。
**2. ステータスチェックだけでなくコード生成と修正**
本番アプリが壊れたとき、ルーティンはただアラートを送るだけではありません。リポジトリをクローンし、エラーログを読み、根本原因を診断し、修正を書き、テストし、プルリクエストを開きます。
あなたがレビューします。マージします。完了です。もう深夜のデバッグマラソンはありません。
**3. システムをまたいだコンテキスト認識**
Slackチャンネルにサポートリクエストがあります。Linearボードに関連するIssueがあります。GitHubに最近の変更があります。ドラッグアンドドロップのビルダーはこれらを別々のステップとして接続します。
Claudeはこれらをコンテキストとして接続します。三つ全てを読み、情報を統合し、事前定義されたものでなく適切なアクションを取ります。
**4. ビジュアルプログラミングではなく自然言語設定**
クリックしません。英語で仕事を説明します。「すべてのPRをセキュリティ問題、パフォーマンス問題、コーディング標準との整合性についてレビューしてください。コメントを残してください。サマリーをSlackに投稿してください。」完了です。Claudeがロジックを構築します。
**5. リビルドなしの継続的な改善**
ルーティンが完璧に機能していない場合、ワークフローを再設計しません。Claudeに改善すべきことを伝えます。ルーティンはフィードバックから学び、次の実行に適応します。ドラッグアンドドロップのビルダーはすべてを再構築する必要があります。
これがRoutinesがもう一つの自動化ツールではない理由です。根本的に異なるカテゴリです。
## RoutinesがどのようにN8nと競合するか(そしてClaudeが勝つ理由)
直接的に言いましょう:n8n、Make、Zapier——全部同じプレイブックです。ビジュアルビルダー。プリビルドのコネクター。フローチャートとしてのワークフロー。
シンプルなことには最適です:「Airtableに新しい行が追加されたら、Slackメッセージを送信する。」
しかし複雑なことになると崩壊します。
**Routinesが解決するn8nの限界:**
**複雑さ = スパゲッティフロー**
ワークフローには50以上のステップ、10以上の条件、リトライロジック、エラー処理があります。図は読めなくなります。メンテナンスは悪夢です。Routinesではプロンプトは読みやすいままです。意図が明確です。
**問題についての推論がない**
n8nは手続き的です。ステップ1、次にステップ2、次にステップ3。考えません。Claudeはあなたの特定の問題、あなたの特定のコード、あなたの特定のビジネスロジックについて推論します。n8nへの同じ入力は同じ出力を生成します。Claudeへの同じ入力は、より深く考えたので異なる出力を生成することがあります。
**コネクター地獄**
カスタム統合が必要ですか?n8nには300以上のプリビルドコネクターがあります。必要なツールがなかったり、あっても必要な特定のAPIエンドポイントをサポートしていなかったりするまで素晴らしく聞こえます。詰まります。ClaudeはHTTP、カスタムスクリプト、MCPコネクター経由で接続します。何でも統合できます。
**エラー処理が脆い**
n8nがエラーに当たると、停止するか盲目的にリトライします。Claudeはエラーを読みます。診断します。適応します。「APIが429レート制限エラーを返しました。5分待ってリトライしましょう。」設定不要。考えます。
**複雑さとともにコストが上がる**
n8nはタスクまたは実行ごとに課金します。複雑なワークフロー = より多くのタスク = より高い請求額。Claudeはトークンごとに課金します。100行のプロンプトは、シンプルなことをするにも信じられないほど複雑なことをするにも同じトークン予算で実行されます。より洗練されたロジックは追加費用がかかりません。
**n8nがまだ勝つ場所:** シンプルな統合。大量のプリビルドコネクター。ビジュアル学習者はブロックをドラッグすることを好むかもしれません。
**Routinesが勝つ場所:** 複雑な自動化。コンテキストについての推論。エッジケース処理。コード生成。カスタム統合。本番ワークフロー。
n8nをシンプルな3ステップ統合に使っている企業は問題ありません。複雑なビジネスロジックをn8nで自動化しようとしている企業は?スパゲッティフローで溺れています。Routinesは彼らのためにあります。
## Routinesを素早く構築する方法(ネタバレ:驚くほど簡単)
ほとんどの人はこれを複雑にしすぎます。
ショートカットはこちら。
**ステップ1:ジョブについて考える、ステップではなく。**
「何のステップを自動化する必要があるか?」ではなく
「望む結果は何か?」
例:
「すべてのPRをセキュリティ問題について自動的にレビューする」
「サポートメールをトリアージして適切なチームメンバーに割り当てる」
「本番ログから週次レポートを生成してリーダーシップに送る」
「API失敗を監視して修正PRを開く」
1文。それがあなたのルーティンです。
**ステップ2:英語でプロンプトを書く。**
claude.ai/code/routinesにアクセスして「新しいルーティン」をクリックします。
プロンプトフィールドに仕事を説明します:
```
あなたはコードレビュアーです。PRが提出されたとき:
コードの変更を読む
セキュリティの脆弱性を確認する
パフォーマンスの問題を探す
コーディング標準との整合性を確認する
特定の行にインラインコメントを残す
サマリーをSlackに投稿する
徹底的かつ建設的に。問題に焦点を当て、スタイルの好みではなく。
```
それだけです。それがあなたのルーティンです。設定なし。クリックなし。ただ英語で。
**ステップ3:リポジトリとコネクターを指定する。**
GitHubリポジトリを追加します。ClaudeはランタイムにクローンしますSlackコネクターを追加します。Claudeはメッセージを投稿できます。必要に応じて環境変数を追加します(APIキーなど)。完了です。
**ステップ4:トリガーを選ぶ。**
スケジュール:「毎平日夜9時に実行」
GitHub:「PRが開かれたときに実行」
API:「外部ツールがこのエンドポイントにPOSTしたときに実行」
一つ選ぶか、複数を組み合わせます。一つのルーティンが三つ全てのトリガーを持てます。
**ステップ5:作成をクリックして機能するのを見る。**
最初のルーティンが実行されます。ログを確認します。必要に応じてプロンプトを洗練させます。それだけです。
合計時間:10〜15分。
エンジニア不要。ビジュアルプログラミング不要。複雑な設定不要。
## ステップバイステップセットアップ:最初のルーティン(PRレビュー)
実際の例を構築しましょう。次の30分で動作するルーティンができます。
**構築するもの:**
- リポジトリでPRが開かれるたびに実行する
- セキュリティ、パフォーマンス、スタイルの問題についてコードをレビューする
- 問題のある行に詳細なコメントを残す
- サマリーをSlackに投稿する
**前提条件:**
- リポジトリを持つGitHubアカウント
- Claude ProまたはそれI以上(RoutinesにはウェブのClaude Codeの有効化が必要)
- 通知用のチャンネルを持つSlackワークスペース(オプションだが推奨)
**完全なセットアップ:**
ステップ1:claude.ai/code/routinesに移動して「新しいルーティン」をクリックします。
ステップ2:ルーティンに「自動PRコードレビュー」という名前を付けます。
ステップ3:プロンプトフィールドにこれを貼り付けます:
```
あなたは開発チームのエキスパートコードレビュアーです。
プルリクエストを受け取ったとき:
1. リポジトリをクローンして変更を読む
2. 以下についてコードをレビューする:
- セキュリティの脆弱性(SQLインジェクション、XSS、認証の問題、認証情報の露出)
- パフォーマンスの問題(N+1クエリ、非効率なループ、キャッシングの欠如)
- コード品質(不明確な変数名、欠落しているエラー処理、デザインパターン)
- テスト(重要なパスはテストされているか?)
3. 見つかった各問題について:
- 正確なファイルと行番号を特定する
- GitHubの問題を説明するインラインコメントを残す
- 修正を提案する(ただ批判するだけでなく)
4. PRにサマリーコメントを投稿する:
- 見つかった問題の数
- 深刻度の内訳(重大、高、中、低)
- 全体的な評価(「マージ準備完了」または「要改善」)
5. 重大なセキュリティ問題が見つかった場合、Slackにアラートを投稿する
徹底的かつサポート的に。目標はコードを良くすることで、厳しくすることではありません。
```
ステップ4:「リポジトリを追加」をクリックしてPRをレビューするGitHubリポジトリを選択します。GitHubはClaude GitHubアプリのインストールを促します(まだインストールしていない場合)。これにより、PRが開かれたときにClaudeがWebhookイベントを受け取ることができます。
ステップ5:今はデフォルト環境を使います。これでClaudeに標準的なネットワークアクセスと基本的な環境変数が与えられます。
ステップ6:Slackが接続されていれば自動的に含まれます。そうでなければ今はスキップします。
ステップ7:「トリガーを選択」の下でGitHubイベントを選択し、イベントタイプは「Pull request」、アクションは「pull_request.opened」を選びます。フィルターは空のままにします(全PRでトリガーされます)。
ステップ8:確認して「ルーティンを作成」をクリックします。
**ルーティンがライブになりました**
次にリポジトリでPRが開かれると、Claudeが自動的にレビューします。GitHubにインラインコメントとサマリーとして結果が表示されます。Slackを追加した場合はそこにもアラートが来ます。
**テスト方法:**
PRを待ちたくない場合は、ルーティンの詳細ページに移動して「今すぐ実行」をクリックします。リポジトリの最近のPRをレビューしようとします。
**改善方法:**
最初の実行はおそらく完璧ではないでしょう。結果を確認します。Claudeが何かを見逃した場合はプロンプトを更新します。「ルーティンを編集」をクリックして指示を調整します。再実行します。
例:
- コメントが多すぎる場合:「セキュリティとパフォーマンスのみに集中し、スタイルの好みは含めないで」
- 問題を見逃している場合:「データベースクエリとAPI呼び出しに特別に注意を払ってください」
- コメントが長すぎる場合:「コメントは簡潔に、問題ごとに1文」
実行するたびに学習して改善します。
## これが実際に可能にすること
PRレビューのルーティンが完成しました。しかし本当の価値は何が可能かを見ることです。
これが機能したら、次のようなものを構築できます:
- バックログのトリアージ。新しいIssueを読み、ラベルを適用し、オーナーを割り当てる
- デプロイ検証。各デプロイ後に本番が正常かどうか確認する
- ドキュメントドリフト検出。変更されたAPIを参照するドキュメントにフラグを立てる
- サポートチケットのトリアージ。サポートメールを読み、カテゴリ分けし、チケットを作成する
- 週次レポート。複数のソースからデータを引き出し、レポートを書き、送信する
それぞれのセットアップに15分かかります。それぞれが手動の繰り返し作業を置き換えます。
## 結論
Claude Code Routinesは別の自動化ツールではありません。
以前は複雑すぎて自動化できなかったことのための自動化です。
n8nはシンプルな統合に最適です。Routinesはコード、データ、ビジネスロジックについての推論に最適です。異なる仕事のための異なるツールです。
今素早く動いている企業は、複雑なn8nワークフローを構築していません。何が欲しいかをClaudeに説明して、10分で完成させています。
それがプレイです。
上のPRレビューのルーティンから始めましょう。機能させましょう。他に何を自動化できるか見てみましょう。プロンプト駆動のアプローチは、ビジュアルビルダーがかつてそうだったよりもはるかに遠くまで拡張します。
PS: 毎週、Build With AI ニュースレターの中でこのようなワークフローを解説しています。エージェント、自動化、そして自分でまたはクライアントに売れるステップバイステップのセットアップを紹介します。
無料でこちらから参加してください。

claude-workflowclaude-setupagent-ops
Claude Code Routinesの完全解説
♥ 148↻ 17
原文を表示 / Show original
Most people saw Anthropic announce Claude Code Routines and thought: "Another automation tool. We already have Make, Zapier, n8n."
Wrong. This is completely different.
Here's what actually changed, why it matters for your business, and exactly how to build your first routine in the next 30 minutes.
What Routines Does That Wasn't Possible Before
For years, the automation game was the same: drag and drop builders. Connect tool A to tool B. Click. Save. Hope it works.
The issue is that when something breaks (and it will), you're stuck. The automation hits an edge case. The tool changes its API. The workflow can't reason about the problem. You wake up at 3 AM to fix it.
Claude Code Routines flip this.
A routine isn't a workflow builder. It's Claude running on Anthropic's cloud infrastructure with access to your code repositories, your GitHub events, and external tools you connect. When it runs, it doesn't just execute a predefined sequence. It thinks. It reasons. It adapts.
Here's what that unlocks:
1. Intelligent reasoning about problems. A PR review routine doesn't just check if tests pass. It reads your codebase, understands your architectural patterns, and applies your team's actual review standards to every PR.
It catches security issues. It suggests performance improvements. It leaves inline comments on specific lines. A drag-and-drop tool can't do this. Claude can.
2. Code generation and fixes, not just status checks. When your production app breaks, a routine doesn't just alert you. It clones your repository, reads the error logs, diagnoses the root cause, writes the fix, tests it, and opens a pull request.
You review it. You merge it. Done. No more 2 AM debugging marathons.
3. Context awareness across systems. Your Slack channel has a support request. Your Linear board has related issues. Your GitHub has recent changes. A drag-and-drop builder connects these as separate steps.
Claude connects them as context. It reads all three, synthesizes the information, and takes the right action, not just a predefined one.
4. Natural language configuration, not visual programming. You don't click. You describe the job in English. "Review every PR for security issues, performance problems, and alignment with our coding standards. Leave comments. Post a summary to Slack." Done. Claude builds the logic.
5. Continuous improvement without rebuilds. If your routine isn't working perfectly, you don't redesign the workflow. You tell Claude what to improve. The routine learns from your feedback and adapts the next run. Drag-and-drop builders require you to rebuild everything.
This is why Routines is not another automation tool. It's a fundamentally different category.
How Routines Compete With n8n (And Why Claude Wins)
Let's be direct: n8n, Make, Zapier - they're all the same playbook. Visual builders. Pre-built connectors. Workflow as flow chart.
They're great for simple stuff: "When a new row is added to Airtable, send a Slack message."
But they fall apart on anything complex.
n8n's limits (that Routines solves):
Complexity = spaghetti flows. Your workflow has 50+ steps, 10+ conditions, retry logic, error handling. The diagram becomes unreadable. Maintenance is a nightmare. With Routines your prompt stays readable. Your intent is clear.
No reasoning about the problem. n8n is procedural. Step 1, then step 2, then step 3. No thinking. Claude reasons about your specific problem, your specific code, your specific business logic. Same inputs to n8n produce the same outputs. Same inputs to Claude might produce different outputs because it thought deeper.
Connector hell. Need a custom integration? n8n has 300+ prebuilt connectors. That sounds great until the tool you need isn't there. Or it is, but it doesn't support the specific API endpoint you need. You're stuck. Claude connects via HTTP, custom scripts, and MCP connectors. You can integrate anything.
Error handling is brittle. When n8n hits an error, it stops or retries blindly. Claude reads the error. Diagnoses it. Adapts. "The API returned a 429 rate limit error. Let me wait 5 minutes and retry." No configuration needed. It thinks.
Cost scales with complexity. n8n charges per task or per execution. Complex workflows = more tasks = higher bills. Claude charges per token. A 100-line prompt runs on the same token budget whether it's doing something simple or incredibly complex. More sophisticated logic doesn't cost more.
Where n8n still wins: Simple integrations. Tons of prebuilt connectors. Visual learners might prefer dragging blocks.
Where Routines wins: Complex automation. Reasoning about context. Edge case handling. Code generation. Custom integrations. Production workflows.
The companies using n8n for simple 3-step integrations are fine. The companies trying to automate complex business logic on n8n? They're drowning in spaghetti flows. Routines is for them.
How to Quickly Build Routines (Spoiler: It's Stupid Easy)
Most people overcomplicate this.
Here's the shortcut.
Step 1: Think about the job, not the steps.
Don't ask: "What steps do I need to automate?"
Ask: "What's the outcome I want?"
Examples:
"Automatically review every PR for security issues"
"Triage support emails and assign them to the right team member"
"Generate a weekly report from production logs and send to leadership"
"Monitor for API failures and open a fix PR"
One sentence. That's your routine.
Step 2: Write the prompt in English.
Go to claude.ai/code/routines and click New routine.
In the prompt field, describe the job:
"You are a code reviewer. When a PR is submitted:
Read the code changes
Check for security vulnerabilities
Look for performance issues
Check alignment with our coding standards
Leave inline comments on specific lines
Post a summary to Slack
Be thorough but constructive. Focus on issues, not style preferences."
That's it. That's your routine. No configuration. No clicking. Just English.
Step 3: Point it at your repos and connectors.
Add your GitHub repository. Claude clones it at runtime. Add your Slack connector. Claude can post messages. Add your environment variables if needed (API keys, etc.). Done.
Step 4: Choose a trigger.
Schedule: "Run every weeknight at 9 PM"
GitHub: "Run when a PR is opened"
API: "Run when an external tool POSTs to this endpoint"
Pick one or combine multiple. One routine can have all three triggers.
Step 5: Click Create and watch it work.
Your first routine runs. Check the logs. Refine the prompt if needed. That's it.
Total time: 10-15 minutes.
No engineers needed. No visual programming. No complex configuration.
Step-by-Step Setup: Your First Routine (PR Review)
Let's build a real example. You'll have a working routine in the next 30 minutes.
What We're Building
A routine that:
Runs every time a PR is opened on your repo
Reviews the code for security, performance, and style issues
Leaves detailed comments on problem lines
Posts a summary to Slack
Prerequisites
GitHub account with a repository
Claude Pro or higher (Routines need Claude Code on the web enabled)
Slack workspace with a channel for notifications (optional, but better)
The Full Setup
Step 1: Go to claude.ai/code/routines
Click "New routine" button.
Step 2: Name your routine
Name: "Automated PR Code Review"
Step 3: Write the prompt
Paste this into the prompt field:
You are an expert code reviewer for our development team.
When you receive a pull request:
1. Clone the repository and read the changes
2. Review the code for:
- Security vulnerabilities (SQL injection, XSS, auth issues, credential exposure)
- Performance issues (N+1 queries, inefficient loops, missing caching)
- Code quality (unclear variable names, missing error handling, design patterns)
- Testing (are critical paths tested?)
3. For each issue found:
- Identify the exact file and line number
- Leave an inline comment on GitHub explaining the issue
- Suggest a fix (don't just criticize)
4. Post a summary comment on the PR with:
- Number of issues found
- Severity breakdown (critical, high, medium, low)
- Overall assessment ("Ready to merge" or "Needs work")
5. If critical security issues are found, post an alert to Slack
Be thorough but supportive. The goal is to make the code better, not to be harsh.
Step 4: Select your repository
Click "Add repository" and select the GitHub repo you want to review PRs for.
GitHub will prompt you to install the Claude GitHub App if you haven't already. Do it. This lets Claude receive webhook events when PRs are opened.
Step 5: Select your environment
Use the default environment for now. This gives Claude standard network access and basic environment variables.
Step 6: Add connectors
If you have Slack connected, it's automatically included. If not, skip this for now.
Step 7: Add a GitHub trigger
Under "Select a trigger":
Choose "GitHub event"
Event type: "Pull request"
Action: "pull_request.opened"
Leave filters empty (triggers on all PRs)
Step 8: Review and create
Double-check everything looks right. Click "Create routine."
Your Routine Is Now Live
The next time someone opens a PR on your repository, Claude will automatically review it. You'll see the results in GitHub as inline comments and a summary. If you added Slack, you'll get an alert there too.
How to Test It
Don't want to wait for a PR? Go to the routine's detail page and click "Run now." It will try to review a recent PR from your repo.
How to Improve It
The first run probably won't be perfect. Check the results. If Claude missed something, update the prompt. Click "Edit routine" and adjust your instructions. Run again.
Examples:
If it's too nitpicky: "Focus only on security and performance, not style preferences"
If it's missing issues: "Pay special attention to database queries and API calls"
If comments are too long: "Keep comments concise, one sentence per issue"
Each time you run, it learns and improves.
What This Actually Enables
You now have a PR review routine. But the real value is seeing what's possible.
Once you have this working, you can build:
Backlog triaging. Routine reads new issues, applies labels, assigns owners
Deploy verification. Routine checks if production is healthy after each deploy
Documentation drift detection. Routine flags docs that reference changed APIs
Support ticket triage. Routine reads support emails, categorizes them, creates tickets
Weekly reporting. Routine pulls data from multiple sources, writes the report, sends it
Each one takes 15 minutes to set up. Each one replaces a manual, repetitive task.
The Bottom Line
Claude Code Routines isn't another automation tool.
It's automation for things that were too complex to automate before.
n8n is great for simple integrations. Routines is great for reasoning about your code, your data, your business logic. They're different tools for different jobs.
The companies moving fast right now are NOT building complex n8n workflows. They're describing what they want to Claude and getting it done in 10 minutes.
That's the play.
Start with the PR review routine above. Get it working. See what else you can automate. The prompt-driven approach scales way further than visual builders ever could.
PS: Every week I break down workflows like this inside the Build With AI newsletter. Agents, automations, and step-by-step setups you can run yourself or sell to clients.
Join (free) here.