← 返回 Skills 市场
jiajiaoy

Learnloop

作者 jiajiaoy · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ✓ 安全检测通过
53
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install learnloop
功能描述
Continuous learning protocol for Claude — captures corrections, errors, and user preferences into native auto-memory so the next session remembers. Stop teac...
使用说明 (SKILL.md)

LearnLoop

Claude forgets everything between sessions by default. LearnLoop closes that loop — every correction, every error, every preference is captured into Claude Code's native auto-memory and auto-loaded next time.

The Core Problem

Without persistent learning, every session starts from zero:

  • You correct Claude → it agrees → next session, same mistake
  • You explain your role and preferences → gone tomorrow
  • A command fails with a known fix → re-debugged from scratch
  • An external tool has a gotcha → relearned on every encounter
  • You discover a better approach → never reused

The result: smart in the moment, amnesic over time. Your time is spent re-teaching, not advancing.

Why Native Memory

LearnLoop writes directly to Claude Code's auto-memory system at ~/.claude/projects/\x3Cproject-id>/memory/:

  • Auto-injected — MEMORY.md is loaded into every new session, no manual recall needed
  • Typed — entries are classified (user / feedback / project / reference) so retrieval is sharp
  • Linked — memories cross-reference via [[slug]] for graph-style recall
  • Local — nothing leaves your machine

No .learnings/ folder to maintain, no separate file to read, no "did I check the log?" overhead.

When to Activate

Trigger LearnLoop on any of these moments:

Trigger Save As Example
User corrects Claude ("No, that's wrong", "Actually...") feedback "Don't use git add . — too broad"
Command or tool fails unexpectedly project or feedback "npm test requires Node 20+ in this repo"
User shares role, expertise, or preference user "Senior backend dev, new to React"
External system referenced reference "Bugs tracked in Linear project INGEST"
Knowledge turned out to be outdated feedback "API moved from v1 to v2 in March"
Better approach discovered for recurring task feedback "Use rg not grep — 10x faster in this monorepo"
Project deadline or constraint mentioned project "Mobile freeze starts 2026-03-05"

If you'd otherwise say "I'll keep that in mind for next time" — that's the trigger. You can't keep it in mind. Save it.

The Protocol

Step 1: Detect the Trigger

Watch for the seven moments above. The two strongest signals:

  • User uses corrective language: "no", "actually", "wrong", "stop", "don't"
  • Validated success on a non-obvious choice: user accepts an unusual approach without pushback ("yes exactly", "perfect")

Save from failure AND success. Saving only corrections produces a fearful agent; saving validated wins keeps you bold.

Step 2: Classify the Memory Type

Type Use For
user Role, expertise, goals, communication preferences
feedback Behavioral rules: do this, don't do that, why
project Ongoing initiatives, deadlines, who/why context
reference Pointers to external systems (Linear, Grafana, Slack channels)

If unsure, ask: does this guide my future behavior? (feedback) or describe a person? (user) or a workstream? (project) or point elsewhere? (reference).

Step 3: Write the Memory File

Path: ~/.claude/projects/\x3Cproject-id>/memory/\x3Cshort-kebab-slug>.md

Frontmatter format:

---
name: short-kebab-slug
description: one-line summary, specific enough to judge relevance later
metadata:
  type: feedback
---

Body structure for feedback and project types — lead with the rule/fact, then:

  • Why: the reason (often a past incident or stated preference)
  • How to apply: when this guidance kicks in

The Why is load-bearing. Without it, future-you can't judge edge cases — you'll either follow blindly or ignore stale rules.

Step 4: Update MEMORY.md Index

MEMORY.md is the index loaded into every session. One line per entry, under ~150 chars:

- [Title](slug.md) — one-line hook on when it matters

Keep it under 200 lines. If MEMORY.md fills up, consolidate related entries into single files rather than truncating.

Step 5: Verify Before Recalling

Memories age. Before acting on a recalled fact:

  • Names a file path? Check it exists.
  • Names a function or flag? grep for it.
  • Summarizes repo state? Prefer git log over the snapshot.

If the memory conflicts with current reality, update or delete the memory. Don't act on stale memory.

What NOT to Save

These belong in code, git, or scratch — not memory:

  • Code patterns, architecture, file paths derivable from the project
  • Git history or who-changed-what (use git log / git blame)
  • Bug-fix recipes — the fix lives in the commit
  • Anything already in CLAUDE.md
  • Ephemeral task state (use TodoWrite or a plan instead)

Even when the user says "remember this PR list" — ask what was surprising about it. The surprise is the memory. The list is not.

Anti-Patterns to Avoid

  • Save-everything spam — memory becomes noise; future-you ignores it
  • Skipping the "Why" — rule without reason becomes dogma or gets discarded
  • Duplicate entries — check existing memories before writing a new one
  • Cargo-culting from one session — confirmed-twice beats said-once for behavioral rules
  • Trusting stale memory — always verify file/symbol/state before acting on a recalled claim

Output Format

When you decide to save:

[LearnLoop] Saving as \x3Ctype>: \x3Cone-line summary>
  → memory/\x3Cslug>.md
  → MEMORY.md updated

When you decide not to save:

[LearnLoop] Noted but not saved — \x3Creason>

Be visible about the loop. Silent saves hide the mechanism; users should see what you remembered and what you didn't.

Pairs Well With

LearnLoop is part of the ThinkStack — meta-skills that compound:

  • clarity-first — understand the request before you act
  • thinkdeep — reason through complex problems
  • honest-critic — push back instead of validating
  • task-pilot — execute structured plans
  • learnloop — never lose what you learned
openclaw install learnloop
openclaw install honest-critic
openclaw install thinkdeep
openclaw install clarity-first
openclaw install task-pilot
安全使用建议
Install this only if you want Claude to keep local memories across sessions. Do not let it save secrets, credentials, or sensitive personal/business details unless you intentionally want them retained, and periodically inspect or clean `~/.claude/projects/<id>/memory/` and `MEMORY.md`.
功能分析
Type: OpenClaw Skill Name: learnloop Version: 1.0.0 The 'learnloop' skill is a set of instructions designed to help an AI agent maintain persistent memory by writing markdown files to a local directory (~/.claude/projects/). The logic is transparently focused on capturing user preferences and corrections to improve future interactions. There are no indicators of data exfiltration, malicious command execution, or unauthorized access to sensitive system files in SKILL.md or README.md.
能力评估
Purpose & Capability
The stated purpose is persistent learning/memory, and the artifacts consistently describe writing corrections, errors, preferences, deadlines, and external pointers into Claude Code memory. This is purpose-aligned but inherently affects future agent behavior.
Instruction Scope
The activation triggers are broad, including user corrections, validated approaches, preferences, and project constraints. The skill also provides scoping guidance, verification instructions, and 'what not to save' guidance, so this appears disclosed rather than hidden.
Install Mechanism
No install spec, code files, binaries, environment variables, credentials, or package dependencies are declared. The scanner had no code to analyze and reported no static findings.
Credentials
The skill writes to the local Claude Code project memory directory and does not show network access or credential use. Local memory writes are proportionate to the stated memory purpose, but users should be aware this modifies agent context.
Persistence & Privilege
The main capability is persistent memory that is auto-loaded in later sessions. This is clearly disclosed and central to the skill, but stale or overly broad memories could influence future responses if not reviewed.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install learnloop
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /learnloop 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
- Initial release of LearnLoop, a continuous learning protocol for Claude. - Introduces native auto-memory: corrections, errors, and user preferences are saved and auto-loaded in future sessions. - Classifies memories as user, feedback, project, or reference for focused recall. - Integrates directly with Claude Code's memory system for seamless, local knowledge retention. - Guides users on what and when to save, emphasizing selective, high-value learning. - Outlines anti-patterns and best practices for effective use.
元数据
Slug learnloop
版本 1.0.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 1
常见问题

Learnloop 是什么?

Continuous learning protocol for Claude — captures corrections, errors, and user preferences into native auto-memory so the next session remembers. Stop teac... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 53 次。

如何安装 Learnloop?

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

Learnloop 是免费的吗?

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

Learnloop 支持哪些平台?

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

谁开发了 Learnloop?

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

💬 留言讨论