← 返回 Skills 市场
nileader

keep-learning

作者 nileader · GitHub ↗ · v0.0.2 · MIT-0
cross-platform ✓ 安全检测通过
507
总下载
1
收藏
2
当前安装
2
版本数
在 OpenClaw 中安装
/install 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...
使用说明 (SKILL.md)

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)

Format Extensions Support
Markdown .md, .markdown Full
Python .py Full
JavaScript/TypeScript .js, .ts, .jsx, .tsx Full
Java .java Full
Go .go Full
Rust .rs Full
C/C++ .c, .cpp, .h, .hpp Full
Shell .sh, .bash, .zsh Full
YAML/JSON/TOML .yaml, .yml, .json, .toml Full
SQL .sql Full
Other text .txt, .csv Full

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

Three-Layer Knowledge Architecture

Layer Storage Content Purpose
L1 Core Memory Agent Memory Key conclusions, core concepts, decisions Auto-surface in daily conversations
L2 Knowledge Index Agent Memory File paths, summaries, keyword mappings Know where knowledge lives
L3 Source Files Local filesystem Complete original content Deep-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/:

File Purpose
last-commit Git commit hash of last learning session
config.json User 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 \x3Clast-commit> 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

Situation Action
First time user Ask for knowledge base path
Git repo detected Run git pull before scanning
Large file Read in chunks, summarize each section
Duplicate knowledge Update existing memory
Unsupported file Skip 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
安全使用建议
This skill is coherent for indexing and memorizing local knowledge, but it necessarily reads all files under the user-provided path and may run git pull (network access) if the folder is a repo. Before installing or enabling: 1) Only point the skill at directories you are comfortable having the agent read and summarize. 2) Be aware the skill will store summaries and a last-commit file in ~/.keep-learning. 3) If you do not want network accesses, avoid using it on git repositories or disable auto-pull in your workflow. 4) Confirm the agent has appropriate permissions and review memory entries periodically to remove any sensitive items the skill may have stored.
功能分析
Type: OpenClaw Skill Name: keep-learning Version: 0.0.2 The 'keep-learning' skill is designed to index local knowledge bases (Markdown and source code) into the agent's memory. It follows a structured workflow including user confirmation of the target directory, git-based incremental updates, and multi-layered memory storage. The logic in SKILL.md and README.md is consistent with its stated purpose and uses standard agent capabilities (filesystem, terminal, and memory) without evidence of malicious intent, data exfiltration, or unauthorized system access.
能力评估
Purpose & Capability
Name/description claim: learn from local directories and store memories. Snack: SKILL.md only asks for filesystem access, optional git, and agent memory operations — all coherent with that goal. No unrelated env vars, binaries, or remote-only credentials are requested.
Instruction Scope
Instructions explicitly require reading files, invoking git (git pull/diff/status) when applicable, using read_file/update_memory/search_memory, and writing a small runtime directory (~/.keep-learning). This is consistent with purpose, but the skill will read arbitrary user files under the provided path and may perform network activity via git pull — a privacy/telemetry consideration the user should be aware of.
Install Mechanism
Instruction-only skill with no install spec and no code files. Lowest installation risk; nothing is downloaded or written besides its own runtime state (~/.keep-learning) as documented.
Credentials
No environment variables, credentials, or unrelated config paths are requested. The skill's needs (filesystem access, optional git, agent memory APIs) are proportional to its functionality.
Persistence & Privilege
always:false (normal). The skill writes its own runtime files to ~/.keep-learning and creates/updates entries in the agent memory system — expected for a learning/memory skill. Users should note it will persist learned summaries and last-commit state locally.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install keep-learning
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /keep-learning 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v0.0.2
Version 0.0.2 - Improved configuration workflow: Always confirm or request the knowledge base path from the user before proceeding. Do not start learning until a valid path is provided and confirmed. - Enhanced git change detection: Now detects both committed and uncommitted changes (using git diff and git status), ensuring all file updates are learned—whether committed, uncommitted, or not yet pushed. - For non-git directories, all supported files are scanned (no incremental detection). - No functional or supported file format changes; documentation and workflow clarification only.
v0.0.1
Initial release of the keep-learning skill. - Learns and memorizes knowledge from local directories, supporting Markdown and code files. - Extracts key insights, builds a multi-layer knowledge index, and stores information in agent memory. - Supports incremental learning via git integration and file change detection. - Provides runtime configuration, memory deduplication, and learning reports. - Currently supports only text/code files—no PDF, Word, or other binary formats.
元数据
Slug keep-learning
版本 0.0.2
许可证 MIT-0
累计安装 2
当前安装数 2
历史版本数 2
常见问题

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... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 507 次。

如何安装 keep-learning?

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

keep-learning 是免费的吗?

是的,keep-learning 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

keep-learning 支持哪些平台?

keep-learning 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 keep-learning?

由 nileader(@nileader)开发并维护,当前版本 v0.0.2。

💬 留言讨论