Agent skill

Continuous Learning V2

by xu-xiang in xu-xiang/everything-claude-code-zh

一种基于本能(Instinct)的训练系统,通过钩子(Hooks)观察会话,创建带有置信度评分的原子化本能,并将其进化为技能(Skills)、命令(Commands)或智能体(Agents)。

MITAuto-check passedAgent Workflows

Install Continuous Learning V2

skills CLI
$ npx skills add xu-xiang/everything-claude-code-zh --skill continuous-learning-v2 -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install xu-xiang/everything-claude-code-zh continuous-learning-v2 --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/xu-xiang/everything-claude-code-zh.git skills-src && mkdir -p .claude/skills && cp -r skills-src/docs/ja-JP/skills/continuous-learning-v2 .claude/skills/continuous-learning-v2 && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
continuous-learning-v2
GitHub stars
2k
Token cost
~1.5k tokens
SKILL.md length
181 words
Files
2
Skills in repo
78
Repo updated
First seen
Licence
MIT

At a glance

一种基于本能(Instinct)的训练系统,通过钩子(Hooks)观察会话,创建带有置信度评分的原子化本能,并将其进化为技能(Skills)、命令(Commands)或智能体(Agents)。

  • Works in 3 steps: 启用观察钩子(Observation Hooks) → 初始化目录结构 → 使用本能命令
  • Agent Workflows work in your project
  • SKILL.md covers v2 新特性, 本能模型(Instinct Model), 工作原理 and 快速入门, plus 9 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Continuous Learning V2 is an agent skill from xu-xiang/everything-claude-code-zh. 一种基于本能(Instinct)的训练系统,通过钩子(Hooks)观察会话,创建带有置信度评分的原子化本能,并将其进化为技能(Skills)、命令(Commands)或智能体(Agents)。

Its SKILL.md is about 1.5k tokens, which your agent loads only when the skill is triggered. The skill folder holds 2 other files (for example `agents/observer.md`).

It sits in Agent Workflows. The repository describes itself as: everything-claude-code 中文翻译项目:完整的 Claude Code 配置集合(agents, skills, hooks, commands, rules, MCPs)。源自 Anthropic 黑客松获胜者的实战配置,助力中文工程师高效理解与使用 Claude Code。 The licence is MIT.

When your agent uses it

  • Agent Workflows work in your project

Example prompts

  • “/continuous-learning-v2”

Requirements

  • Python 3

Workflow steps

3 steps, taken from the step headings in SKILL.md.

  1. 启用观察钩子(Observation Hooks)
  2. 初始化目录结构
  3. 使用本能命令

What it can do on your machine

Read from SKILL.md and the folder at commit dfbf946. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are json, bash and yaml).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Links to these hosts (documentation or services it may open):

    • skill-creator.app
    • x.com

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Continuous Learning V2 loads about 1.5k tokens when it runs. Until then it costs about 30 tokens; SKILL.md has 181 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~30
When it runs · the whole SKILL.md, loaded when a task matches
~1.5k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from xu-xiang/everything-claude-code-zh at commit dfbf946, republished under its MIT licence (© xu-xiang). 181 words, ~1,540 tokens.

Download SKILL.mdSave it as .claude/skills/continuous-learning-v2/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
continuous-learning-v2
description
一种基于本能(Instinct)的训练系统,通过钩子(Hooks)观察会话,创建带有置信度评分的原子化本能,并将其进化为技能(Skills)、命令(Commands)或智能体(Agents)。
version
2.0.0

持续学习(Continuous Learning)v2 - 基于本能(Instinct)的架构

这是一款先进的学习系统,能够通过带有置信度评分的小型已学习行为——“本能(Instinct)”,将 Claude Code 会话转化为可重用的知识。

v2 新特性

特性v1v2
观察(Observation)Stop 钩子(会话结束时)PreToolUse/PostToolUse(100% 可靠性)
分析主上下文(Main Context)后台智能体(Background Agent, Haiku)
粒度完整的技能(Skill)原子化“本能(Instinct)”
置信度无0.3-0.9 加权
进化直接转化为技能本能 → 聚类 → 技能/命令/智能体
共享无本能导出/导入

本能模型(Instinct Model)

本能(Instinct)是小型且已学习的行为:

yaml
---
id: prefer-functional-style
trigger: "when writing new functions"
confidence: 0.7
domain: "code-style"
source: "session-observation"
---

# 优先使用函数式风格

## Action
在合适的情况下,优先使用函数式模式而非类(Class)。

## Evidence
- 观察到 5 次优先使用函数式模式
- 用户在 2025-01-15 将基于类的方法修正为函数式

属性:

  • 原子化(Atomic) — 一个触发器,一个动作。
  • 置信度加权(Confidence Weighting) — 0.3 = 暂定,0.9 = 几乎确定。
  • 领域标签(Domain Tagged) — 如 code-style、testing、git、debugging、workflow 等。
  • 基于证据(Evidence-based) — 跟踪创建该本能的观察记录。

工作原理

会话活动(Session Activity)
      │
      │ 钩子捕获提示词 + 工具调用(100% 可靠性)
      ▼
┌─────────────────────────────────────────┐
│         observations.jsonl              │
│   (prompts, tool calls, outcomes)       │
└─────────────────────────────────────────┘
      │
      │ 观察者智能体(Observer Agent)读取(后台运行,Haiku)
      ▼
┌─────────────────────────────────────────┐
│              模式检测                   │
│   • 用户修正 → 本能                     │
│   • 错误解决 → 本能                     │
│   • 重复工作流 → 本能                   │
└─────────────────────────────────────────┘
      │
      │ 创建/更新
      ▼
┌─────────────────────────────────────────┐
│         instincts/personal/             │
│   • prefer-functional.md (0.7)          │
│   • always-test-first.md (0.9)          │
│   • use-zod-validation.md (0.6)         │
└─────────────────────────────────────────┘
      │
      │ /evolve 聚类
      ▼
┌─────────────────────────────────────────┐
│              evolved/                   │
│   • commands/new-feature.md             │
│   • skills/testing-workflow.md          │
│   • agents/refactor-specialist.md       │
└─────────────────────────────────────────┘

快速入门

1. 启用观察钩子(Observation Hooks)

添加到 ~/.claude/settings.json 中。

作为插件安装时(推荐):

json
{
  "hooks": {
    "PreToolUse": [{
      "matcher": "*",
      "hooks": [{
        "type": "command",
        "command": "${CLAUDE_PLUGIN_ROOT}/skills/continuous-learning-v2/hooks/observe.sh pre"
      }]
    }],
    "PostToolUse": [{
      "matcher": "*",
      "hooks": [{
        "type": "command",
        "command": "${CLAUDE_PLUGIN_ROOT}/skills/continuous-learning-v2/hooks/observe.sh post"
      }]
    }]
  }
}

在 ~/.claude/skills 中手动安装时:

json
{
  "hooks": {
    "PreToolUse": [{
      "matcher": "*",
      "hooks": [{
        "type": "command",
        "command": "~/.claude/skills/continuous-learning-v2/hooks/observe.sh pre"
      }]
    }],
    "PostToolUse": [{
      "matcher": "*",
      "hooks": [{
        "type": "command",
        "command": "~/.claude/skills/continuous-learning-v2/hooks/observe.sh post"
      }]
    }]
  }
}
2. 初始化目录结构

Python CLI 会自动创建,但你也可以手动创建:

bash
mkdir -p ~/.claude/homunculus/{instincts/{personal,inherited},evolved/{agents,skills,commands}}
touch ~/.claude/homunculus/observations.jsonl
3. 使用本能命令
bash
/instinct-status     # 显示带有置信度评分的已学习本能
/evolve              # 将相关的本能聚类为技能/命令
/instinct-export     # 导出本能以便共享
/instinct-import     # 从他人处导入本能

命令(Commands)

命令说明
/instinct-status显示所有已学习的本能及其置信度
/evolve将相关的本能聚类为技能/命令
/instinct-export导出本能以便共享
/instinct-import <file>从他人处导入本能

配置(Configuration)

编辑 config.json:

json
{
  "version": "2.0",
  "observation": {
    "enabled": true,
    "store_path": "~/.claude/homunculus/observations.jsonl",
    "max_file_size_mb": 10,
    "archive_after_days": 7
  },
  "instincts": {
    "personal_path": "~/.claude/homunculus/instincts/personal/",
    "inherited_path": "~/.claude/homunculus/instincts/inherited/",
    "min_confidence": 0.3,
    "auto_approve_threshold": 0.7,
    "confidence_decay_rate": 0.05
  },
  "observer": {
    "enabled": true,
    "model": "haiku",
    "run_interval_minutes": 5,
    "patterns_to_detect": [
      "user_corrections",
      "error_resolutions",
      "repeated_workflows",
      "tool_preferences"
    ]
  },
  "evolution": {
    "cluster_threshold": 3,
    "evolved_path": "~/.claude/homunculus/evolved/"
  }
}

文件结构

~/.claude/homunculus/
├── identity.json           # 个人资料、技术水平
├── observations.jsonl      # 当前会话观察记录
├── observations.archive/   # 已处理的观察记录
├── instincts/
│   ├── personal/           # 自动学习的本能
│   └── inherited/          # 从他人处导入的本能
└── evolved/
    ├── agents/             # 生成的专项智能体
    ├── skills/             # 生成的技能
    └── commands/           # 生成的命令

与 Skill Creator 的集成

使用 Skill Creator GitHub App 会同时生成:

  • 传统的 SKILL.md 文件(用于向后兼容)
  • 本能集合(用于 v2 学习系统)

来自仓库分析的本能会带有 source: "repo-analysis" 标记,并包含源仓库 URL。

置信度评分(Confidence Scoring)

置信度会随着时间进化:

分数含义行为
0.3暂定会被建议但不会强制执行
0.5中等在相关情况下应用
0.7强应用会被自动批准
0.9几乎确定核心行为

置信度提升的情况:

  • 模式被重复观察到。
  • 用户未对建议的行为进行修正。
  • 来自其他源的类似本能匹配。

置信度下降的情况:

  • 用户显式修正了行为。
  • 长期未观察到该模式。
  • 出现了矛盾的证据。

为什么在观察中使用钩子(Hooks)而不是技能(Skills)?

“v1 依赖于技能进行观察。技能是概率性的,根据 Claude 的判断,其触发概率约为 50-80%。”

钩子(Hooks)是100% 确定性触发的。这意味着:

  • 所有的工具调用都会被观察到。
  • 模式不会被遗漏。
  • 学习是全面的。

向后兼容性

v2 与 v1 完全兼容:

  • 现有的 ~/.claude/skills/learned/ 技能仍然有效。
  • Stop 钩子仍然会运行(但也会为 v2 提供数据)。
  • 平滑迁移路径:支持两者并行运行。

隐私(Privacy)

  • 观察记录保留在机器本地。
  • 仅可导出本能(模式)。
  • 实际的代码或对话内容不会被共享。
  • 你可以控制导出的内容。

相关链接

  • Skill Creator - 从仓库历史生成本能。
  • Homunculus - v2 架构的灵感来源(原子化观察、置信度评分、本能进化流水线)。
  • The Longform Guide - 持续学习章节。

基于本能的学习:一次一次地观察,教会 Claude 你的模式。

© xu-xiang, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 1 other file in docs/ja-JP/skills/continuous-learning-v2 of xu-xiang/everything-claude-code-zh.

  • SKILL.md
  • agents/observer.md

Open the folder on GitHubat commit dfbf946

Compare with similar skills

Continuous Learning V2 next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Continuous Learning V2 compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Continuous Learning V2 this skillxu-xiang/everything-claude-code-zh2k—~1.5kAutomated safety check: PassMIT
MCP Server Builderanthropics/skills180k64 repos~2.3kAutomated safety check: PassApache-2.0
Hook Development for Claude Code Pluginsanthropics/claude-plugins-official38k11 repos~4.1kAutomated safety check: NotesApache-2.0
Using Superpowersfarm-fe/farm5.6k35 repos~1.4kAutomated safety check: PassMIT
Executing Plans Inlineobra/superpowers296k2 repos~5.1kAutomated safety check: PassMIT
Claude Code Agent Developmentanthropics/claude-plugins-official38k8 repos~2.8kAutomated safety check: PassApache-2.0

Similar skills

  • MCP Server Builder

    anthropics/skills

    Official

    Guides the design and implementation of Model Context Protocol servers in TypeScript or Python, from tool naming and error messages to evaluation.

    180k GitHub starsUsed in 64 repos~2.3k tokens
    Agent WorkflowsAuto-check passed
  • Hook Development for Claude Code Plugins

    anthropics/claude-plugins-official

    Official

    Explains how to write Claude Code plugin hooks, both prompt-based checks and bash commands, for events such as PreToolUse, Stop and SessionStart.

    38k GitHub starsUsed in 11 repos~4.1k tokens
    Agent WorkflowsAuto-check: notes
  • Using Superpowers

    farm-fe/farm

    A skill your agent uses when starting any conversation - establishes how to find and use skills, requiring Skill tool invocation before ANY response including clarifying questions

    5.6k GitHub starsUsed in 35 repos~1.4k tokens
    Agent WorkflowsAuto-check passed
  • Executing Plans Inline

    obra/superpowers

    Has the agent carry out an implementation plan itself, task by task in the current session, keeping a ledger, proving each step with a test and ending with one whole-branch review.

    296k GitHub starsUsed in 2 repos~5.1k tokens
    Agent WorkflowsAuto-check passed
  • Claude Code Agent Development

    anthropics/claude-plugins-official

    Official

    Explains how to write agents for Claude Code plugins: the markdown file with YAML frontmatter, trigger descriptions, model and color settings, and system prompt design.

    38k GitHub starsUsed in 8 repos~2.8k tokens
    Agent WorkflowsAuto-check passed
  • Skill Creator

    Azure/azqr

    Official

    Create new skills, modify and improve existing skills, and measure skill performance.

    795 GitHub starsUsed in 89 repos~8.2k tokens
    Agent WorkflowsAuto-check passed

More from xu-xiang/everything-claude-code-zh

All 78 skills in this repo
  • Configure Ecc

    xu-xiang/everything-claude-code-zh

    Everything Claude Code 的交互式安装程序 — 引导用户选择并安装技能和规则到用户级或项目级目录,验证路径,并可选择优化已安装文件。

    2k GitHub starsUsed in 1 repo~2.1k tokens
    Auto-check passed
  • Continuous Learning V2

    xu-xiang/everything-claude-code-zh

    基于本能(Instinct)的学习系统,通过钩子(hooks)观察会话,创建带有置信度评分的原子本能,并将其演化为技能(Skills)、命令(Commands)或智能体(Agents)。v2.1 版本增加了项目作用域(project-scoped)的本能,以防止跨项目污染。

    2k GitHub stars~2.1k tokensUpdated 7 mo ago
    Auto-check passed
  • API Design

    xu-xiang/everything-claude-code-zh

    生产级 API 的 REST API 设计模式,包括资源命名、状态码、分页、过滤、错误响应、版本控制和速率限制. An agent skill from xu-xiang/everything-claude-code-zh.

    2k GitHub stars~2.7k tokensUpdated 7 mo ago
    Auto-check passed
  • Backend Patterns

    xu-xiang/everything-claude-code-zh

    后端架构模式、API 设计、数据库优化以及适用于 Node.js、Express 和 Next.js API 路由的服务端最佳实践。

    2k GitHub stars~3.2k tokensUpdated 7 mo ago
    Auto-check passed
  • Backend Patterns

    xu-xiang/everything-claude-code-zh

    后端架构模式、API 设计、数据库优化以及 Node.js、Express 和 Next.js API 路由的服务端最佳实践。

    2k GitHub stars~3.1k tokensUpdated 7 mo ago
    Auto-check passed
  • Backend Patterns

    xu-xiang/everything-claude-code-zh

    后端架构模式、API 设计、数据库优化以及针对 Node.js、Express 和 Next.js API 路由的服务端最佳实践。

    2k GitHub stars~3.2k tokensUpdated 7 mo ago
    Auto-check passed

Categories

Questions about Continuous Learning V2

What does Continuous Learning V2 do?

一种基于本能(Instinct)的训练系统,通过钩子(Hooks)观察会话,创建带有置信度评分的原子化本能,并将其进化为技能(Skills)、命令(Commands)或智能体(Agents)。. Continuous Learning V2 is an agent skill from xu-xiang/everything-claude-code-zh.

When should I use Continuous Learning V2?

Continuous Learning V2 fits situations like: agent Workflows work in your project.

How do I install Continuous Learning V2 in Claude Code?

Run `npx skills add xu-xiang/everything-claude-code-zh --skill continuous-learning-v2 -a claude-code`. Or copy the skill folder (docs/ja-JP/skills/continuous-learning-v2 in xu-xiang/everything-claude-code-zh) into .claude/skills/continuous-learning-v2 in your project. Claude Code loads it when a task matches its description.

How do I install Continuous Learning V2 in Codex?

Run `npx skills add xu-xiang/everything-claude-code-zh --skill continuous-learning-v2 -a codex`. Or copy the skill folder (docs/ja-JP/skills/continuous-learning-v2 in xu-xiang/everything-claude-code-zh) into .agents/skills/continuous-learning-v2 in your project. Codex loads it when a task matches its description.

Can I use Continuous Learning V2 in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add xu-xiang/everything-claude-code-zh --skill continuous-learning-v2 -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/continuous-learning-v2, .gemini/skills/continuous-learning-v2, .github/skills/continuous-learning-v2 and .opencode/skills/continuous-learning-v2 in your project.

What does Continuous Learning V2 need to run?

SKILL.md names no scripts, command-line tools or credentials: Continuous Learning V2 is instructions for the agent only. Our summary lists: Python 3.

Does Continuous Learning V2 access the network?

SKILL.md names 2 domains. As links in the text: skill-creator.app and x.com. This is read from the text; nothing was executed.

Is Continuous Learning V2 safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Continuous Learning V2 use?

Continuous Learning V2 is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Continuous Learning V2 use?

About 1.5k tokens (SKILL.md is roughly 6.2k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Continuous Learning V2?

Skills that share tags, products or a category with Continuous Learning V2: MCP Server Builder (anthropics/skills, 180k stars), Hook Development for Claude Code Plugins (anthropics/claude-plugins-official, 38k stars), Using Superpowers (farm-fe/farm, 5.6k stars) and Executing Plans Inline (obra/superpowers, 296k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Continuous Learning V2?

xu-xiang (a GitHub user) maintains it in xu-xiang/everything-claude-code-zh, which has 1,973 GitHub stars. The repository holds 78 skills in this directory. The repository was last updated on March 5, 2026.

Source: xu-xiang/everything-claude-code-zh on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.