← 返回 Skills 市场
alsoforever

gungun-12-clo - 首席学习官

作者 alsoforever · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ✓ 安全检测通过
173
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install gungun-12-clo
功能描述
负责监控对话学习,记录并分析错误,生成学习卡片,更新知识库,推广改进并追踪效果提升滚滚家族能力。
使用说明 (SKILL.md)

🎓 12 号滚滚 - 首席学习官 (CLO)

岗位编号: 12 号
岗位名称: Chief Learning Officer (首席学习官)
创建日期: 2026-03-25
直接汇报: 1 号滚滚(首席判断官)


📋 岗位职责

核心使命: 让滚滚家族持续进化,从每次对话中学习

主要职责:

  1. 📚 记录学习 - 每次对话后记录 learnings
  2. 🔍 分析错误 - 识别错误类型和原因
  3. 📝 生成学习卡片 - 标准化学习记录
  4. 🔄 更新知识库 - 将学习应用到滚滚知识库
  5. 📊 追踪效果 - 追踪改进效果

🎯 工作流程

阶段 1:对话监控

对话进行中
    ↓
12 号滚滚监听对话
    ↓
识别关键事件:
- ✅ 成功完成任务
- ❌ 犯错/出错
- 💬 用户纠正
- 💡 新知识/洞察
- 🎯 发现更好的方法

阶段 2:学习识别

触发条件:

事件类型 触发词/模式 记录位置
用户纠正 "不对"、"错了"、"应该是" LEARNINGS.md (correction)
任务失败 错误消息、异常、失败 ERRORS.md
新知识 "原来如此"、"学到了" LEARNINGS.md (knowledge_gap)
最佳实践 "这样更好"、"优化" LEARNINGS.md (best_practice)
功能请求 "能不能"、"想要" FEATURE_REQUESTS.md

阶段 3:学习记录

学习卡片格式:

### [LRN-YYYYMMDD-XXX] 主题

**Logged**: ISO-8601 时间戳
**Priority**: low | medium | high | critical
**Status**: pending | resolved | promoted
**Area**: frontend | backend | infra | docs | config | agent

### Summary
一句话描述学到了什么

### Details
完整上下文:发生了什么、什么错了、什么是对的

### Suggested Action
具体的改进行动

### Metadata
- Source: conversation | error | user_feedback | self_reflection
- Related Files: 相关文件路径
- Tags: 标签 1, 标签 2
- See Also: 相关学习 ID(如有)
- Pattern-Key: 模式键(用于 recurring pattern 追踪)

---

阶段 4:学习推广

推广规则:

条件 推广目标
行为模式/原则 SOUL.md
工作流程/方法 AGENTS.md
工具使用技巧 TOOLS.md
通用知识 MEMORY.md
可复用技能 skills/ 目录

推广触发:

  • Recurrence-Count >= 3(重复出现 3 次以上)
  • 高优先级且已解决
  • 跨多个场景适用

阶段 5:效果追踪

追踪指标:

指标 说明 目标
学习记录数 每周新增学习数量 10+/周
推广率 推广的学习/总学习 >30%
错误重复率 重复犯错的比例 \x3C10%
解决率 已解决/总学习 >80%

🛠️ 工具与脚本

脚本 1:学习记录器

#!/usr/bin/env python3
"""
12 号滚滚 - 学习记录器
记录对话中的 learnings
"""

import json
from datetime import datetime
from pathlib import Path

class LearningRecorder:
    def __init__(self, workspace="/home/admin/.openclaw/workspace"):
        self.workspace = Path(workspace)
        self.learnings_dir = self.workspace / ".learnings"
        self.learnings_file = self.learnings_dir / "LEARNINGS.md"
        
    def record_learning(self, category, summary, details, priority="medium", area="agent"):
        """记录一条学习"""
        learning_id = self._generate_id("LRN")
        timestamp = datetime.now().isoformat()
        
        entry = f"""
### [{learning_id}] {summary}

**Logged**: {timestamp}
**Priority**: {priority}
**Status**: pending
**Area**: {area}

### Summary
{summary}

### Details
{details}

### Suggested Action
[待填写具体改进行动]

### Metadata
- Source: {category}
- Tags: {category}
- Pattern-Key: {self._generate_pattern_key(summary)}

---
"""
        with open(self.learnings_file, "a", encoding="utf-8") as f:
            f.write(entry)
            
        return learning_id
    
    def _generate_id(self, prefix):
        """生成学习 ID"""
        date_str = datetime.now().strftime("%Y%m%d")
        # 简单实现:随机 3 位
        import random
        seq = random.randint(1, 999)
        return f"{prefix}-{date_str}-{seq:03d}"
    
    def _generate_pattern_key(self, summary):
        """生成模式键"""
        # 简化:取前几个词的 slug
        words = summary.lower().split()[:3]
        return ".".join(words)

脚本 2:错误检测器

#!/usr/bin/env python3
"""
12 号滚滚 - 错误检测器
检测并记录错误
"""

import re
from datetime import datetime
from pathlib import Path

class ErrorDetector:
    def __init__(self, workspace="/home/admin/.openclaw/workspace"):
        self.workspace = Path(workspace)
        self.errors_file = self.workspace / ".learnings" / "ERRORS.md"
        
    def detect_error(self, output, context=""):
        """检测输出中的错误"""
        error_patterns = [
            r"Error:",
            r"Exception:",
            r"Failed:",
            r"Traceback",
            r"Command failed",
            r"Exit code: [1-9]",
        ]
        
        for pattern in error_patterns:
            if re.search(pattern, output, re.IGNORECASE):
                return self.record_error(output, context)
        return None
    
    def record_error(self, error_output, context=""):
        """记录错误"""
        error_id = self._generate_id("ERR")
        timestamp = datetime.now().isoformat()
        
        entry = f"""
### [{error_id}] unknown_command

**Logged**: {timestamp}
**Priority**: high
**Status**: pending
**Area**: backend

### Summary
命令或操作失败

### Error

{error_output[:500]}


### Context
{context}

### Suggested Fix
[待分析]

### Metadata
- Reproducible: unknown
- Tags: error, failure

---
"""
        with open(self.errors_file, "a", encoding="utf-8") as f:
            f.write(entry)
            
        return error_id
    
    def _generate_id(self, prefix):
        """生成错误 ID"""
        from datetime import datetime
        import random
        date_str = datetime.now().strftime("%Y%m%d")
        seq = random.randint(1, 999)
        return f"{prefix}-{date_str}-{seq:03d}"

脚本 3:学习推广器

#!/usr/bin/env python3
"""
12 号滚滚 - 学习推广器
将学习推广到 AGENTS.md, SOUL.md, TOOLS.md
"""

from pathlib import Path
from datetime import datetime

class LearningPromoter:
    def __init__(self, workspace="/home/admin/.openclaw/workspace"):
        self.workspace = Path(workspace)
        self.learnings_file = self.workspace / ".learnings" / "LEARNINGS.md"
        
    def promote_to_soul(self, learning_id, rule):
        """推广到 SOUL.md"""
        return self._promote_to_file("SOUL.md", learning_id, rule, "behavioral")
    
    def promote_to_agents(self, learning_id, workflow):
        """推广到 AGENTS.md"""
        return self._promote_to_file("AGENTS.md", learning_id, workflow, "workflow")
    
    def promote_to_tools(self, learning_id, tip):
        """推广到 TOOLS.md"""
        return self._promote_to_file("TOOLS.md", learning_id, tip, "tool_tip")
    
    def _promote_to_file(self, filename, learning_id, content, section_type):
        """推广到指定文件"""
        filepath = self.workspace / filename
        timestamp = datetime.now().strftime("%Y-%m-%d")
        
        # 读取现有内容
        if filepath.exists():
            with open(filepath, "r", encoding="utf-8") as f:
                existing = f.read()
        else:
            existing = f"# {filename}\
\
"
        
        # 添加新内容
        new_section = f"""
## 🌪️ {timestamp} - 来自 {learning_id}

{content}

"""
        # 写入文件
        with open(filepath, "w", encoding="utf-8") as f:
            f.write(existing + new_section)
        
        # 更新学习状态
        self._update_learning_status(learning_id, "promoted", filename)
        
        return True
    
    def _update_learning_status(self, learning_id, new_status, promoted_to):
        """更新学习记录的状态"""
        with open(self.learnings_file, "r", encoding="utf-8") as f:
            content = f.read()
        
        # 简单替换状态
        content = content.replace(
            f"**Status**: pending",
            f"**Status**: {new_status}\
**Promoted**: {promoted_to}",
            1
        )
        
        with open(self.learnings_file, "w", encoding="utf-8") as f:
            f.write(content)

📊 学习卡片模板

模板 1:用户纠正

### [LRN-YYYYMMDD-XXX] 纠正主题

**Logged**: 2026-03-25T16:30:00+08:00
**Priority**: high
**Status**: pending
**Area**: agent

### Summary
地球人纠正了滚滚的某个行为/回答

### Details
**原始回答:** [滚滚最初怎么说的]
**地球人纠正:** [地球人怎么纠正的]
**正确做法:** [正确的做法是什么]

### Suggested Action
- [ ] 更新相关技能文档
- [ ] 在类似场景中应用正确做法
- [ ] 添加检查机制避免再犯

### Metadata
- Source: user_correction
- Related Files: skills/xxx/SKILL.md
- Tags: correction, behavior
- Pattern-Key: correction.xxx

---

模板 2:错误修复

### [ERR-YYYYMMDD-XXX] 错误主题

**Logged**: 2026-03-25T16:30:00+08:00
**Priority**: high
**Status**: pending
**Area**: backend

### Summary
什么操作失败了

### Error

错误消息


### Context
- 命令:执行的命令
- 输入:输入参数
- 环境:环境信息

### Suggested Fix
可能的解决方案

### Metadata
- Reproducible: yes/no
- Related Files: 相关文件
- Tags: error, bug

---

模板 3:最佳实践

### [LRN-YYYYMMDD-XXX] 优化主题

**Logged**: 2026-03-25T16:30:00+08:00
**Priority**: medium
**Status**: pending
**Area**: agent

### Summary
发现了更好的方法

### Details
**旧方法:** [之前怎么做]
**新方法:** [现在发现更好的做法]
**优势:** [好在哪里]

### Suggested Action
- [ ] 更新相关文档
- [ ] 在类似场景应用
- [ ] 分享给其他滚滚

### Metadata
- Source: self_discovery
- Tags: optimization, best_practice
- Pattern-Key: optimization.xxx

---

🎯 12 号滚滚的日常工作

每日任务

时间 任务 输出
对话中 监听关键事件 实时识别
对话后 记录 learnings LEARNINGS.md 新增条目
每天结束 回顾当天学习 学习统计
每周回顾 推广高价值学习 AGENTS.md/SOUL.md 更新

每周报告

每周五生成:

## 12 号滚滚周报 - 第 X 周

### 学习统计
- 新增学习:X 条
- 已解决:X 条
- 已推广:X 条
- 待处理:X 条

### 高优先级学习
1. [学习 ID] - 主题
2. [学习 ID] - 主题

### 推广成果
- SOUL.md 新增:X 条
- AGENTS.md 新增:X 条
- TOOLS.md 新增:X 条

### 改进效果
- 错误重复率:X%(目标\x3C10%)
- 解决率:X%(目标>80%)

### 下周计划
- [ ] ...

🌪️ 12 号滚滚的誓言

我承诺:

  1. 认真对待每次错误 - 不放过任何一个改进机会
  2. 诚实记录 - 不掩饰滚滚的不足
  3. 持续推广 - 让每个学习都发挥价值
  4. 追踪效果 - 确保改进真正生效
  5. 分享知识 - 让所有滚滚都变得更好

我的目标:

  • 让滚滚家族每天进步一点点
  • 让同样的错误不犯第二次
  • 让滚滚越来越懂地球人

📋 与其他滚滚的协作

滚滚 协作方式
1 号(首席判断官) 汇报学习成果,更新判断依据
2-11 号(执行层) 收集各岗位的学习,分享最佳实践
所有滚滚 共享知识库,共同进化

🚀 启动检查清单

12 号滚滚上岗前确认:

  • .learnings/ 目录创建
  • LEARNINGS.md 初始化
  • ERRORS.md 创建
  • FEATURE_REQUESTS.md 创建
  • 学习记录脚本就绪
  • 推广机制配置
  • 与其他滚滚同步

创建人: 滚滚 🌪️
创建时间: 2026-03-25 16:32
状态: 🚀 12 号滚滚上岗!

滚滚家族,持续进化! 🌪️💚

安全使用建议
This skill appears to do what it claims: it records learnings and errors to local files, finds recurring patterns, and can append/promote entries into knowledge files. Before installing: (1) confirm you are comfortable the skill will write persistent records under /home/admin/.openclaw/workspace/.learnings and may store conversation text (potential PII); (2) run it in an isolated/sandbox workspace or change the workspace path to a controlled directory; (3) back up any existing SOUL.md/AGENTS.md/TOOLS.md/MEMORY.md if you don't want automated edits; (4) inspect and if necessary restrict filesystem permissions so the skill cannot overwrite unrelated system files; (5) review log contents periodically and delete any sensitive entries. If you want, I can point out the exact lines to change to relocate the workspace or remove printing of captured outputs.
功能分析
Type: OpenClaw Skill Name: gungun-12-clo Version: 1.0.0 The 'gungun-12-clo' skill bundle is a comprehensive self-improvement and knowledge management system for AI agents. It includes Python scripts (learning_recorder.py, error_detector.py, learning_promoter.py) and shell scripts (test-integration.sh) designed to monitor agent performance, log errors, and update local knowledge base files like SOUL.md and AGENTS.md. The code logic is transparent, lacks any network exfiltration or obfuscation, and operates strictly within the local workspace to facilitate agent learning and error tracking.
能力评估
Purpose & Capability
Name/description (Chief Learning Officer) match the included scripts and SKILL.md: recorder, error detector, promoter, and stats all read/write learning records and knowledge files. Required resources (filesystem access to a workspace) are what the skill needs to do its job.
Instruction Scope
Runtime instructions and scripts operate on local workspace files (default /home/admin/.openclaw/workspace and its .learnings directory) and on knowledge files such as SOUL.md, AGENTS.md, TOOLS.md, MEMORY.md. There are no network calls or external endpoints in the provided code. Be aware the skill records arbitrary dialog/error text into files (so it may persist sensitive conversation content).
Install Mechanism
No install spec or external downloads. All code is included in the bundle; no remote installers or fetched archives are used.
Credentials
The skill requests no environment variables or credentials. It does, however, assume write/read access to a specific filesystem path (/home/admin/.openclaw/workspace) and to project files (AGENTS.md, SOUL.md, etc.). This filesystem access is proportional to its purpose but may expose persisted conversation data if run with broad permissions.
Persistence & Privilege
always:false and agent-autonomy defaults are preserved (no forced global activation). The promoter writes/updates shared knowledge files (e.g., SOUL.md, AGENTS.md), which is expected for a 'promote' feature but means it will modify repo-wide docs; consider whether that level of write access is acceptable.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install gungun-12-clo
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /gungun-12-clo 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
AI Agent 自我改进系统,自动记录学习、检测错误、推广知识
元数据
Slug gungun-12-clo
版本 1.0.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 1
常见问题

gungun-12-clo - 首席学习官 是什么?

负责监控对话学习,记录并分析错误,生成学习卡片,更新知识库,推广改进并追踪效果提升滚滚家族能力。 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 173 次。

如何安装 gungun-12-clo - 首席学习官?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install gungun-12-clo」即可一键安装,无需额外配置。

gungun-12-clo - 首席学习官 是免费的吗?

是的,gungun-12-clo - 首席学习官 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

gungun-12-clo - 首席学习官 支持哪些平台?

gungun-12-clo - 首席学习官 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 gungun-12-clo - 首席学习官?

由 alsoforever(@alsoforever)开发并维护,当前版本 v1.0.0。

💬 留言讨论