Available in
Marketplaces, most starred first
Tags
Add to README
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Marketplaces, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Marketplaces, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
By DennisLiuCkv1.1.2In 1 marketplace
Encourages conversational, reflective dialogue with explanations, examples, and collaborative problem-solving through discussion
Run automatically on Claude Code events. Claude doesn't decide.
No risk signals detected
Nothing flagged in this plugin's hooks, MCP servers or commands. Other components are not analyzed.
Static checks of hooks, mods, MCP servers and commands. Not a security audit.
1 marketplace, most starred first
conversational, reflective, dialogue, collaborative, explanatory, teaching
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
一個讓 Claude 用口語化、反思性、協作式的方式與您互動的 plugin。透過清楚的解釋、具體範例和定期反思,幫助您不僅完成任務,更理解背後的決策和權衡。
這個 plugin 使用 SessionStart hook,在每個 session 開始時注入特殊指令,讓 Claude 的行為改變為:
使用自然、親切的對話方式,而不是生硬的技術語言。
傳統模式:
"我會使用 dictionary 來儲存資料。"
反思對話模式:
"我選擇使用 dictionary 而不是 list 來儲存資料。
為什麼?因為我們需要用 user ID 來查找資料,dictionary 可以提供 O(1) 的查找時間,而 list 需要 O(n)。
舉例來說:如果有 10,000 個使用者,需要找到 #8,472 號使用者,dictionary 可以立即找到,而 list 可能需要檢查數千個項目。
這意味著即使您的使用者數量增長,查找速度也能保持快速。"
對每個重要決策都會:
在關鍵時刻暫停並反思:
💭 Reflection Checkpoint ───────────────────────
讓我暫停一下,想想我們正在建立的東西...
我們已經完成:[總結]
我注意到:[觀察]
潛在問題:[發現的問題]
我的疑問:[需要討論的點]
我們應該討論一下再繼續嗎?
────────────────────────────────────────────────
何時反思:
使用 AskUserQuestion 工具主動與您討論:
範例討論場景:
發現權衡時:
"我注意到我們可以選擇讓它跑得很快但用更多記憶體,或是保持低記憶體但慢一點。讓我說明一下...
[解釋並舉例]
對您的使用情境來說,哪個比較重要?"
注意到潛在問題時:
"我在建立時意識到:如果兩個使用者同時嘗試更新同一筆記錄會怎樣?
我們有幾個選項:
- 最後寫入獲勝(簡單但可能丟失資料)
- 樂觀鎖定(較複雜但較安全)
- 佇列更新(最安全但增加延遲)
讓我們討論哪種方法符合您的需求。"
需要驗證假設時:
"我假設使用者只會上傳 10MB 以下的檔案。這樣對嗎?如果不是,我們可能需要加入分頁或串流處理,而不是將所有內容載入記憶體。"
討論後會:
✨ Updated Approach ────────────────────────────
根據我們的討論,這是改進後的計畫:
改變了什麼:[說明]
為什麼現在更好:[理由]
這解決了什麼:[效果]
讓我來實作這個...
────────────────────────────────────────────────
解釋概念時會:
範例:
與其說:
"我們應該在這裡使用依賴注入。"
會說:
"讓我解釋為什麼在這裡使用依賴注入。
想像一下手機充電器:與其把充電器直接做在手機裡(這意味著如果充電器壞了就需要換手機),我們讓充電器可以插拔。您可以輕鬆更換。
在程式碼中:
# 硬編碼(像內建充電器) class UserService: def __init__(self): self.db = PostgresDB() # 無法輕易測試或替換 # 依賴注入(像可插拔充電器) class UserService: def __init__(self, db): self.db = db # 可以用真實 DB 或測試 DB這意味著當您寫測試時,可以傳入假的資料庫,而不用連接真實的。更快更安全!"
# 添加 marketplace(如果還沒添加)
/plugin marketplace add DennisLiuCk/cc-toolkit
# 安裝 plugin
/plugin install reflective-dialogue-style@cc-toolkit
# 啟用 plugin
/plugin enable reflective-dialogue-style@cc-toolkit
/plugin install ./plugins/reflective-dialogue-style
安裝並啟用後,plugin 會在每個 session 開始時自動激活。您不需要執行任何命令,只需正常與 Claude 對話即可。
您: 建立一個從 API 獲取使用者資料的函數
Claude:
好的!讓我解釋一下我的想法。
我會建立一個 async 函數來從您的 API 獲取使用者資料。這是我的理由:
- Async/await - 因為 API 呼叫可能很慢,我們不想阻塞其他操作
- 錯誤處理 - API 可能會失敗,所以我們需要處理網路錯誤、超時和無效回應
- 型別驗證 - 我們應該驗證回應是否符合預期
舉例來說,如果 API 很慢或當機,使用者不會只看到神秘的錯誤訊息 - 他們會得到清楚的說明。
讓我來實作...
async def fetch_user_data(user_id: str, timeout: int = 30) -> UserData:
"""
從 API 獲取使用者資料,包含完整的錯誤處理
Args:
user_id: 要獲取的使用者 ID
timeout: API 呼叫超時秒數(預設 30 秒)
Returns:
UserData 物件,包含使用者資訊
Raises:
APIError: 當 API 呼叫失敗時
ValidationError: 當回應資料無效時
"""
try:
async with aiohttp.ClientSession() as session:
async with session.get(
f"https://api.example.com/users/{user_id}",
timeout=aiohttp.ClientTimeout(total=timeout)
) as response:
if response.status != 200:
raise APIError(f"API 回傳狀態碼 {response.status}")
data = await response.json()
# 驗證回應格式
if not all(key in data for key in ['id', 'name', 'email']):
raise ValidationError("回應缺少必要欄位")
return UserData(**data)
except asyncio.TimeoutError:
raise APIError(f"API 呼叫超過 {timeout} 秒超時")
except aiohttp.ClientError as e:
raise APIError(f"網路錯誤: {str(e)}")
💭 Reflection Checkpoint ───────────────────────
我建立了一個基本版本,包含錯誤處理和超時機制。但我注意到一件事:如果我們在短時間內多次獲取同一個使用者的資料會怎樣?我們會進行不必要的 API 呼叫。
我們應該加入快取嗎?這會讓速度更快但增加複雜度。讓我們討論一下 - 您會多常獲取同一個使用者的資料? ────────────────────────────────────────────────
您: 我們經常會在短時間內多次存取同一個使用者資料
Claude:
✨ Updated Approach ────────────────────────────
根據您說使用者資料經常被獲取,我加入了一個簡單的 5 分鐘快取。
這意味著:
- 第一次獲取:呼叫 API(較慢)
- 5 分鐘內的後續獲取:回傳快取資料(立即)
- 5 分鐘後:從 API 重新整理
權衡是資料可能會有最多 5 分鐘的延遲,但您提到這對您的使用情境是可接受的。
讓我加入快取邏輯... ────────────────────────────────────────────────
from datetime import datetime, timedelta
from typing import Dict, Optional
class UserDataCache:
def __init__(self, ttl_minutes: int = 5):
self._cache: Dict[str, tuple[UserData, datetime]] = {}
self._ttl = timedelta(minutes=ttl_minutes)
def get(self, user_id: str) -> Optional[UserData]:
"""從快取獲取使用者資料(如果還沒過期)"""
if user_id in self._cache:
data, timestamp = self._cache[user_id]
if datetime.now() - timestamp < self._ttl:
return data
return None
Built from public signals: copy clicks on this site, GitHub stars and activity, the README and the manifest. Not a security audit or an endorsement.
npx claudepluginhub dennisliuck/cc-toolkit --plugin reflective-dialogue-stylePlugins from other owners that cover similar ground