← Back to Skills Marketplace
siyu-hu

local-memory-skill

by siyu-hu · GitHub ↗ · v1.0.1 · MIT-0
cross-platform ✓ Security Clean
418
Downloads
2
Stars
0
Active Installs
2
Versions
Install in OpenClaw
/install agent-local-memory
Description
Persistent local memory system for AI agents across conversations — file-based, zero external dependencies. Trigger when: (1) user asks to "remember" somethi...
README (SKILL.md)

Agent Local Memory

Persistent local memory across conversations — store user preferences, project context, and behavioral feedback as plain files. No external services, no network calls, no credentials required.

Storage Paths

Platform Default Memory Path
Claude Code ~/.claude/memory/
OpenClaw ~/.openclaw/memory/
Cross-platform ~/.agent-memory/

MEMORY.md Index

Maintain a MEMORY.md file in the memory directory as a persistent index:

  • Each memory = one .md file with YAML frontmatter (name / description / type)
  • MEMORY.md stores only links to memory files + one-line descriptions, never full content
  • Trim and merge old entries when the index exceeds 200 lines

At conversation start: Check whether MEMORY.md exists. If it does, read the index and surface relevant memories to the user.

Before context limit: Proactively write important content from the current session into memory files and update MEMORY.md, so the next session can resume seamlessly.

Memory File Format

---
name: memory-name
description: One-line summary (used to assess relevance from the index)
type: user | feedback | project | reference
---

Memory content here.

Four Memory Types

user — User Profile

Stores the user's role, goals, preferences, and knowledge background.

When to write: When you learn about the user's role, tech stack, or communication style.

---
name: user_profile
description: Senior Go engineer, new to React frontend
type: user
---

- 10 years of Go experience, strong backend background
- Just getting started with React — frame frontend concepts as backend analogues
- Communication style: concise and direct, dislikes verbose explanations

feedback — Behavior Correction

Records behaviors the user has corrected. Highest priority — always follow these rules in future sessions.

When to write: When the user says "don't do that", "stop doing…", or any explicit correction.

Lead with the rule, then **Why:** (reason given) and **How to apply:** (scope).

---
name: feedback_no_db_mock
description: Integration tests must use a real database, never mocks
type: feedback
---

Integration tests must connect to a real database — mocking is not allowed.

**Why:** A prior incident where mocked tests passed but the prod migration failed.

**How to apply:** Any test involving database operations must connect to the test database directly.

project — Project Context

Records goals, key decisions, owners, and deadlines that cannot be inferred from the codebase.

When to write: When you learn the motivation behind a decision, a milestone, or a constraint.

Always convert relative dates ("next Friday") to absolute dates before writing.

---
name: project_auth_rewrite
description: Auth middleware rewrite is compliance-driven, not tech debt
type: project
---

Auth middleware rewrite. Target completion: 2026-04-01.

**Why:** Legal flagged session token storage as non-compliant with new regulations.

**How to apply:** Scope decisions should prioritize compliance over engineering elegance.

reference — External Resources

Records locations and purposes of external systems for quick lookup.

When to write: When you learn about a Linear project, Slack channel, dashboard, or any external resource.

---
name: ref_linear_bugs
description: Pipeline bugs tracked in Linear project INGEST
type: reference
---

Pipeline bugs are tracked in Linear project "INGEST". Check there before investigating data pipeline issues.

Write Rules

Before writing, scan MEMORY.md — update an existing entry if one applies, do not create duplicates.

Never write to memory:

  • Passwords, API keys, tokens, or any credentials
  • Secrets, private keys, or sensitive authentication data
  • Code structure, file paths, or architecture conventions (derivable from the codebase)
  • Temporary state from the current conversation
  • Anything already in project documentation or git history

Conversation Start Prompt

If MEMORY.md exists, output at conversation start:

Local memory detected (N entries). Relevant memories: [list]

Usage Guidance
This skill appears to be what it says: a local, file-based persistent memory system that does not use network calls or require credentials. Before enabling it, consider: (1) It will read/write files under your home directory (~/.claude, ~/.openclaw, or ~/.agent-memory); review those files (MEMORY.md and per-memory .md) regularly. (2) The skill relies on the agent to avoid storing secrets — do not ask the agent to 'remember' passwords, API keys, or other sensitive data. (3) The SKILL.md does not require or set file permissions or encryption; if your environment has other users or backups, sensitive content in plain files could be exposed — consider restricting permissions (chmod 600) or using an encrypted store. (4) If you want tighter control, require explicit user confirmation before each write, disable autonomous invocation for this skill, or test it in an isolated account first. (5) If you need auditability, ask for a change that logs writes and exposes a way to purge or export memories securely.
Capability Analysis
Type: OpenClaw Skill Name: agent-local-memory Version: 1.0.1 The skill bundle defines a persistent local memory system for AI agents using Markdown files stored in the user's home directory (e.g., `~/.agent-memory/`). It contains instructions for the agent to categorize and retrieve user preferences, feedback, and project context across sessions. The instructions in `SKILL.md` explicitly forbid the storage of sensitive information such as passwords, API keys, or secrets, and there is no evidence of data exfiltration, malicious execution, or unauthorized access.
Capability Assessment
Purpose & Capability
Name/description match the behavior: an instruction-only, file-based local memory system. It requires no binaries, secrets, or network access and only reads/writes under well-defined home-directory paths (~/.claude, ~/.openclaw, ~/.agent-memory), which is proportionate to the stated purpose.
Instruction Scope
SKILL.md instructs the agent to check MEMORY.md at conversation start and to proactively write session content before context limits. That is consistent with a local memory skill, but 'proactively write important content' is subjective and relies on the agent to correctly identify what is safe to persist. The instructions include explicit 'Never write' rules for passwords/keys, which is good, but enforcement is left to runtime behavior (no automatic filtering or validation specified).
Install Mechanism
Instruction-only skill with no install spec and no code files. Nothing will be downloaded or written during install, so there is low installation risk.
Credentials
No environment variables, credentials, or unrelated config paths are requested. The set of requested resources (local file paths under home) is appropriate for a local memory feature.
Persistence & Privilege
The skill creates persistent files in users' home directories but does not specify file permissions, owner, or any encryption/locking. Although it forbids storing secrets, there is no technical enforcement. Persistent, unencrypted files under the home directory may be accessible to other local users/processes or backups — assess local threat model and consider requiring the agent to set restrictive permissions or an optional encryption step.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install agent-local-memory
  3. After installation, invoke the skill by name or use /agent-local-memory
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.1
- Initializes git version control for the project, adding all standard git metadata and hooks. - Updates memory type documentation: removes external "memory-types.md" file and consolidates all details directly into SKILL.md. - Expands memory type definitions with clear examples and new "when to write" guidelines for each type. - Clarifies storage rules, explicitly prohibiting the storage of sensitive data and credentials. - Improves documentation on index management and user prompts at conversation start.
v1.0.0
- Initial release of persistent local memory for AI agents with zero external dependencies. - Stores memories as plain files with YAML frontmatter, categorized by type (user, feedback, project, reference). - Uses a `MEMORY.md` index with links and descriptions for fast lookup and context at conversation start. - Automatically saves important context before reaching context limits; checks and loads memories at each session start. - Simple memory write rules to prevent duplication and avoid storing temporary or redundant information.
Metadata
Slug agent-local-memory
Version 1.0.1
License MIT-0
All-time Installs 0
Active Installs 0
Total Versions 2
Frequently Asked Questions

What is local-memory-skill?

Persistent local memory system for AI agents across conversations — file-based, zero external dependencies. Trigger when: (1) user asks to "remember" somethi... It is an AI Agent Skill for Claude Code / OpenClaw, with 418 downloads so far.

How do I install local-memory-skill?

Run "/install agent-local-memory" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is local-memory-skill free?

Yes, local-memory-skill is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does local-memory-skill support?

local-memory-skill is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created local-memory-skill?

It is built and maintained by siyu-hu (@siyu-hu); the current version is v1.0.1.

💬 Comments