iT邦幫忙

2025 iThome 鐵人賽

DAY 20
0

今天要實際嘗試建立自定義的 Claude Code 的 Output Style 功能,這是最新更新後非常實用的一個互動方式調整工具。


1. 更新 Claude Code

在開始之前,先確保 Claude 已更新到最新版:

claude update

更新完成後,進入 Claude CLI:

claude

2. 如何使用 Output Style

Claude 提供了內建三種互動模式,可以透過以下指令切換:

/output-style

會出現選單:

  1. Default – 高效完成程式任務,回答簡潔。
  2. Explanatory – 邊寫程式邊解釋思路,像教學一樣。
  3. Learning – 像教練一樣,會留空給你練習與補完程式碼。

選擇後 Claude 的行為模式就會即時改變。
https://ithelp.ithome.com.tw/upload/images/20251003/20178773UtkjSruXTo.png


3. 自訂 Output Style

如果想要更進階,可以建立自己的互動風格:

cd ~/.claude
mkdir -p output-styles
cd output-styles
nano (自訂名稱).md

編輯檔案內容(例如想要 Claude 當成 Gemini Code Reviewer):

# Gemini Code Reviewer
Automated code review and optimization using Gemini CLI for analysis and Claude for safe implementation
..
..
..
..

存檔之後,回到 Claude 中輸入:

/output-style

就會看到剛剛新增的自訂風格!
https://ithelp.ithome.com.tw/upload/images/20251003/20178773tB6fdQZd6g.png


4. 更多資源

這個網站有整理一些可以直接套用的自定義樣式,建議參考:
👉 https://www.aivi.fyi/aiagents/introduce-ClaudeCode-Outputstyles


📌 今日重點

  • claude update 更新到最新版。
  • /output-style 切換內建互動風格。
  • 可以在 ~/.claude/output-styles/ 新增 .md 來自訂互動方式。
  • 結合其他 AI(例如 Gemini)也能做代碼審查與協作。

明天打算試試看實際用 Claude + Gemini 交互進行程式碼審查


上一篇
[Day19] Claude Code 新功能 Output Styles
下一篇
[Day21] 實際測試 Claude Output-Style × Gemini CLI 實戰整合
系列文
生成式 AI 輔助程式設計:探索 Vibe Coding、Claude 與 Cursor 的新世代開發體驗21
圖片
  熱門推薦
圖片
{{ item.channelVendor }} | {{ item.webinarstarted }} |
{{ formatDate(item.duration) }}
直播中

尚未有邦友留言

立即登入留言