記事一覧へ
# 15分で私のツールチェーン全体を置き換えたスタック
ほとんどの開発者はClaude Codeをインストールし、ひとつのプロンプトを入力し、感動して、適切に設定することなく終わる。
フェラーリを1速で運転している。
Claude Codeを適切なセットアップで——プロジェクトを知っているCLAUDE.md、自動発火する5つのスキル、標準を強制するフック、ツールを接続するMCPサーバー——使うのは、箱から出したままのClaude Codeとは根本的に異なる体験だ。
30日間両方のバージョンを使ったから分かる。設定なしのバージョンは良かった。設定済みのバージョンは私のツールチェーン全体を置き換えた。Cursor、Copilot、Grammarly、リンタービューダッシュボード、PRレビュープロセス。全部。
このガイドは15分でゼロから完全に設定されたClaude Code環境に持っていく。すべてのステップに正確なコマンドがある。すべてのスキルに正確な.mdファイルがある。何も理論的ではない。
最後には、95%のClaude Codeユーザーが存在を知らないセットアップができている。
構築しよう。
## ステップ1:Claude Codeをインストール(2分)
ネイティブインストーラーが今は推奨方法だ。Node.jsは不要。バックグラウンドで自動更新される。
**macOS:**
ターミナルを開いて貼り付け:
```
curl -fsSL https://cli.claude.com/install.sh | sh
```
**Linux (Ubuntu/Debian):**
```
curl -fsSL https://cli.claude.com/install.sh | sh
```
**Windows (PowerShell):**
```
irm https://cli.claude.com/install.ps1 | iex
```
**Windows (CMD):**
```
curl -fsSL https://cli.claude.com/install.bat | cmd
```
確認:
```
claude --version
```
バージョン番号が見えるはず。以上でインストール完了。
重要:Claude Proサブスクリプション(月額$20)以上が必要。無料ティアはClaude Codeを含まない。すでにClaude chatに月額$20払っているなら、すでにClaude Codeへのアクセス権がある。ただまだ使っていないだけだ。
認証:
任意のプロジェクトフォルダに移動して:
```
claude
```
ブラウザのプロンプトに従ってログイン。30秒かかる。
## ステップ2:CLAUDE.mdを作成する(3分)
これがほとんどの人が作らない、最も重要なファイルだ。
CLAUDE.mdはプロジェクトの機関的な記憶だ。Claudeはすべてのセッションの開始時にそれを読む。プロジェクトのコンベンション、アーキテクチャ、テクノロジースタック、好みを伝える。なければClaude Codeは毎回ゼロから始まる。あればClaude Codeはひとつのプロンプトを入力する前にすでにプロジェクトを知っている。
考え方:CLAUDE.mdはコードベースを一度も見たことないコントラクターを雇うことと、すべてのドキュメントを読んだチームメイトをオンボードすることの違いだ。
プロジェクトルートに移動してファイルを作成:
```
touch CLAUDE.md
```
またはClaude Codeに書かせる:
```
claude
"Analyze this codebase and generate a CLAUDE.md file that
describes the project structure, tech stack, conventions,
and any patterns you find in the code."
```
Claude Codeがファイルをスキャンして、プロジェクトに合わせたCLAUDE.mdを生成する。レビューして、編集して、リポジトリにコミットする。
良いCLAUDE.mdには以下が含まれる:
- **プロジェクト概要**:これが何か、何をするか、誰のためか
- **テクノロジースタック**:言語、フレームワーク、データベース、デプロイ先
- **ディレクトリ構造**:どこに何があるか、なぜか
- **コンベンション**:命名パターン、ファイル構成、テスト戦略
- **やること・やらないこと**:「常にTypeScript strictモードを使う」「anyタイプは絶対使わない」「テストはテストするファイルの隣の__tests__/に置く」
- **共通コマンド**:devサーバーの実行方法、テストの実行、デプロイ方法
Next.jsプロジェクトのCLAUDE.md例:
```markdown
# Project: InvoiceFlow
## Overview
SaaS invoicing app built with Next.js 14, TypeScript,
Supabase, and Stripe. Deployed on Vercel.
## Stack
- Next.js 14 (App Router)
- TypeScript (strict mode, no `any`)
- Supabase (auth, database, storage)
- Stripe (payments, subscriptions)
- Tailwind CSS (no custom CSS files)
- Vitest for testing
## Conventions
- Components: PascalCase, one component per file
- API routes: /app/api/[resource]/route.ts
- Server actions: /app/actions/[name].ts
- Tests: colocated in __tests__/ folders
- Commits: conventional commits (feat:, fix:, etc.)
## Commands
- Dev: pnpm dev
- Test: pnpm test
- Build: pnpm build
- Lint: pnpm lint
```
このファイルをコミットする。Claude Codeを使うチームのすべての開発者が自動的に同じコンベンションを継承する。
## ステップ3:最初の5つのスキルをインストール(5分)
スキルは特定のタイプの仕事のやり方をClaude Codeに教える永続的な.mdファイルだ。タスクが一致すると自動的に発火する。プロンプト不要。再説明不要。Claude Codeはただ知っている。
インパクトの順序で、初日にすべての開発者がインストールすべき5つのスキルを紹介する。
**スキル1:スキルクリエーター**
スキルを構築するスキル。まずこれをインストールする——その後のすべてのカスタムスキルを構築するために使うから。
```
npx skills@latest add anthropics/skills/skill-creator
```
インストールしたら、Claudeに言うだけ:「スキルクリエーターを使って[タスク]のためのスキルを構築するのを手伝って」Claude Codeがインタビューし、SKILL.mdを書き、保存する。
**スキル2:TDD(テスト駆動開発)**
厳格なレッド・グリーン・リファクタリングループを強制する。まず失敗するテストを書き、それをパスするための最小限のコードを書き、リファクタリングする。「動いているが誰もなぜ分からない」問題を防ぐ。
```
npx skills@latest add mattpocock/skills/tdd
```
**スキル3:体系的デバッグ**
「とにかく何か変えてみる」編集を止める4フェーズのデバッグ手法。再現、根本原因の特定、単一の修正適用、テストで検証。
```
git clone https://github.com/obra/superpowers
cp -r superpowers/skills/systematic-debugging .claude/skills/
```
**スキル4:コードレビュー**
体系的なセキュリティ、パフォーマンス、エラーハンドリング、アーキテクチャのチェックを実行する。「セキュリティファーストレビュー」「パフォーマンスファーストレビュー」「完全チェックリスト」を依頼できる。
```
npx skills@latest add anthropics/skills/code-review
```
**スキル5:自動コミットメッセージ**
ステージングされたdiffを読み込み、タイプ、スコープ、本文を含むconventional commitメッセージを生成する。深夜2時に「fix stuff」と書くことはもうない。
```
npx skills@latest add anthropics/skills/auto-commit
```
**スキルの保存場所:**
スキルは.claude/skills/フォルダにインストールされる。セッションをまたいで永続する。Claude Codeが動くすべてのプロジェクトで機能する。一度インストールすれば永遠に複利で増える。
**3会話ルール:**
同じ指示を3回以上入力したなら、それはスキルになりたがっている。入力し続けるのをやめろ。スキルクリエーターを使って一度構築する。
## ステップ4:Gitガードレールを設定(1分)
プロダクションリポジトリでClaude Codeを使っているなら任意ではない。
Claude Codeは実行前に `push --force`、`reset --hard`、`clean` などの危険なコマンドをブロックする:
```
npx skills@latest add mattpocock/skills/git-guardrails-claude-code
```
1分かかり、いずれコードベースを救う。
## ステップ5:MCPサーバーを接続(2分)
MCP(Model Context Protocol)はClaude Codeを「コーディングアシスタント」から「データベース、API、チームツールへの直接アクセスを持つコーディングアシスタント」に変える。
MCPなしでは、Claude Codeはファイルしか見えない。MCPありでは、データベースのクエリ、GitHubイシューの読み込み、Slackメッセージの確認、APIとのやりとりができる。
プロジェクトルートに `.claude/.mcp.json` を作成:
```json
{
"mcpServers": {
"github": {
"type": "stdio",
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-github"],
"env": {
"GITHUB_PERSONAL_ACCESS_TOKEN": "your-token-here"
}
}
}
}
```
始めるのに役立つ人気のMCPサーバー:
- **GitHub**:イシューを読む、PRを作成する、コードをレビューする。ほとんどの開発者に最も便利なサーバー
- **Filesystem**:プロジェクトルート外のディレクトリへのアクセスを許可する。モノリポに必須
- **PostgreSQL / Supabase**:Claude Codeがスキーマを推測する代わりにデータベースを直接クエリできる
- **Slack**:メッセージを検索、チャンネルを読む、更新を投稿する
`.claude/.mcp.json` をリポジトリにコミットする。プロジェクトをプルするすべてのチームメンバーが同じツールセットアップを自動的に継承する。
## ステップ6:最初のフックを追加(2分)
フックはライフサイクルイベントでカスタムスクリプトを注入させる。gitフックのClaude Code版と考えて。
最もすぐに役立つフック:すべてのファイル保存で自動フォーマット。
`.claude/hooks/pre-tool-use.sh` を作成:
```bash
#!/bin/bash
# Run prettier on any file Claude edits
if [ "$TOOL_NAME" = "file_edit" ]; then
npx prettier --write "$FILE_PATH" 2>/dev/null
fi
```
実行可能にする:
```
chmod +x .claude/hooks/pre-tool-use.sh
```
チームが使う他のフック:
- `post-tool-use`:すべてのコード編集後にリンター実行
- `on-session-start`:プロジェクト固有の環境変数を読み込む
- `pre-commit`:Claude Codeがコミットする前にコード品質を検証
フックは強制レイヤーだ。スキルはClaude Codeに働き方を教える。フックはあなたが見ていなくてもルールに従うことを保証する。
## 構築したもの
15分で今あなたは持っている:
- 自動更新付きのClaude Codeインストール
- プロジェクトのスタック、コンベンション、コマンドをClaude Codeに永続的に記憶させるCLAUDE.md
- 5つのスキル:スキルクリエーター、TDD、体系的デバッグ、コードレビュー、自動コミット。すべて関連するときに自動発火
- プロダクションブランチを破壊的なコマンドから守るGitガードレール
- GitHubにClaude Codeを接続するMCPサーバー
- Claude Codeが編集するすべてのファイルでPrettierを自動実行するフォーマットフック
これはバニラClaude Codeと同じツールではない。これは複利で増える設定済みの開発環境だ。追加するすべてのスキル、書くすべてのフック、CLAUDE.mdに記録するすべてのコンベンションが、すべての将来のセッションをより良くする。
ほとんどの開発者はClaude Codeをチャットボットのように使っている。あなたは今エンジニアリングプラットフォームとして使っている。
## 最初の7日間にすること
**1〜2日目**:デフォルトスタックを使う。他には何も追加しない。実際のタスクを実行する。Claude Codeがすでにコンベンションを知っているところ(CLAUDE.mdのおかげで)と知らないところに気づく。
**3〜4日目**:最初のカスタムスキルを構築する。すでに3回プロンプトしたタスクを特定する。スキルクリエーターを使う:「[そのタスク]のためのスキルを構築するのを手伝って」Claude Codeがインタビューし、SKILL.mdを下書きし、インストールする。10分、永続的な結果。
**5〜6日目**:計画スキルを追加する。Grill Me(間違ったものを構築する前に容赦ない明確化の質問を強制する)とWrite a PRD(インタラクティブなインタビューで製品要件ドキュメントを作成する)をインストールする:
```
npx skills@latest add mattpocock/skills/grill-me
npx skills@latest add mattpocock/skills/write-a-prd
```
**7日目**:監査と拡張。今やスタックに何が欠けているかが明確になる。コミュニティスキルのSkillsMP (skillsmp.com)を閲覧する。公式スキルのAnthropicスキルリポジトリを確認する。実際の問題を解決するものを追加する。それ以外はすべて無視する。
## 誰も教えてくれない正直な部分
**3日目が多くの人が諦めるところだ。**
最初の興奮が薄れる。スキルが望まない時に発火する。CLAUDE.mdに少し間違ったコンベンションがあってClaude Codeがそれに従い続ける。「これはただプロンプトするより多くの作業だ」と思う。
より多くの作業だ。3日目は。10日目には劇的に少ない作業になる。30日目には、毎回プロジェクトを再説明することがどんな感じだったか忘れている。
それが複利だ。セットアップコストは本物だ。見返りは永続的だ。
**レート制限も本物だ。**
Claude Pro(月額$20)では、重いコーディングセッション中にレート制限に当たる。コミュニティのコンセンサスは:Proはワークフローの80%を処理する。1日6時間以上コーディングしているなら、Maxプラン(月額$100)がほとんどの制限を取り除く。Proで始めろ。実際に上限に当たったときだけアップグレードする。
## 15分チャレンジ
今後15分にこれをやってほしい:
1. Claude Codeをインストール(2分)
2. Claude Codeに CLAUDE.md を生成させる(3分)
3. 5つのスターターコルをインストール(5分)
4. Gitガードレールを追加(1分)
5. ひとつのMCPサーバーを接続(2分)
6. Prettierフックを追加(2分)
そして実際のプロジェクトを開いて実際のタスクをClaude Codeに与えよう。「hello worldを書け」ではない。今日実際に取り組むもの。
その最初のセッションと以前のClaude Code体験の違いは微妙ではない。
明らかだ。そして永続的だ。

claude-setupharness-designclaude-workflow
15分でClaude Codeを完全設定する方法
♥ 115↻ 16
原文を表示 / Show original
(The 15-Minute Stack That Replaced My Entire Toolchain)
Most developers install Claude Code, type one prompt, get impressed, and never configure it properly.
They're using a Ferrari in first gear.
Claude Code with a proper setup, a CLAUDE.md that knows your project, five skills that fire automatically, hooks that enforce your standards, and MCP servers that connect your tools, is a fundamentally different experience from Claude Code out of the box.
I know because I ran both versions for 30 days. The unconfigured version was good. The configured version replaced my entire development toolchain. Cursor, Copilot, Grammarly, my linter dashboard, my PR review process. All of it.
This guide takes you from zero to a fully configured Claude Code environment in 15 minutes. Every step has the exact command. Every skill has the exact .md file. Nothing is theoretical.
By the end, you'll have a setup that 95% of Claude Code users don't know exists.
Let's build it.
Step 1: Install Claude Code (2 minutes)
The native installer is now the recommended method. No Node.js required. It auto-updates in the background.
macOS:
Open Terminal and paste:
curl -fsSL https://cli.claude.com/install.sh | sh
Linux (Ubuntu/Debian):
curl -fsSL https://cli.claude.com/install.sh | sh
Windows (PowerShell):
irm https://cli.claude.com/install.ps1 | iex
Windows (CMD):
curl -fsSL https://cli.claude.com/install.bat | cmd
Verify it worked:
claude --version
You should see a version number. That's it. Installation is done.
Important: You need a Claude Pro subscription ($20/month) or higher. The free tier does not include Claude Code.
If you're already paying $20/month for Claude chat, you already have Claude Code access. You just haven't used it yet.
Authenticate:
Navigate to any project folder and type:
claude
Follow the browser prompts to log in. Takes 30 seconds.
Step 2: Create Your CLAUDE.md (3 minutes)
This is the single most important file most people never create.
CLAUDE.md is your project's institutional memory. Claude reads it at the start of every session. It tells Claude your project's conventions, architecture, tech stack, and preferences. Without it, Claude starts from zero every time. With it, Claude already knows your project before you type a single prompt.
Think of it this way: CLAUDE.md is the difference between hiring a contractor who's never seen your codebase and onboarding a teammate who's read all the docs.
Navigate to your project root and create the file:
touch CLAUDE.md
Or even better, let Claude write it for you:
claude
"Analyze this codebase and generate a CLAUDE.md file that
describes the project structure, tech stack, conventions,
and any patterns you find in the code."
Claude will scan your files and generate a CLAUDE.md tailored to your project. Review it, edit it, commit it to your repo.
Here's what a good CLAUDE.md includes:
Project overview: what this is, what it does, who it's for.
Tech stack: language, framework, database, deployment target.
Directory structure: where things live and why.
Conventions: naming patterns, file organization, test strategy.
Do's and don'ts: "Always use TypeScript strict mode." "Never use any type." "Tests go in __tests__/ next to the file they test."
Common commands: how to run the dev server, run tests, deploy.
Example CLAUDE.md for a Next.js project:
# Project: InvoiceFlow
## Overview
SaaS invoicing app built with Next.js 14, TypeScript,
Supabase, and Stripe. Deployed on Vercel.
## Stack
- Next.js 14 (App Router)
- TypeScript (strict mode, no `any`)
- Supabase (auth, database, storage)
- Stripe (payments, subscriptions)
- Tailwind CSS (no custom CSS files)
- Vitest for testing
## Conventions
- Components: PascalCase, one component per file
- API routes: /app/api/[resource]/route.ts
- Server actions: /app/actions/[name].ts
- Tests: colocated in __tests__/ folders
- Commits: conventional commits (feat:, fix:, etc.)
## Commands
- Dev: pnpm dev
- Test: pnpm test
- Build: pnpm build
- Lint: pnpm lint
Commit this file. Every developer on your team who uses Claude Code will inherit the same conventions automatically.
Step 3: Install Your First Five Skills (5 minutes)
Skills are persistent .md files that teach Claude how to do specific types of work. They fire automatically when the task matches. No prompting. No re-explaining. Claude just knows.
Here are the five skills every developer should install on day one, in order of impact.
Skill 1: Skill Creator
The skill that builds skills. Install this first because you'll use it to build every custom skill after.
npx skills@latest add anthropics/skills/skill-creator
Once installed, just tell Claude: "Use the skill-creator to help me build a skill for [your task]." It interviews you, writes the SKILL.md, and saves it.
Skill 2: TDD (Test-Driven Development)
Forces a strict red-green-refactor loop. Writes failing tests first, then minimal code to pass them, then refactors. Prevents the "it works but nobody knows why" problem.
npx skills@latest add mattpocock/skills/tdd
Skill 3: Systematic Debugging
A 4-phase debugging methodology that stops random "just try changing stuff" edits. Reproduce, narrow the root cause, apply a single fix, verify with tests.
Install from the Superpowers repo:
git clone https://github.com/obra/superpowers
cp -r superpowers/skills/systematic-debugging .claude/skills/
Skill 4: Code Review
Runs systematic security, performance, error handling, and architecture checks. Ask for a "security-first review" or "performance-first review" or a full checklist pass.
Available in the Anthropic skills repo. Add it manually or install via:
npx skills@latest add anthropics/skills/code-review
Skill 5: Auto-Commit Messages
Reads your staged diff and generates a conventional commit message with type, scope, and body. No more writing "fix stuff" at 2am.
npx skills@latest add anthropics/skills/auto-commit
Where skills live:
Skills install to your .claude/skills/ folder. They persist across sessions. They work in every project where Claude Code runs. You install once and they compound forever.
The 3-conversation rule:
If you've typed the same instructions more than three times, that's a skill begging to be built. Stop retyping. Use the skill-creator to build it once.
Step 4: Set Up Git Guardrails (1 minute)
This is not optional if you're using Claude Code on production repos.
Claude is fast and helpful until it isn't. Git guardrails block dangerous commands like push --force, reset --hard, and clean before they execute.
npx skills@latest add mattpocock/skills/git-guardrails-claude-code
This sets up Claude Code hooks that intercept git commands and ask for confirmation before anything destructive runs. It takes one minute and it will save your codebase eventually.
Step 5: Connect MCP Servers (2 minutes)
MCP (Model Context Protocol) turns Claude Code from "coding assistant" into "coding assistant with direct access to your databases, APIs, and team tools."
Without MCP, Claude can only see your files. With MCP, Claude can query your database, read your GitHub issues, check your Slack messages, and interact with your APIs.
Create a .claude/.mcp.json in your project root:
{
"mcpServers": {
"github": {
"type": "stdio",
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-github"],
"env": {
"GITHUB_PERSONAL_ACCESS_TOKEN": "your-token-here"
}
}
}
}
Popular MCP servers to start with:
GitHub: Read issues, create PRs, review code. The most useful server for most developers.
Filesystem: Give Claude access to directories outside your project root. Essential for monorepos.
PostgreSQL / Supabase: Let Claude query your database directly instead of guessing at schema.
Slack: Claude can search messages, read channels, and post updates.
Commit your .claude/.mcp.json to the repo. Every team member who pulls the project inherits the same tool setup automatically.
Step 6: Add Your First Hook (2 minutes)
Hooks let you inject custom scripts at lifecycle events. Think of them as git hooks but for Claude Code.
The most immediately useful hook: auto-format on every file save.
Create .claude/hooks/pre-tool-use.sh:
#!/bin/bash
# Run prettier on any file Claude edits
if [ "$TOOL_NAME" = "file_edit" ]; then
npx prettier --write "$FILE_PATH" 2>/dev/null
fi
Make it executable:
chmod +x .claude/hooks/pre-tool-use.sh
Other hooks teams use:
post-tool-use: Run linter after every code edit.
on-session-start: Load project-specific environment variables.
pre-commit: Validate code quality before Claude commits.
Hooks are the enforcement layer. Skills teach Claude how to work. Hooks ensure it follows your rules even when you're not watching.
What You Just Built
In 15 minutes you now have:
Claude Code installed with auto-updates.
CLAUDE.md giving Claude persistent memory of your project's stack, conventions, and commands.
Five skills: skill-creator, TDD, systematic debugging, code review, and auto-commit. All firing automatically when relevant.
Git guardrails protecting your production branches from destructive commands.
MCP servers connecting Claude to GitHub (and optionally your database, Slack, and APIs).
A formatting hook that auto-runs Prettier on every file Claude edits.
This is not the same tool as vanilla Claude Code. This is a configured development environment that compounds. Every skill you add, every hook you write, every convention you document in CLAUDE.md makes every future session better.
Most developers are running Claude Code like a chatbot. You're now running it like an engineering platform.
What to Do Next: The First 7 Days
Day 1-2: Use the default stack.
Don't add anything else yet. Run real tasks. Notice where Claude already knows your conventions (because of CLAUDE.md) and where it doesn't.
Day 3-4: Build your first custom skill.
Identify the task you've prompted for three times already. Use the skill-creator: "Help me build a skill for [that task]." Claude interviews you, drafts the SKILL.md, and you install it. Ten minutes, permanent result.
Day 5-6: Add planning skills.
Install Grill Me (forces relentless clarifying questions before you build the wrong thing) and Write a PRD (creates product requirement docs through interactive interview):
npx skills@latest add mattpocock/skills/grill-me
npx skills@latest add mattpocock/skills/write-a-prd
Day 7: Audit and expand.
By now you'll have a clear picture of what your stack is missing. Browse SkillsMP (skillsmp.com) for community skills. Check the Anthropic skills repo for official ones. Add what solves a real problem. Ignore everything else.
The Honest Part Nobody Tells You
Day 3 is where most people quit.
The initial excitement fades. A skill fires when you don't want it to. The CLAUDE.md has a convention that's slightly wrong and Claude keeps following it. You'll think "this is more work than just prompting."
It is more work. On day 3. By day 10, it's dramatically less work. By day 30, you've forgotten what it felt like to re-explain your project every session.
That's the compounding. The setup cost is real. The payoff is permanent.
Rate limits are also real.
On Claude Pro ($20/month), you'll hit rate limits during heavy coding sessions. The community consensus is: Pro handles 80% of workflows. If you're coding 6+ hours a day, the Max plan at $100/month removes most limits. Start with Pro. Upgrade only when you actually hit the ceiling.
The 15-Minute Challenge
You just read 2,500 words about setting up Claude Code. Here's what I want you to do in the next 15 minutes:
Install Claude Code (2 minutes).
Let Claude generate your CLAUDE.md (3 minutes).
Install the five starter skills (5 minutes).
Add git guardrails (1 minute).
Connect one MCP server (2 minutes).
Add the Prettier hook (2 minutes).
Then open a real project and give Claude a real task. Not "write hello world." Something you'd actually work on today.
The difference between that first session and the Claude Code experience you had before won't be subtle.
It will be obvious. And it will be permanent.
Send this to the developer on your team who installed Claude Code once, tried one prompt, and went back to Cursor. They didn't see the real tool. Now they will.