Files
affaan-m--everything-claude…/docs/zh-TW/commands/learn.md
T
wehub-resource-sync d48cda4081
CI / Test (ubuntu-latest, Node 18.x, bun) (push) Failing after 15m1s
CI / Test (ubuntu-latest, Node 18.x, npm) (push) Failing after 15m1s
CI / Test (ubuntu-latest, Node 18.x, pnpm) (push) Failing after 15m1s
CI / Test (ubuntu-latest, Node 18.x, yarn) (push) Failing after 15m1s
CI / Test (ubuntu-latest, Node 20.x, bun) (push) Failing after 17m13s
CI / Test (ubuntu-latest, Node 20.x, npm) (push) Failing after 18m42s
CI / Test (ubuntu-latest, Node 20.x, pnpm) (push) Failing after 15m0s
CI / Test (ubuntu-latest, Node 20.x, yarn) (push) Failing after 49m44s
CI / Test (ubuntu-latest, Node 22.x, bun) (push) Failing after 51m55s
CI / Test (ubuntu-latest, Node 22.x, pnpm) (push) Failing after 21m57s
CI / Test (ubuntu-latest, Node 22.x, npm) (push) Failing after 37m39s
CI / Test (ubuntu-latest, Node 22.x, yarn) (push) Failing after 34m7s
CI / Validate Components (push) Failing after 37m15s
CI / Python Tests (push) Failing after 10m1s
CI / Security Scan (push) Failing after 10m1s
CI / Lint (push) Failing after 17m12s
CI / Coverage (push) Failing after 20m19s
CI / Test (macos-latest, Node 18.x, bun) (push) Has been cancelled
CI / Test (macos-latest, Node 18.x, npm) (push) Has been cancelled
CI / Test (macos-latest, Node 18.x, pnpm) (push) Has been cancelled
CI / Test (macos-latest, Node 18.x, yarn) (push) Has been cancelled
CI / Test (windows-latest, Node 18.x, npm) (push) Has been cancelled
CI / Test (windows-latest, Node 18.x, pnpm) (push) Has been cancelled
CI / Test (windows-latest, Node 18.x, yarn) (push) Has been cancelled
CI / Test (macos-latest, Node 20.x, bun) (push) Has been cancelled
CI / Test (macos-latest, Node 20.x, npm) (push) Has been cancelled
CI / Test (macos-latest, Node 20.x, pnpm) (push) Has been cancelled
CI / Test (macos-latest, Node 20.x, yarn) (push) Has been cancelled
CI / Test (windows-latest, Node 20.x, npm) (push) Has been cancelled
CI / Test (windows-latest, Node 20.x, pnpm) (push) Has been cancelled
CI / Test (windows-latest, Node 20.x, yarn) (push) Has been cancelled
CI / Test (macos-latest, Node 22.x, bun) (push) Has been cancelled
CI / Test (macos-latest, Node 22.x, npm) (push) Has been cancelled
CI / Test (macos-latest, Node 22.x, pnpm) (push) Has been cancelled
CI / Test (macos-latest, Node 22.x, yarn) (push) Has been cancelled
CI / Test (windows-latest, Node 22.x, npm) (push) Has been cancelled
CI / Test (windows-latest, Node 22.x, pnpm) (push) Has been cancelled
CI / Test (windows-latest, Node 22.x, yarn) (push) Has been cancelled
chore: import upstream snapshot with attribution
2026-07-13 11:55:55 +08:00

1.5 KiB

/learn - 擷取可重用模式

分析目前的工作階段並擷取值得儲存為技能的模式。

觸發

在工作階段中任何時間點解決了非瑣碎問題時執行 /learn

擷取內容

尋找:

  1. 錯誤解決模式

    • 發生了什麼錯誤?
    • 根本原因是什麼?
    • 什麼修復了它?
    • 這可以重用於類似錯誤嗎?
  2. 除錯技術

    • 非顯而易見的除錯步驟
    • 有效的工具組合
    • 診斷模式
  3. 變通方案

    • 函式庫怪癖
    • API 限制
    • 特定版本的修復
  4. 專案特定模式

    • 發現的程式碼庫慣例
    • 做出的架構決策
    • 整合模式

輸出格式

~/.claude/skills/learned/[pattern-name].md 建立技能檔案:

# [描述性模式名稱]

**擷取日期:** [日期]
**上下文:** [此模式何時適用的簡短描述]

## 問題
[此模式解決什麼問題 - 要具體]

## 解決方案
[模式/技術/變通方案]

## 範例
[如適用的程式碼範例]

## 何時使用
[觸發條件 - 什麼應該啟動此技能]

流程

  1. 審查工作階段中可擷取的模式
  2. 識別最有價值/可重用的見解
  3. 起草技能檔案
  4. 請使用者在儲存前確認
  5. 儲存到 ~/.claude/skills/learned/

注意事項

  • 不要擷取瑣碎的修復(打字錯誤、簡單的語法錯誤)
  • 不要擷取一次性問題(特定 API 停機等)
  • 專注於會在未來工作階段節省時間的模式
  • 保持技能專注 - 每個技能一個模式