橙nalson
    • Create new note
    • Create a note from template
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Write
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
    • Invite by email
      Invitee

      This note has no invitees

    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note No publishing access yet

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.

      Your account was recently created. Publishing will be available soon, allowing you to share notes on your public page and in search results.

      Your team account was recently created. Publishing will be available soon, allowing you to share notes on your public page and in search results.

      Explore these features while you wait
      Complete general settings
      Bookmark and like published notes
      Write a few more notes
      Complete general settings
      Write a few more notes
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Note Insights New
    • Make a copy
    • Transfer ownership
    • Delete this note
    • Save as template
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Note Insights Versions and GitHub Sync Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
Make a copy Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Write
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
  • Invite by email
    Invitee

    This note has no invitees

  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note No publishing access yet

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.

    Your account was recently created. Publishing will be available soon, allowing you to share notes on your public page and in search results.

    Your team account was recently created. Publishing will be available soon, allowing you to share notes on your public page and in search results.

    Explore these features while you wait
    Complete general settings
    Bookmark and like published notes
    Write a few more notes
    Complete general settings
    Write a few more notes
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Clipboard
       Owned this note    Owned this note      
    Published Linked with GitHub
    2
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    # Anthropic 黑客松冠軍開源完整 Claude Code 配置:Everything Claude Code ## 專案背景 ![image](https://hackmd.io/_uploads/Hyxq0PewZx.png) [Everything Claude Code](https://github.com/affaan-m/everything-claude-code) 由 Affaan 開發,他是 **2025 年 9 月 Anthropic x Forum Ventures 黑客松的冠軍**。這個專案收錄了他在實際產品開發中使用的完整 Claude Code 配置,包括用於建構 zenith.chat 的所有工具鏈。 這不只是一套提示詞,而是一套經過生產環境驗證、結構完整的 **AI 編程工作系統**。 ## 什麼是Anthropic x Forum Ventures黑客松? 黑客松(Hackathon)是一種限時開發競賽,參賽者需要在短時間內(通常 24-48 小時)從零開始建構出能運作的產品。Anthropic 黑客松聚集了最會運用 AI 工具的開發者,比拼的是: - 如何最大化 AI 的生產力 - 如何設計高效的 AI 協作工作流 - 如何快速將想法轉化為可用產品 **Affaan 的勝出意味著**:他的 Claude Code 使用方式和配置,在眾多頂尖開發者中脫穎而出,被證明是最有效的方案之一。 ## 為什麼這套配置值得關注? ### 1. 實戰驗證,不是理論 這套配置不是為了展示而寫的範例,而是: - 用於建構真實產品(zenith.chat) - 在高壓環境(黑客松 24-48 小時)中被驗證有效 - 持續在多個生產專案中使用和優化 ### 2. 系統化架構 包含完整的四層架構: ``` Agents(代理) → 專門化的 AI 子系統 Skills(技能) → 可重用的工作流程 Commands(命令) → 快捷指令集 Rules(規則) → 始終遵守的準則 Hooks(鉤子) → 自動化觸發器 ``` ### 3. 即裝即用 下載後就能擁有與黑客松冠軍相同的工作環境,不需要從零摸索。 ## 核心組件深度解析 ### 📁 Agents - 15+ 個專業化子代理 每個代理都有明確的職責和工具配置: **規劃與設計** - `planner.md` - 功能實作規劃 - `architect.md` - 系統架構決策 **開發與測試** - `tdd-guide.md` - 測試驅動開發指導 - `e2e-runner.md` - Playwright E2E 測試 **品質控制** - `code-reviewer.md` - 程式碼品質審查 - `security-reviewer.md` - 安全漏洞分析 - `go-reviewer.md` - Go 語言專用審查(新增) **問題修復** - `build-error-resolver.md` - 建構錯誤修復 - `go-build-resolver.md` - Go 建構問題解決(新增) **維護優化** - `refactor-cleaner.md` - 死代碼清理 - `doc-updater.md` - 文件同步更新 **實際應用場景**: ``` 情境:開發新的支付功能 1. /plan "實作 Stripe 支付整合" → 使用 planner agent 規劃 2. 切換到 architect agent 設計資料庫結構 3. 用 tdd-guide agent 實作功能 4. /code-review 進行品質檢查 5. /e2e 產生端到端測試 ``` ### 📚 Skills - 30+ 個工作流程定義 **程式碼規範** - `coding-standards/` - 各語言最佳實踐 - TypeScript、Python、Go 等語言規範 **架構模式** - `backend-patterns/` - API、資料庫、快取模式 - `frontend-patterns/` - React、Next.js 模式 - `golang-patterns/` - Go 語言慣用法(新增) **進階功能** - `continuous-learning/` - 自動從對話中提取模式 - `continuous-learning-v2/` - 基於信心評分的本能學習系統 - `iterative-retrieval/` - 漸進式上下文精煉 - `eval-harness/` - 驗證迴圈評估 - `verification-loop/` - 持續驗證機制 **開發方法論** - `tdd-workflow/` - TDD 方法論 - `golang-testing/` - Go 測試模式、TDD、基準測試(新增) - `security-review/` - 安全檢查清單 ### ⚡ Commands - 20+ 個快捷命令 **開發流程** ```bash /tdd # 啟動測試驅動開發 /plan "功能描述" # 實作規劃 /e2e # E2E 測試產生 ``` **品質檢查** ```bash /code-review # 程式碼審查 /go-review # Go 程式碼審查(新增) /build-fix # 修復建構錯誤 /go-build # 修復 Go 建構錯誤(新增) ``` **維護優化** ```bash /refactor-clean # 移除死代碼 /learn # 從對話中提取模式 ``` **驗證系統** ```bash /checkpoint # 儲存驗證狀態 /verify # 執行驗證迴圈 ``` **新功能** ```bash /skill-create # 從 git 歷史產生技能 /instinct-status # 檢視學習到的本能 /instinct-import # 匯入本能 /instinct-export # 匯出本能 /evolve # 將本能聚類成技能 /setup-pm # 配置套件管理器 ``` ### 📋 Rules - 始終遵守的準則 Rules 會被 Claude Code 在每次對話中自動載入: - `security.md` - 強制安全檢查(不得硬編碼密鑰) - `coding-style.md` - 不可變性、檔案組織 - `testing.md` - TDD、80% 覆蓋率要求 - `git-workflow.md` - Commit 格式、PR 流程 - `agents.md` - 何時委派給子代理 - `performance.md` - 模型選擇、上下文管理 ### 🔗 Hooks - 自動化觸發器 Hooks 在特定事件自動執行,解決 AI「健忘」問題: **記憶持久化**(Memory Persistence) ```json { "matcher": "tool == \"SessionStart\"", "hooks": [{ "type": "command", "command": "node scripts/hooks/session-start.js" }] } ``` - 對話開始時:自動載入你的編碼習慣 - 對話結束時:儲存上下文狀態 - 壓縮前:保存重要資訊 **戰略壓縮**(Strategic Compact) - 智能建議何時該壓縮上下文 - 自動識別可以移除的內容 - 保留關鍵資訊不遺失 **持續學習** - 從對話中自動提取模式 - 轉換為可重用的技能 - 建立信心評分系統 ## 核心創新功能 ### 1. 持續學習 v2(Continuous Learning v2) 這是最具創新性的功能,Claude 會: ```bash # 檢視已學習的本能(帶信心評分) /instinct-status # 從對話中自動學習 → 系統自動分析你的編碼模式 → 提取為「本能」(instinct) → 賦予信心評分 # 將本能聚類成技能 /evolve → 相關的本能會自動組合成正式的 Skill ``` **實際效果**:Claude 會記住你的習慣,例如: - 你偏好的錯誤處理方式 - 你的命名慣例 - 你的程式碼組織結構 ### 2. 迭代式檢索(Iterative Retrieval) 解決子代理的上下文問題: ``` 傳統方式: → 一次性給代理大量上下文 → 超出 token 限制或相關性差 迭代式方式: → 代理先用少量上下文工作 → 識別需要更多資訊的地方 → 精確檢索相關內容 → 重複直到完成 ``` ### 3. 驗證迴圈(Verification Loop) 確保輸出品質: ```bash /verify → 執行測試 → 檢查程式碼品質 → 驗證安全性 → 確認覆蓋率 /checkpoint → 儲存當前驗證狀態 → 之後可以比較差異 ``` ### 4. 技能創造器(Skill Creator) 從你的 git 歷史自動產生技能: ```bash # 本地分析 /skill-create → 分析 commit 歷史 → 識別常見模式 → 產生 SKILL.md 檔案 # 也可使用 GitHub App(進階功能) → 支援 10k+ commits → 自動建立 PR → 團隊共享 ``` ## 跨平台支援 專案完全支援 **Windows、macOS、Linux**: - 所有 hooks 和腳本都用 Node.js 重寫 - 自動偵測套件管理器(npm/pnpm/yarn/bun) - 跨平台檔案路徑處理 **設定套件管理器**: ```bash # 環境變數 export CLAUDE_PACKAGE_MANAGER=pnpm # 全域設定 node scripts/setup-package-manager.js --global pnpm # 專案設定 node scripts/setup-package-manager.js --project bun # 或使用命令 /setup-pm ``` ## 安裝步驟 ### 方法一:作為插件安裝(推薦) ```bash # 1. 新增 marketplace /plugin marketplace add affaan-m/everything-claude-code # 2. 安裝插件 /plugin install everything-claude-code@everything-claude-code # 3. 手動複製 Rules(插件系統限制) git clone https://github.com/affaan-m/everything-claude-code.git cp -r everything-claude-code/rules/* ~/.claude/rules/ ``` ### 方法二:手動安裝 ```bash # Clone 專案 git clone https://github.com/affaan-m/everything-claude-code.git # 複製 agents cp everything-claude-code/agents/*.md ~/.claude/agents/ # 複製 rules cp everything-claude-code/rules/*.md ~/.claude/rules/ # 複製 commands cp everything-claude-code/commands/*.md ~/.claude/commands/ # 複製 skills cp -r everything-claude-code/skills/* ~/.claude/skills/ ``` 然後手動設定 hooks 和 MCP servers。 ## 重要注意事項 ### ⚠️ 上下文視窗管理 **關鍵警告**:不要一次啟用所有 MCP 工具! ``` 問題:Claude Code 有 200k token 上下文 啟用太多工具後:可能縮減到 70k 建議配置: ✅ 配置 20-30 個 MCP ✅ 每個專案啟用 < 10 個 ✅ 保持 < 80 個工具活躍 ``` **解決方案**: 在專案配置中使用 `disabledMcpServers` 停用不需要的工具。 ### 📋 系統需求 - **Claude Code CLI**: v2.1.0 或更高版本 - **Node.js**: 用於執行 hooks 和腳本 - **Git**: 用於技能創造功能 檢查版本: ```bash claude --version ``` ## 客製化指南 這套配置是作者的工作流程,你應該: ### 1. 從基礎開始 ``` 第一週:只使用 Commands → 熟悉 /plan、/code-review 等指令 第二週:嘗試 Agents → 理解何時委派給子代理 第三週:探索 Skills → 根據技術棧調整 第四週:實驗 Hooks → 設定記憶持久化 ``` ### 2. 調整 Rules ```bash # 根據團隊規範修改 ~/.claude/rules/coding-style.md → 調整縮排、命名規則 ~/.claude/rules/testing.md → 調整覆蓋率要求 ``` ### 3. 新增你的模式 ```bash # 在 skills/ 目錄新增 ~/.claude/skills/my-company-patterns/ api-standards.md database-migrations.md deployment-process.md ``` ### 4. 移除不需要的 ```bash # 如果不用 Go rm ~/.claude/agents/go-*.md rm ~/.claude/commands/go-*.md rm -r ~/.claude/skills/golang-*/ ``` ## 實戰案例:建構新功能 完整工作流程示範: ```bash # 1. 規劃階段 /plan "實作使用者認證系統:email/password + OAuth" → planner agent 會產生: - 資料庫結構設計 - API 端點清單 - 安全考量 - 實作步驟 # 2. 架構設計 → 切換到 architect agent → 討論具體的技術選擇 # 3. TDD 開發 /tdd → tdd-guide agent 帶領你: 1. 定義介面 2. 寫失敗測試(RED) 3. 實作最小代碼(GREEN) 4. 重構(REFACTOR) # 4. 品質檢查 /code-review → code-reviewer agent 檢查: - 程式碼品質 - 效能問題 - 潛在 bug # 5. 安全審查 → security-reviewer agent: - SQL injection 檢查 - XSS 防護 - 認證漏洞 - 敏感資料處理 # 6. E2E 測試 /e2e → e2e-runner agent 產生: - 登入流程測試 - OAuth 流程測試 - 錯誤處理測試 # 7. 驗證 /verify → 執行完整驗證迴圈 → 確認 80%+ 覆蓋率 → 所有測試通過 # 8. 學習 /learn → continuous-learning 提取: - 你的認證實作模式 - 錯誤處理偏好 - 測試撰寫風格 ``` ## 對其他工具的參考價值 即使不用 Claude Code,這個專案的架構思維也適用於: ### Cursor 用戶 - **Agents 概念** → 不同的 Cursor Rules - **Commands** → 自訂指令集 - **Skills** → 整合進 `.cursorrules` - **Rules** → 專案級別規範 ### GitHub Copilot 用戶 - **Skills** → 轉換成註解模板 - **Commands** → Code Actions - **Rules** → 團隊編碼規範 ### 通用原則 1. **結構化組織**你的 AI 提示 2. **模組化**常用的工作流程 3. **建立可重用**的技能庫 4. **設計符合習慣**的快捷方式 ## 進階功能指南 ### Token 優化 詳見專案的 **Longform Guide**: - 模型選擇策略 - 系統提示詞精簡 - 背景流程管理 ### 記憶持久化 自動儲存/載入跨對話的上下文: ``` 對話開始 → 載入編碼習慣 對話中 → 自動記錄模式 對話結束 → 儲存狀態 ``` ### 平行化 使用 Git worktrees 進行: - 多功能並行開發 - Cascade 方法 - 何時擴展多個實例 ### 子代理編排 解決上下文問題的迭代式檢索模式。 ## 生態系工具 ### Skill Creator 兩種方式產生技能: **A. 本地分析**(內建) ```bash /skill-create # 分析當前專案 /skill-create --instincts # 也產生本能 ``` **B. GitHub App**(進階) - 支援 10k+ commits - 自動建立 PR - 團隊共享 - 安裝:[ecc.tools](https://ecc.tools) ### Continuous Learning v2 本能學習系統: ```bash /instinct-status # 檢視學習的本能及信心分數 /instinct-import <file> # 從他人匯入本能 /instinct-export # 匯出本能供分享 /evolve # 將相關本能聚類成技能 ``` ## 測試 專案包含完整測試套件: ```bash # 執行所有測試 node tests/run-all.js # 個別測試 node tests/lib/utils.test.js node tests/lib/package-manager.test.js node tests/hooks/hooks.test.js ``` ## 貢獻指南 這是社群資源專案,歡迎貢獻: **想法**: - 特定語言技能(Python、Rust 模式) - 框架專用配置(Django、Rails、Laravel) - DevOps agents(Kubernetes、Terraform、AWS) - 測試策略(不同框架) - 領域知識(ML、資料工程、移動開發) 參見 `CONTRIBUTING.md` 了解詳情。 ## 核心價值總結 Everything Claude Code 的真正價值: 1. **黑客松冠軍驗證**:在高壓、限時環境中證明有效 2. **生產環境實戰**:用於真實產品開發(zenith.chat) 3. **系統化架構**:完整的四層結構(Agents/Skills/Commands/Rules) 4. **持續演進**:持續學習系統讓 AI 越用越懂你 5. **即裝即用**:不需從零摸索,直接使用冠軍級配置 6. **社群驅動**:開源專案,持續更新最佳實踐 ## 結語 這不只是一套配置檔案,而是一套**完整的 AI 編程工作系統**的設計範本。 無論你是: - **Claude Code 用戶**:直接安裝使用 - **其他 AI 工具用戶**:參考架構思維 - **團隊領導者**:學習如何標準化 AI 協作流程 都能從這個專案獲得啟發。

    Import from clipboard

    Paste your markdown or webpage here...

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password
    or
    Sign in via Google Sign in via Facebook Sign in via X(Twitter) Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    By signing in, you agree to our terms of service.

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Help & Tutorial

    How to use Book mode

    Slide Example

    API Docs

    Edit in VSCode

    Install browser extension

    Contacts

    Feedback

    Discord

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully