본문으로 건너뛰기
cccskills
무료GitHub에 공개

continuous-learning

At the end of a Claude Code session, evaluate the conversation for reusable patterns such as error fixes, workarounds, debugging techniques, and project conventions. Save useful findings as learned skills for later sessions, with configurable thresholds and pattern categories.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

원문원문 설명 보기

Automatically extract reusable patterns from Claude Code sessions and save them as learned skills for future use.

실행 점수 미검증

설치 방법 보기

이럴 때 유용합니다

  • Saving a recurring error fix
  • Capturing project-specific conventions
  • Setting up session-end pattern extraction
  • Reviewing learned skills

포함된 파일(3)

  • SKILL.md3.8 KB
  • config.json391 B
  • evaluate-session.sh2.3 KB

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

持续学习技能(Continuous Learning Skill)

在会话结束时自动评估 Claude Code 会话,提取可保存为已学习技能(Learned Skills)的可复用模式。

何时激活

  • 设置从 Claude Code 会话中自动提取模式
  • 为会话评估配置 Stop 钩子(Hook)
  • 查看或整理 ~/.claude/skills/learned/ 中的已学习技能
  • 调整提取阈值或模式类别
  • 比较 v1(当前)与 v2(基于直觉/Instinct)的方法

工作原理

此技能在每个会话结束时作为 Stop 钩子(Hook) 运行:

  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项目特定的约定

钩子设置(Hook Setup)

添加到您的 ~/.claude/settings.json:

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

为什么使用 Stop 钩子?

  • 轻量化:仅在会话结束时运行一次
  • 非阻塞:不会给每条消息增加延迟
  • 完整上下文:可以访问完整的会话记录

相关内容


比较笔记(调研:2025年1月)

与 Homunculus 对比

Homunculus v2 采用了更复杂的方法:

特性我们的方法Homunculus v2
观察机制(Observation)Stop 钩子(会话结束)PreToolUse/PostToolUse 钩子(100% 可靠)
分析方式(Analysis)主上下文(Main context)后台智能体(Haiku agent)
粒度(Granularity)完整技能(Full skills)原子化“直觉”(Atomic "instincts")
置信度(Confidence)无0.3-0.9 权重
演进路径(Evolution)直接生成技能直觉 → 聚类 → 技能/命令/智能体
共享方式(Sharing)无导出/导入直觉

来自 Homunculus 的关键见解:

“v1 依赖技能(Skills)进行观察。技能是概率性的——它们的触发频率约为 50-80%。v2 使用钩子(Hooks)进行观察(100% 可靠),并将‘直觉(Instincts)’作为学习行为的原子单位。”

潜在的 v2 增强功能

  1. 基于直觉的学习 - 带有置信度评分的更小、原子化的行为
  2. 后台观察者 - 并行分析的 Haiku 智能体
  3. 置信度衰减 - 如果发生冲突,直觉的置信度会降低
  4. 领域标签 - 代码风格、测试、Git、调试等
  5. 演进路径 - 将相关的直觉聚类为技能/命令

参见:/Users/affoon/Documents/tasks/12-continuous-learning-v2.md 获取完整规范。

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

Use this skill to design or review REST APIs. It covers resource URLs, HTTP methods and status codes, pagination, filtering, sorting, error responses, authentication, rate limits, and versioning, with patterns for consistent endpoint contracts.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Designing a new REST endpoint
  • Reviewing an existing API contract
  • Choosing pagination and filtering patterns
xu-xiang/everything-claude-code-zh2천2026년 3월 5일 업데이트

Use this skill to design or review REST APIs, including resource URLs, HTTP methods and status codes, pagination, filtering, errors, versioning, and rate limits. It helps make endpoint behavior and response formats consistent for clients and developers.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Designing endpoints for a new REST API
  • Reviewing an API contract
  • Adding pagination, filtering, or sorting
xu-xiang/everything-claude-code-zh2천2026년 3월 5일 업데이트

Draft or refine long-form writing such as articles, guides, blog posts, tutorials, and newsletters. It can follow supplied writing samples or brand guidance, organize sections around a clear purpose, and keep claims grounded in the provided sources.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Draft a blog post from notes or research
  • Match an article to supplied writing samples
  • Turn a transcript into a polished guide
xu-xiang/everything-claude-code-zh2천2026년 3월 5일 업데이트

Use this skill to draft or revise long-form content such as articles, guides, tutorials, and newsletters. It can shape structure and pacing, turn notes or research into polished copy, and match a supplied voice sample or brand guide while checking claims against sources.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Drafting a blog post or newsletter
  • Turning notes or research into an article
  • Matching a supplied writing sample
xu-xiang/everything-claude-code-zh2천2026년 3월 5일 업데이트

Draft or revise long-form pieces such as articles, guides, tutorials, and newsletters. The skill helps shape a clear structure, match a supplied writing sample or brand guide, and ground claims in provided sources without inventing biographical facts, company metrics, or testimonials.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Drafting a blog post from notes or research
  • Matching a supplied brand voice
  • Restructuring a long draft for clarity
xu-xiang/everything-claude-code-zh2천2026년 3월 5일 업데이트

Draft or refine long-form articles, guides, tutorials, and newsletters using a supplied style reference or a clear, practical default voice. The skill helps shape structure, improve pacing, and check claims against source material without inventing credentials or evidence.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Turning research notes into a polished article
  • Matching a founder’s or brand’s writing voice
  • Improving the structure of a long draft
xu-xiang/everything-claude-code-zh2천2026년 3월 5일 업데이트

xu-xiang의 스킬 모두 보기

이 스킬의 문제 신고