Login

AI 驅動的瀏覽器自動化框架,結合自然語言和程式碼控制瀏覽器

MITShell 7.6kNomenAKSuperClaude Last Updated: 2025-07-13

SuperClaude - 專業化AI開發框架

專案概述

SuperClaude 是一個綜合性的配置框架,專門設計用於增強 Claude Code 的功能。它將 Claude Code 從通用 AI 助手轉變為專業化的 AI 開發夥伴,提供 19 個專業化命令、9 個認知角色和先進的開發方法論。

核心特性

🎯 認知角色系統

SuperClaude 提供 9 個專業化認知角色,每個角色都有特定的專業領域和思維模式:

角色 專業領域 使用場景 範例命令
architect 系統設計、長期可維護性 規劃大型系統 /persona:architect → /user:design --api --ddd
frontend 使用者體驗、視覺介面 UI/UX 工作 /persona:frontend → /user:build --react
backend 效能、可靠性、API 伺服器端開發 /persona:backend → /user:build --api
analyzer 根本原因分析、循證決策 調試複雜問題 /persona:analyzer → /user:troubleshoot --investigate
security 威脅建模、安全優先 安全審閱 /persona:security → /user:scan --security
mentor 教學、引導式發現 學習/解釋 /persona:mentor → /user:explain --depth
refactorer 程式碼品質、簡化 程式碼改進 /persona:refactorer → /user:improve --quality
performance 速度優化、瓶頸分析 效能調優 /persona:performance → /user:improve --performance
qa 品質保證、測試 測試工作流程 /persona:qa → /user:test --coverage

🛠️ 專業化命令系統

SuperClaude 提供 18 個專業化斜線命令,涵蓋整個開發生命週期:

開發命令(3 個)

  • /user:build - 通用專案建構器
    • --init 新專案,--feature 添加功能,--react React 應用程式,--api 後端,--tdd 測試驅動
  • /user:dev-setup - 開發環境設定
    • --install 工具,--ci CI/CD,--monitor 監控
  • /user:test - 測試框架
    • --coverage 覆蓋率,--watch 監聽模式,--e2e 端到端測試

分析與改進命令(4 個)

  • /user:analyze - 多維度分析
    • --code 程式碼審查,--architecture 設計,--profile 效能,--security 漏洞
  • /user:troubleshoot - 調試與修復
    • --investigate 探索,--fix 修復,--five-whys 根本原因,--prod 生產環境
  • /user:improve - 增強程式碼/效能
    • --quality 重構,--performance 優化,--iterate 持續改進,--threshold 目標百分比
  • /user:explain - 深度解釋
    • --depth 複雜程度,--visual 圖表,--examples 程式碼範例

維運命令(6 個)

  • /user:deploy - 應用程式部署
  • /user:migrate - 資料庫/程式碼遷移
  • /user:scan - 安全與驗證
  • /user:estimate - 時間/複雜度預測
  • /user:cleanup - 專案維護
  • /user:git - Git 工作流程管理

設計與架構命令(1 個)

  • /user:design - 系統設計
    • --api REST,--ddd 領域驅動設計,--prd 需求,--openapi 規範,--graphql GraphQL

工作流程命令(2 個)

  • /user:spawn - 建立專業化子代理
  • /user:document - 文件建立

系統命令(1 個)

  • /user:load - 載入專案上下文

🔧 MCP(模型上下文協議)整合

SuperClaude 整合了四個強大的 MCP 伺服器:

  1. Context7 (C7) - 自動文件查找

    • 即時查找函式庫文件
    • 與 GitHub 工作流程無縫整合
  2. Sequential - 複雜分析

    • 深層問題的順序思考
    • 適合系統設計和根本原因分析
  3. Magic - UI 生成

    • 自動建立 React 元件
    • 智能 UI 建構
  4. Puppeteer - 瀏覽器測試

    • 驗證 UI 元件
    • 效能監控

🚀 核心優勢

Token 優化

  • UltraCompressed 模式:70% 的 Token 減少
  • 使用電報風格簡化:移除冠詞/連接詞/介詞
  • 符號化:→(到), &(和), @(在), w/(與), +(添加), -(移除)
  • 縮寫:cfg(配置), fn(函數), impl(實現)

研究優先方法

  • 自動查找官方文件
  • 循證決策制定
  • 引用驅動的實現

自適應思維

  • 根據任務調整分析深度
  • 智能工具選擇
  • 上下文感知回應

安裝與配置

自動安裝

git clone https://github.com/NomenAK/SuperClaude.git
cd SuperClaude
./install.sh

手動安裝

# 1. 建立結構
mkdir -p ~/.claude/commands/shared

# 2. 複製設定檔
cp CLAUDE.md RULES.md PERSONAS.md MCP.md ~/.claude/

# 3. 複製命令
cp .claude/commands/*.md ~/.claude/commands/

# 4. 複製共享資源
cp .claude/commands/shared/*.yml ~/.claude/commands/shared/

驗證安裝

# 檢查安裝
ls -la ~/.claude/ # 應顯示 4 個主要文件
ls -la ~/.claude/commands/ # 應顯示 17 個文件(16 個命令 + 索引)

# 測試使用
# 在 Claude Code 中打開任何專案並嘗試:
/user:analyze --code
/persona:architect

專案結構

~/.claude/
├── CLAUDE.md          # 主設定(載入其他文件)
├── RULES.md           # 治理與實踐
├── PERSONAS.md        # 9 個認知原型
├── MCP.md             # 模型上下文協議模式
└── commands/          # 17 個專業化斜線命令 + 索引
    ├── analyze.md
    ├── build.md
    ├── cleanup.md
    ├── deploy.md
    ├── design.md
    ├── dev-setup.md
    ├── document.md
    ├── estimate.md
    ├── explain.md
    ├── git.md
    ├── improve.md
    ├── index.md
    ├── load.md
    ├── migrate.md
    ├── scan.md
    ├── spawn.md
    ├── test.md
    ├── troubleshoot.md
    └── shared/        # 19 個設定資源
        ├── ambiguity-check.yml
        ├── audit.yml
        ├── checkpoint.yml
        ├── cleanup-patterns.yml
        ├── command-memory.yml
        ├── documentation-dirs.yml
        ├── evidence.yml
        ├── git-operations.yml
        ├── git-workflow.yml
        ├── impl.yml
        ├── loading-cfg.yml
        ├── mcp-flags.yml
        ├── patterns.yml
        ├── performance-monitoring.yml
        ├── planning-mode.yml
        ├── research-first.yml
        ├── thinking-modes.yml
        ├── ultracompressed.yml
        └── validation.yml

使用範例

通用標誌

所有命令支援的通用標誌:

規劃與思維

  • --plan - 執行前顯示執行計畫
  • --think - 標準分析模式(多文件上下文)
  • --think-hard - 深度分析模式(架構級別)
  • --ultrathink - 關鍵分析模式(系統級)

文件控制

  • --ultracompressed / --uc - 約 70% Token 減少模式

MCP 伺服器控制

  • --c7 / --no-c7 - 啟用/禁用 Context7 文件
  • --seq / --no-seq - 啟用/禁用 Sequential 思維
  • --magic / --no-magic - 啟用/禁用 Magic UI 建構器
  • --pup / --no-pup - 啟用/禁用 Puppeteer 瀏覽器
  • --all-mcp - 啟用所有 MCP 伺服器
  • --no-mcp - 禁用所有 MCP 伺服器(僅原生工具)

工作流程範例

完整開發流程

/persona:architect → /user:load --depth deep → /user:analyze --architecture
/user:design --api --ddd → /user:estimate --detailed
/persona:backend → /user:build --api
/persona:frontend → /user:build --react → /user:test --coverage
/persona:security → /user:scan --security → /user:improve --quality
/user:cleanup --all → /user:deploy --env staging

調試工作流程

/persona:analyzer → /user:troubleshoot --investigate --prod → /user:analyze --profile
"think hard about performance bottlenecks" → /user:troubleshoot --five-whys
/persona:performance → /user:improve --performance --iterate --threshold 90%

測試與品質保證

/persona:qa → /user:test --e2e → /user:scan --validate
/persona:mentor → /user:explain --depth beginner --visual --examples
/user:document --user → /user:build --tdd → /user:analyze --code

文件組織

操作文件 vs 專案文件

SuperClaude 自動分離操作報告和專案文件:

.claudedocs/           # Claude 操作文件
├── audit/
├── reports/
├── summaries/
├── metrics/
└── incidents/

/docs                  # 專案文件
├── api/
├── guides/
├── architecture/
└── development/

自動報告

  • analyzereports/
  • scanreports/
  • testmetrics/
  • troubleshootincidents/

手動文件

  • /user:document → API → /docs/api/
  • 指南 → /docs/guides/

進階功能

模型適配

  • 簡單任務 → sonnet(成本效益)
  • 複雜任務 → sonnet-4(平衡)
  • 關鍵任務 → opus-4(最大能力)

便捷命令

  • /compact - 智能減少
  • /clear - 全新開始
  • /model - 切換模型

檢查點系統

Git 整合的檢查點系統允許開發者導航回工作流程中的任何點:

/user:git --checkpoint before-refactor
/user:git --rollback

故障排除

常見問題

  1. 命令無法運作:檢查 ls ~/.claude/commands/(應顯示 17 個文件)
  2. 規劃問題:添加 --plan 標誌 → /user:deploy --plan
  3. 角色問題/persona:architect/persona:security/user:scan --security
  4. MCP 問題"React docs" → C7 | "slow app" → Sequential

維護命令

  • 更新cd SuperClaude && git pull && ./install.sh
  • 備份cp -r ~/.claude/ ~/.claude.backup.$(date +%Y%m%d)
  • 卸載rm -rf ~/.claude/

專案優勢

開發者優勢

  • ✅ 所有專案的一致工作流程
  • ✅ 研究優先方法 → 總是查找官方文件
  • ✅ 品質標準 → 內建最佳實踐
  • ✅ 認知專業化 → 每個任務的正確思維模式

適用場景

  • 開發者 → 更快、更智能的程式碼工作流程
  • 團隊 → 一致的 AI 輔助模式
  • 專案 → 品質專注的開發
  • 學習 → AI 引導的技能發展

技術特點

符號系統

SuperClaude 使用獨特的符號系統來提高效率:

符號 涵義 縮寫 涵義
導致 cfg 配置
& 和/與 fn 函數
w/ impl 實現
@ 在/位於 env 環境
+ 添加/包含 dev 開發
- 移除/排除 auth 認證
對於所有/每個 API 應用程式介面

版本資訊

  • 目前版本:v4.0.0
  • 類型:配置框架(非可執行程式碼)
  • 相容性:Claude Code
  • 安裝位置~/.claude/(全域安裝)

總結

SuperClaude 將 Claude Code 從通用 AI 助手轉變為專業化的開發夥伴,提供:

  • 專業化的認知角色系統
  • 全面的命令工具集
  • 智能的 MCP 整合
  • 高效的 Token 優化
  • 研究驅動的方法論

這個框架特別適合需要一致、高品質 AI 輔助開發體驗的開發者和團隊。透過其模組化設計和專業化方法,SuperClaude 確保每個開發任務都能獲得適當的專業知識和工具支援。

Star History Chart