Session 1 - Why & How
202604 | PM | 30 min
| Chat | Cowork | ide-editor | Claude Code | |
|---|---|---|---|---|
| 代表 | Claude.ai, ChatGPT | Claude Desktop Cowork | Cursor, Copilot, Windsurf | Claude Code CLI / Desktop / VS Code |
| 介面 | 網頁 / app 對話框 | Claude Desktop GUI | IDE 內嵌 | Terminal / VS Code |
| 記憶 | 無 | memory + Projects | 當前專案檔案 | CLAUDE.md, rules, memory, skills |
| 能接什麼 | 搜尋、上傳 | 本機檔案、plugins、computer use | 讀寫程式碼 | Terminal、檔案系統、MCP |
| 自動化 | 無 | scheduled tasks、plugins | 無 | skills、hooks、cron triggers |
| 可控範圍 | 零 | GUI 設定範圍內 | 當前專案 | 整個系統 |
| 面向 | Cowork | Claude Code |
|---|---|---|
| 設定方式 | GUI,開箱即用 | 文字檔,你自己架構 |
| 客製化 | plugins(官方 / 企業提供) | 無上限(skills, rules, hooks 都是你寫的 markdown) |
| 透明度 | 背景執行,看結果 | 每步都在 terminal,看得到過程 |
| 版本控制 | 無 | 所有設定都是檔案 → git track |
| 外部整合 | plugins + computer use | MCP servers → API 層級串接 |
差別在誰擁有架構。Cowork → Anthropic 預設環境。Claude Code → 可被客製化環境。
情境:查上週 Slack 裡跟 campaign 相關的討論
CLAUDE.md 寫了你管什麼產品
→ Slack skill 定義好搜哪些頻道
→ MCP server 連 Slack API
設定一次,之後每次都在。
claude.ai 註冊帳號(Google / Email)console.anthropic.com 取得 API key(或用 OAuth 登入)已經有 npm 的人跳過這步。Terminal 打 npm -v 有版號就是裝好了。
$ brew install node # macOS 用 Homebrew
沒有 Homebrew?到 nodejs.org 下載 macOS installer 也可以。
$ npm install -g @anthropic-ai/claude-code
github.com/plaxieappier/claude-code-starter 確認你有權限看到這個 repo
$ gh repo fork plaxieappier/claude-code-starter --clone
$ cd claude-code-starter
$ cd claude-code-starter
$ claude
首次啟動會要求登入,照畫面指示完成 OAuth 或輸入 API key。
讀一下 CLAUDE.md,告訴我這個 repo 的結構
Claude 能正確描述目錄結構就代表環境 OK。
建一個空目錄,啟動 Claude,貼上以下 prompt 讓它幫你建完整環境:
$ mkdir claude-code-starter # 建立專案資料夾
$ cd claude-code-starter # 進入資料夾
$ claude # 啟動 Claude Code
幫我初始化 Claude Code 練習環境:
1. 建 CLAUDE.md,內容先放 placeholder
2. 建 .claude/rules/language.md,規則:回覆用繁體中文
3. 建 .claude/commands/ 空目錄
4. 建 workspace/ 放三個模擬文件(會議記錄、專案 brief、週報)
原則:CLAUDE.md 控制在 150 行以內,太長 Claude 會忽略。
幫我用以下架構建 CLAUDE.md:
1. Directory Overview — 目錄和用途
2. 常用流程 — 重複做的事
3. 工具清單 — 指令和自動化
4. 偏好 — 語言、格式、風格
我的資訊:
- 我是 [你的名字],[團隊] PM,負責 [產品]
- 目前專案:[專案 A]、[專案 B]
- 工作目錄:[你的資料夾]
- 偏好繁體中文,技術名詞保留英文
# CLAUDE.md
This file provides guidance to Claude Code
when working with code in this repository.
## Directory Overview
General project workspace containing
multiple independent projects.
Each subdirectory may have its own CLAUDE.md.
| Directory | Description |
|------------------------|--------------------------|
| kb/ | Obsidian vault (iCloud) |
| health-data/ | Apple Watch health data |
| log/ | Daily logs (via /today) |
| auto-rev-est-modeling/ | Rev-est pipeline (work) |
| shape/ | Trading Desk PM Dashboard|
| juliano/ | Agent workspace (rsync) |
| random/ | Scratch notes |
## Daily Log Commands
When user says "/today" or "wrap up today":
1. Run git log --oneline --since="00:00"
2. Summarize current Claude session
3. Extract 3-5 keyword tags
4. Append entry to log/YYYY-MM.md
## Capabilities
Full registry at .claude/REGISTRY.md
Skills (15): health, kb, github,
kickoff, jiraconf, rev-est, slack, ...
Utilities: tab-title, timer,
patch-theme, sync-openclaw, ...
Automations: daily-health,
morning-report, stock-tw, stock-us, ...
Prompt Templates: council
Global slash commands:
/health /jiraconf /kickoff /mentor /slack
## Codex CLI (Dual-Agent Setup)
Claude Code + Codex CLI side by side.
- Each agent owns its own config
- See .claude/rules/codex-handoff.md
寫在 Claude Code 裡面,開箱即用
| 類別 | 指令 | 用途 |
|---|---|---|
| Context | /clear | 清除對話,重新開始 |
/compact | 壓縮對話,保留重點 | |
/memory | 管理跨對話記憶 | |
| 設定 | /config | 偏好設定 |
/permissions | 工具權限管理 | |
/model | 切換模型 | |
/mcp | MCP server 管理 | |
| 系統 | /help | 查看說明 |
/cost | 查看本次花費 | |
/status | 狀態總覽 | |
/doctor | 環境診斷 | |
/login /logout | 登入登出 |
| 等級 | 說明 | 背後元件 |
|---|---|---|
| Prompt Template | 存一段 prompt 變成 /指令 | .claude/commands/*.md |
| Utility | 一個 shell 動作 | .claude/bin/ shell script |
| Automation | 排程自動跑,不需要人觸發 | .github/workflows/ YAML |
| Skill | 多步驟流程 + 外部 API | .claude/skills/ SKILL.md + MCP |
從一個 .md 檔開始製作 Prompt Template 。
| 沒有指令 | 有指令 |
|---|---|
| 每次重新打一段 prompt | 打 /kickoff 就跑 |
| 每次格式不一樣 | 產出結構固定、可預期 |
| 換人就要重新教 | 分享 .md 檔就能複製流程 |
你寫的 prompt → 存成 .md 檔 → 變成 /指令
"逐一問我四個問題: .claude/commands/ /kickoff
目標、對象、限制、 kickoff.md
產出..."
原則:一件事重複三次以上,就存成 Claude 重複執行的 SOP。
幫我建一個 /kickoff 指令。
存成 .claude/commands/kickoff.md。
內容:當我打 /kickoff 的時候,逐一問我四個問題:
1. 這個專案的目標是什麼?(一句話) 2. 對象是誰?
3. 三個條件或限制?(時間、預算、範圍等) 4. 產出為何?
整理成結構化 kickoff doc,建議 next step。
建好後試跑:
/kickoff 寫這個 repo 的使用說明書,對象:新進同事,條件:一頁以內且包含安裝步驟,產出:README.md
不滿意 → 跟 Claude 說怎麼改 → 它更新 kickoff.md → 再跑一次。
/clear
切換任務前先清 context。Claude 的 context window 是有限資源 → 累積太多不相關的對話會讓它表現變差。
養成習慣:換話題就 /clear。
/compact
對話太長但不想全部清掉 → /compact 讓 Claude 壓縮保留重點。
目前 claude-code-starter 就是這個結構的簡化版(進階模式後續再聊。)
ref: Best Practices for Claude Code
claude-code-starter/
│
CLAUDE.md 你是誰、管什麼、偏好什麼
│
.claude/
├── commands/ 存 prompt 變成 /指令
│ kickoff.md ← 你剛建的
│
├── rules/ 行為邊界
│ language.md ← 已內建
│
├── memory/ 跨對話保留的 context
│ Claude 自動寫入
│
├── hooks/ 事件觸發的自動動作
│ commit 前跑 lint push 後通知 Slack
│
└── MCP servers 外部 API 串接
Slack Jira Google Sheets
你的工作是管理 Claude
/kickoff 調教好,讓它適用於任何專案/xxx打 /cost 可以看到本次 session 的 token 用量和花費。
另外,畫面最下方的 status bar 也會即時顯示目前的 context 使用比例。
兩者都可以,取決於你放的位置:
| 放置位置 | 範疇 | 適用情境 |
|---|---|---|
專案/.claude/commands/ | 僅該專案 | 專案特有的流程 |
~/.claude/commands/ | 所有專案 | 跨專案通用的指令 |
同理適用於 rules/ 和 skills/。
Automation 比較特殊,因為它綁定 GitHub Actions,只在該 repo 內運作。
在輸入框打 @ 會跳出檔案選單,選取後 Claude 會自動讀取該檔案的內容。
也可以直接打完整路徑,例如 @src/app.ts。
可以。Claude Code 是多模態的,支援 PNG、JPG 等圖檔。三種方式: