Communitygithub.com

持續學習技能(已棄用)

[已棄用 - 請改用 continuous-learning-v2] 舊版 v1 停止鉤子技能提取器。v2 是其嚴格超集,採用基於直覺、專案範圍、鉤子可靠的學習方式。請勿呼叫 v1:當需要持續學習、會話學習或模式提取時,請改用 continuous-learning-v2。

持續學習技能(已棄用) 是什麼?

此技能(Continuous Learning Skill v1)現已棄用,建議使用者遷移至 continuous-learning-v2。v2 是 v1 的嚴格超集,採用更可靠且更細緻的學習機制。v1 的設計是作為 Claude Code 會話結束時的「停止鉤子」運作,在會話結束後評估對話記錄,從中提取可重複使用的模式,並將其儲存為學習到的技能(位於 ~/.claude/skills/learned/)。它支援多種模式類型,包括錯誤解決方案、使用者修正、解決方法、除錯技巧與專案特定慣例,可透過 config.json 調整提取門檻與忽略清單。然而,由於 v1 依賴機率性的技能觸發(約 50–80% 成功率),導致模式觀察不可靠。v2 改用 PreToolUse/PostToolUse 鉤子達到 100% 觀察可靠性,並以「直覺」(instinct)作為原子行為單位,附帶 0.3–0.9 的信任評分,支援專案範圍儲存與全域推廣,以及直覺聚類為技能或指令的演化路徑。對於已有 v1 工作流程的安裝,此檔案保留作為回溯相容與參考用途。

相容平台✓Claude Code~Codex CLI~Cursor
npx skills add https://github.com/affaan-m/ECC/tree/main/skills/continuous-learning

在你喜歡的 AI 中提問

開啟一個已預先載入此 Agent Skill 的新對話。

說明文件

持續學習技能 - 已棄用

已於 2026-04-28 棄用。 請改用 continuous-learning-v2。v2 是嚴格超集:停止鉤子觀察升級為 PreToolUse/PostToolUse 觀察,完整技能變成原子化直覺並附帶信任評分,僅有全域儲存擴展為專案範圍儲存加上全域推廣。

此檔案保留作為回溯參考,並支援現有安裝的相容性。


原始 v1 文件(存檔用)

自動評估 Claude Code 會話結束時的情況,提取可重複使用的模式,並儲存為學習到的技能。

何時啟用

  • 設定從 Claude Code 會話自動提取模式
  • 設定用於會話評估的停止鉤子
  • 檢視或整理 ~/.claude/skills/learned/ 中學習到的技能
  • 調整提取門檻或模式類別
  • 比較 v1(此版本)與 v2(基於直覺)的方法

狀態

此 v1 技能仍受支援,但 continuous-learning-v2 是新安裝的首選路徑。若你明確需要較簡單的停止鉤子提取流程,或需與舊版學習技能工作流程相容,則保留 v1。

運作方式

此技能作為停止鉤子在每個會話結束時執行:

  1. 會話評估:檢查會話是否有足夠的訊息(預設:10 條以上)
  2. 模式偵測:從會話中識別可提取的模式
  3. 技能提取:將有用的模式儲存至 ~/.claude/skills/learned/

設定

編輯 config.json 以自訂:

{
  "min_session_length": 10,
  "extraction_threshold": "medium",
  "auto_approve": false,
  "learned_skills_path": "~/.claude/skills/learned/",
  "patterns_to_detect": [
    "error_resolution",
    "user_corrections",
    "workarounds",
    "debugging_techniques",
    "project_specific"
  ],
  "ignore_patterns": [
    "simple_typos",
    "one_time_fixes",
    "external_api_issues"
  ]
}

模式類型

模式說明
error_resolution如何解決特定錯誤
user_corrections來自使用者修正的模式
workarounds針對框架/程式庫怪異行為的解決方案
debugging_techniques有效的除錯方法
project_specific專案特定的慣例

鉤子設定

新增至你的 ~/.claude/settings.json:

{
  "hooks": {
    "Stop": [{
      "matcher": "*",
      "hooks": [{
        "type": "command",
        "command": "~/.claude/skills/continuous-learning/evaluate-session.sh"
      }]
    }]
  }
}

為什麼用停止鉤子?

  • 輕量:僅在會話結束時執行一次
  • 非阻塞:不會增加每條訊息的延遲
  • 完整上下文:可存取完整會話記錄

相關資源

  • 長文指南 - 關於持續學習的章節
  • /learn 指令 - 在會話中手動提取模式

比較筆記(研究:2025 年 1 月)

與 Homunculus 比較

Homunculus v2 採用更精細的方法:

功能我們的方法Homunculus v2
觀察停止鉤子(會話結束)PreToolUse/PostToolUse 鉤子(100% 可靠)
分析主要上下文背景代理(Haiku)
粒度完整技能原子化「直覺」
信任度無0.3–0.9 加權
演化方式直接變為技能直覺 → 聚類 → 技能/指令/代理
分享無匯出/匯入直覺

從 homunculus 得到的關鍵洞察:

「v1 依賴技能來觀察。技能是機率性的——它們大約在 50–80% 的情況下觸發。v2 使用鉤子進行觀察(100% 可靠),並以直覺作為學習行為的原子單位。」

潛在的 v2 增強功能

  1. 基於直覺的學習 - 較小、原子化的行為,附帶信任評分
  2. 背景觀察者 - Haiku 代理平行分析
  3. 信任衰減 - 若直覺被反駁,信任度下降
  4. 領域標記 - 程式碼風格、測試、git、除錯等領域標記
  5. 演化路徑 - 將相關直覺聚類為技能/指令

請參閱:docs/continuous-learning-v2-spec.md 取得完整規格。

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

accessibility

Design, implement, and audit inclusive digital products using WCAG 2.2 Level AA. Use when building or auditing UI that must meet WCAG 2.2 Level AA, or when reviewing a change for keyboard, contrast, or screen-reader support.

affaan-m/content-engine

Create platform-native content systems for X, LinkedIn, TikTok, YouTube, newsletters, and repurposed multi-platform campaigns. Use when the user wants social posts, threads, scripts, content calendars, or one source asset adapted cleanly across platforms.

affaan-m/ECC

Multi-platform content distribution across X, LinkedIn, Threads, and Bluesky. Adapts content per platform using content-engine patterns. Never posts identical content cross-platform. Use when the user wants to distribute content across social platforms.

affaan-m/fal-ai-media

Unified media generation via fal.ai MCP — image, video, and audio. Covers text-to-image (Nano Banana), text/image-to-video (Seedance, Kling, Veo 3), text-to-speech (CSM-1B), and video-to-audio (ThinkSound). Use when the user wants to generate images, videos, or audio with AI.

affaan-m/manim-video

日本語翻訳:このファイルは manim-video 用の日本語翻訳が必要です

affaan-m/remotion-video-creation

Remotion のベストプラクティス - React で動画を作成する。3D、アニメーション、音声、字幕、チャート、トランジションなどをカバーするドメイン固有の29のルール。

affaan-m/video-editing

AI-assisted video editing workflows for cutting, structuring, and augmenting real footage. Covers the full pipeline from raw capture through FFmpeg, Remotion, ElevenLabs, fal.ai, and final polish in Descript or CapCut. Use when the user wants to edit video, cut footage, create vlogs, or build video content.

agent-architecture-audit

Full-stack diagnostic for agent and LLM applications. Audits the 12-layer agent stack for wrapper regression, memory pollution, tool discipline failures, hidden repair loops, and rendering corruption. Produces severity-ranked findings with code-first fixes. Essential for developers building agent applications, autonomous loops, or any LLM-powered feature. Use when an agent or LLM feature misbehaves and the failing layer is unknown, or before shipping an agent stack.

agent-eval

Head-to-head comparison of coding agents (Claude Code, Aider, Codex, etc.) on custom tasks with pass rate, cost, time, and consistency metrics. Use when choosing between coding agents, or when a change to an agent setup needs measured pass rate, cost, and time rather than an impression.

agent-harness-construction

Design and optimize AI agent action spaces, tool definitions, and observation formatting for higher completion rates. Use when defining or revising an agent

agentic-engineering

Operate as an agentic engineer using eval-first execution, decomposition, and cost-aware model routing. Use when planning or executing engineering work that agents will carry out end to end.

agentic-os

Build persistent multi-agent operating systems on Claude Code. Covers kernel architecture, specialist agents, slash commands, file-based memory, scheduled automation, and state management without external databases. Use when building a persistent multi-agent system on Claude Code with its own memory, commands, and scheduling.

agent-introspection-debugging

Structured self-debugging workflow for AI agent failures using capture, diagnosis, contained recovery, and introspection reports. Use when an agent run fails and you need a reproducible diagnosis instead of a retry.

agent-payment-x402

Add x402 payment execution to AI agents with per-task budgets, spending controls, and non-custodial wallets. Supports Base through agentwallet-sdk and X Layer through OKX Payments / OKX Agent Payments Protocol. Use when an agent must pay for something itself and needs per-task budgets, spending controls, and a non-custodial wallet.

agent-self-evaluation

Use after completing any non-trivial task. The agent self-rates its output on 5 axes — accuracy, completeness, clarity, actionability, conciseness — with concrete evidence per criterion. Produces a structured 1-5 scorecard with specific improvement suggestions.

agent-sort

Build an evidence-backed ECC install plan for a specific repo by sorting skills, commands, rules, hooks, and extras into DAILY vs LIBRARY buckets using parallel repo-aware review passes. Use when ECC should be trimmed to what a project actually needs instead of loading the full bundle.

ai-first-engineering

Engineering operating model for teams where AI agents generate a large share of implementation output. Use when setting team process, review gates, or ownership rules for a codebase largely written by agents.

ai-regression-testing

Regression testing strategies for AI-assisted development. Sandbox-mode API testing without database dependencies, automated bug-check workflows, and patterns to catch AI blind spots where the same model writes and reviews code. Use when adding regression coverage to AI-assisted code, or when the same model both wrote and reviewed a change.

android-clean-architecture

Clean Architecture patterns for Android and Kotlin Multiplatform projects — module structure, dependency rules, UseCases, Repositories, and data layer patterns. Use when structuring modules, layers, or data flow in an Android or KMP project.

angular-developer

Generates Angular code and provides architectural guidance. Trigger when creating projects, components, or services, or for best practices on reactivity (signals, linkedSignal, resource), forms, dependency injection, routing, SSR, accessibility (ARIA), animations, styling (component styles, Tailwind CSS), testing, or CLI tooling.

相關技能