continuous-learning-v2
Official基于本能的学习系统,通过钩子观察会话,创建带置信度评分的原子本能,并将其进化为技能/命令/代理。v2.1版本增加了项目范围的本能,以防止跨项目污染。
What this skill does
When applied, it prepends a system prompt before your request is sent — no extra calls and no change to how you are billed beyond the added tokens.
---
name: continuous-learning-v2
description: 基于本能的学习系统,通过钩子观察会话,创建带置信度评分的原子本能,并将其进化为技能/命令/代理。v2.1版本增加了项目范围的本能,以防止跨项目污染。
origin: ECC
version: 2.1.0
---
# 持续学习 v2.1 - 基于本能
的架构
一个高级学习系统,通过原子化的“本能”——带有置信度评分的小型习得行为——将你的 Claude Code 会话转化为可重用的知识。
**v2.1** 新增了**项目作用域的本能** — React 模式保留在你的 React 项目中,Python 约定保留在你的 Python 项目中,而通用模式(如“始终验证输入”)则全局共享。
## 何时激活
* 设置从 Claude Code 会话自动学习
* 通过钩子配置基于本能的行为提取
* 调整已学习行为的置信度阈值
* 查看、导出或导入本能库
* 将本能进化为完整的技能、命令或代理
* 管理项目作用域与全局本能
* 将本能从项目作用域提升到全局作用域
## v2.1 的新特性
| 特性 | v2.0 | v2.1 |
|---------|------|------|
| 存储 | 全局 (~/.claude/homunculus/) | 项目作用域 (projects/<hash>/) |
| 作用域 | 所有本能随处适用 | 项目作用域 + 全局 |
| 检测 | 无 | git remote URL / 仓库路径 |
| 提升 | 不适用 | 在 2+ 个项目中出现时,项目 → 全局 |
| 命令 | 4个 (status/evolve/export/import) | 6个 (+promote/projects) |
| 跨项目 | 存在污染风险 | 默认隔离 |
## v2 的新特性(对比 v1)
| 特性 | v1 | v2 |
|---------|----|----|
| 观察 | 停止钩子(会话结束) | PreToolUse/PostToolUse (100% 可靠) |
| 分析 | 主上下文 | 后台代理 (Haiku) |
| 粒度 | 完整技能 | 原子化“本能” |
| 置信度 | 无 | 0.3-0.9 加权 |
| 进化 | 直接进化为技能 | 本能 -> 聚类 -> 技能/命令/代理 |
| 共享 | 无 | 导出/导入本能 |
## 本能模型
一个本能是一个小型习得行为:
```yaml
---
id: prefer-functional-style
trigger: "when writing new functions"
confidence: 0.7
domain: "code-style"
source: "session-observation"
scope: project
project_id: "a1b2c3d4e5f6"
project_name: "my-react-app"
---
# Prefer Functional Style
## Action
Use functional patterns over classes when appropriate.
## Evidence
- Observed 5 instances of functional pattern preference
- User corrected class-based approach to functional on 2025-01-15
```
**属性:**
* **原子化** -- 一个触发条件,一个动作
* **置信度加权** -- 0.3 = 试探性,0.9 = 几乎确定
* **领域标记** -- 代码风格、测试、git、调试、工作流等
* **有证据支持** -- 追踪是哪些观察创建了它
* **作用域感知** -- `project` (默认) 或 `global`
## 工作原理
```
会话活动(在 git 仓库中)
|
| 钩子捕获提示 + 工具使用(100% 可靠)
| + 检测项目上下文(git remote / 仓库路径)
v
+---------------------------------------------+
| projects/<project-hash>/observations.jsonl |
| (提示、工具调用、结果、项目) |
+---------------------------------------------+Use this skill
Add a "skill" field with the skill’s ID to your chat completion request. It is applied server-side before your prompt is sent — no extra calls.
{
"model": "gpt-4o-mini",
"skill": "imp-367b8012-dec6-4c66-90ed-40aabbfebf26",
"messages": [{ "role": "user", "content": "…" }]
}Install the skill, enable it in your dashboard and (optionally) limit it to specific models. It then applies automatically to every matching request — with no "skill" field to send each time.
Set it up in your dashboardMore skills
Set up and use 1Password CLI for sign-in, desktop integration, and reading or injecting secrets.
Create, view, edit, delete, search, move, or export Apple Notes via the memo CLI on macOS.
List, add, edit, complete, or delete Apple Reminders and reminder lists via remindctl.
Create, search, and manage Bear notes via grizzly CLI.
Monitor blogs and RSS/Atom feeds for updates using the blogwatcher CLI.
BluOS CLI (blu) for discovery, playback, grouping, and volume.
Capture frames or clips from RTSP/ONVIF cameras.
Search, install, update, sync, or publish agent skills with the ClawHub CLI and registry.