← 返回
未分类

keep-learning

Learn and memorize knowledge from local directories. Supports Markdown and code files. Extracts key insights, builds knowledge index, and stores in agent mem...
从本地目录学习并记忆知识,支持 Markdown 和代码文件。提取关键见解,构建知识索引并存储。
nileader nileader 来源
未分类 clawhub v0.0.2 1 版本 100000 Key: 无需
★ 1
Stars
📥 842
下载
💾 2
安装
1
版本
#latest

概述

Keep Learning

Learn knowledge from local directories and store it in agent memory for future reference.

When to Use This Skill

Activate this skill when user says:

  • "持续学习知识"
  • "keep learning"
  • "learn knowledge base"
  • "学习知识库"

Supported File Formats (v0.0.1)

FormatExtensionsSupport
-----------------------------
Markdown.md, .markdownFull
Python.pyFull
JavaScript/TypeScript.js, .ts, .jsx, .tsxFull
Java.javaFull
Go.goFull
Rust.rsFull
C/C++.c, .cpp, .h, .hppFull
Shell.sh, .bash, .zshFull
YAML/JSON/TOML.yaml, .yml, .json, .tomlFull
SQL.sqlFull
Other text.txt, .csvFull

Not supported in v0.0.1: PDF, Word, Excel, PowerPoint, Keynote, audio, video files.

Three-Layer Knowledge Architecture

LayerStorageContentPurpose
----------------------------------
L1 Core MemoryAgent MemoryKey conclusions, core concepts, decisionsAuto-surface in daily conversations
L2 Knowledge IndexAgent MemoryFile paths, summaries, keyword mappingsKnow where knowledge lives
L3 Source FilesLocal filesystemComplete original contentDeep-dive when needed via read_file

How It Works:

  1. Daily conversations: L1 memories automatically appear in memory_overview
  2. Need more detail: Query L2 index to find relevant files
  3. Deep investigation: Use read_file to access L3 source files

Runtime Data Directory

All runtime data is stored in ~/.keep-learning/:

FilePurpose
---------------
last-commitGit commit hash of last learning session
config.jsonUser configuration (knowledge base path, etc.)

Learning Workflow

Step 1: Get Configuration

First, search memory (category: project_environment_configuration) for an existing knowledge base path.

  • If found: confirm the path with the user before proceeding. Example: "Found your knowledge base at ~/knowledge/work-assistant. Start learning from there?"
  • If NOT found: stop and ask the user to provide the knowledge base path before doing anything else. Do NOT proceed until the user provides a valid path. Example: "Please provide the path to your knowledge base directory (e.g., ~/knowledge/work-assistant)."

Once confirmed, store the path in memory using update_memory with category project_environment_configuration.

Step 2: Git Pull (If Applicable)

Check if knowledge base is a git repository and pull latest changes before learning.

Step 3: Scan Files

Scan for supported files. Exclude: .git, node_modules, .obsidian, __pycache__, .venv

Step 4: Detect Changes (Incremental Learning)

For git repositories, detect ALL types of changes:

  1. Committed changes: Compare current HEAD with last-commit hash stored in ~/.keep-learning/last-commit using git diff HEAD --name-only
  2. Uncommitted changes: Detect modified/added files in working directory using git status --porcelain

Combine both results to get the full list of changed files. This ensures learning happens even when:

  • Remote has no updates, but local files were edited
  • Local commits exist that haven't been pushed yet
  • Files are modified but not yet committed

After learning completes, update ~/.keep-learning/last-commit with current HEAD hash.

For non-git directories: scan all supported files (no incremental detection).

Step 5: Read and Extract Knowledge

For each file: read content, identify theme/concepts/conclusions, extract key knowledge.

Step 6: Store L1 Core Memory

Create L1 memory entries using update_memory with appropriate category:

  • expert_experience: Domain expertise, best practices
  • project_introduction: Project/product overviews
  • learned_skill_experience: Reusable methods, procedures

Title format: [Domain] Concise Topic Description

Step 7: Build L2 Knowledge Index

Create knowledge index with file path, theme, keywords mappings.

Step 8: Generate Learning Report

Output: Timestamp, Statistics, L1 Memories list, L2 Index summary, Notes.

Memory Deduplication

Before creating: search_memory first. If exists, update; if not, create.

Quick Reference

SituationAction
-------------------
First time userAsk for knowledge base path
Git repo detectedRun git pull before scanning
Large fileRead in chunks, summarize each section
Duplicate knowledgeUpdate existing memory
Unsupported fileSkip and note in report

Limitations (v0.0.1)

  • Only Markdown and code files supported
  • No PDF/Word/Excel/PPT support
  • Memory entries have size limits

版本历史

共 1 个版本

  • v0.0.2 当前
    2026-03-30 09:50 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

ai-agent

Self-Improving + Proactive Agent

ivangdavila
自我反思+自我批评+自我学习+自组织记忆。智能体评估自身工作、发现错误并持续改进。
★ 1,413 📥 325,524
ai-agent

Skill Vetter

spclaudehome
AI智能体技能安全预审工具。安装ClawdHub、GitHub等来源技能前,检查风险信号、权限范围及可疑模式。
★ 1,243 📥 271,564
ai-agent

self-improving agent

pskoett
记录自身发现以实现自我改进的技能
★ 4,124 📥 873,100