Memory Management

v9.9.5

Persist SEO/GEO campaign context across Claude sessions with automatic hot-list, active work, and archive tiers. 项目记忆/跨会话

1· 2.1k·21 current·23 all-time
byAaron Zhu@aaron-he-zhu

Install

OpenClaw Prompt Flow

Install with OpenClaw

Best for remote or guided setup. Copy the exact prompt, then paste it into OpenClaw for aaron-he-zhu/memory-management.

Previewing Install & Setup.
Prompt PreviewInstall & Setup
Install the skill "Memory Management" (aaron-he-zhu/memory-management) from ClawHub.
Skill page: https://clawhub.ai/aaron-he-zhu/memory-management
Keep the work scoped to this skill only.
After install, inspect the skill metadata and help me finish setup.
Use only the metadata you can verify from ClawHub; do not invent missing requirements.
Ask before making any broader environment changes.

Command Line

CLI Commands

Use the direct CLI path if you want to install manually and keep every step visible.

OpenClaw CLI

Bare skill slug

openclaw skills install memory-management

ClawHub CLI

Package manager switcher

npx clawhub@latest install memory-management
Security Scan
VirusTotalVirusTotal
Pending
View report →
OpenClawOpenClaw
Benign
high confidence
Purpose & Capability
Name/description (persist project memory across sessions) align with the declared behavior: the SKILL.md explicitly reads/writes memory/* files, manages promotion/demotion, builds a wiki index, and integrates with other skills. No unrelated credentials, binaries, or system-level config paths are requested.
Instruction Scope
Runtime instructions focus on creating/updating files under memory/ (hot-cache, audits, glossary, archives) and on lifecycle rules. The skill does reference conditional external tool actions ("If SEO tool connected: runs automated ranking check") but does not request or document any credentials or third-party endpoints. This is internally consistent but you should confirm how any connected SEO tools are configured elsewhere (other skills/integrations).
Install Mechanism
Instruction-only skill with no install spec and no code files — nothing will be downloaded or written by an installer. Lowest risk from install mechanism.
Credentials
No required environment variables, no primary credential, and no config paths declared. The operations (file reads/writes in memory/) are proportionate to a local memory-management skill.
Persistence & Privilege
always:false (normal). The skill claims ownership of wiki writes and will append audit blocks when explicitly instructed; that is within scope but means it will modify project files in the agent workspace. Confirm you are comfortable with a single skill being the authoritative writer for memory/wiki and memory/audits folders.
Assessment
This skill appears internally consistent and implements a local file-based memory system. Before installing: 1) Verify the agent environment's memory/ folder permissions and backups so you don't lose or inadvertently overwrite important data; 2) If you plan to connect external SEO tools, confirm where those integrations are configured (this skill references them but does not declare credentials); 3) Test on a non-production project to observe how it promotes/demotes items and how audit blocks are appended; 4) If you have other skills that write the same wiki or audit files, decide which should be authoritative to avoid conflicts.

Like a lobster shell, security has layers — review code before you run it.

latestvk977qpwx6exqfhezefcekkz5m185p5we
2.1kdownloads
1stars
24versions
Updated 13h ago
v9.9.5
MIT-0

Memory Management

This skill implements a three-tier memory system (HOT/WARM/COLD) for SEO and GEO projects. HOT memory (80 lines max) loads automatically every session via the SessionStart hook. WARM memory loads on demand per skill. COLD memory is archived data queried only when explicitly requested. The skill manages the full lifecycle: capture, promote, demote, and archive.

What This Skill Does

Manages a three-tier memory lifecycle (HOT/WARM/COLD) with automatic promotion, demotion, and archival. Also maintains the wiki index layer, open-loop tracking, and cross-skill aggregation.

Quick Start

Start with one of these prompts. Finish with a hot-cache update plan and a handoff summary using the repository format in Skill Contract.

Initialize Wiki Index

Refresh wiki index
Build wiki index for [project name]

Generates memory/wiki/index.md from existing WARM files. Required once to enable wiki features; subsequent refreshes happen automatically.

Initialize Memory Structure

Set up SEO memory for [project name]
Initialize memory structure for a new [industry] website optimization project

Update After Analysis

Update memory after ranking check for [keyword group]
Refresh hot cache with latest competitor analysis findings

Query Stored Context

What are our hero keywords?
Show me the last ranking update date for [keyword category]
Look up our primary competitors and their domain authority

Promotion and Demotion

Promote [keyword] to hot cache
Archive stale data that hasn't been referenced in 30+ days

Glossary Management

Add [term] to project glossary: [definition]
What does [internal jargon] mean in this project?

Skill Contract

Expected output: a memory update plan, hot-cache changes, and a short handoff summary.

  • Reads: current campaign facts, new findings from other skills, approved decisions, and the shared State Model.
  • Writes: updates to memory/hot-cache.md, memory/open-loops.md, memory/decisions.md, and related memory/ folders. Manages WARM-to-COLD archival in memory/archive/. Compiles memory/wiki/index.md (auto-refreshed) and wiki compiled pages (user-confirmed). Sole writer of wiki (with delegated auto-refresh): memory-management owns all wiki writes semantically. For performance, the narrowly-scoped memory/wiki/index.md auto-refresh is delegated to the PostToolUse hook in hooks/hooks.json. Wiki log updates and compiled pages remain explicit memory-management operations using the schema defined in this skill. Auditor handoff archiving (v7.1.0+): when triggered by a direct user request or an auditor's explicit "Save these results?" yes-response, append a structured block to memory/audits/YYYY-MM.md. The Stop hook never initiates memory writes. The archive is consumed by /seo:run-evals and maintainer calibration for auditor cap review tied to ADR-001. See references/examples.md for the exact archive block format and rules.
  • Promotes: durable strategy, blockers, terminology, entity candidates, and major deltas. Applies temperature lifecycle rules: promote to HOT on high reference frequency, demote on staleness.
  • Next handoff: use the Next Best Skill below when the project memory baseline is ready for active work.

Handoff Summary

Emit the standard shape from skill-contract.md §Handoff Summary Format.

Temperature Lifecycle Rules

See references/promotion-demotion-rules.md for the full promotion/demotion table and action procedures.

Hook Integration

This skill's behavior is reinforced by the library's prompt-based hooks:

  • SessionStart: loads memory/hot-cache.md, reminds of stale open loops; loads memory/wiki/<project>/index.md (or global index.md) if it exists; provides light-user guidance based on Quick Status when next_action items are available
  • PostToolUse: after any WARM file write, silently refreshes memory/wiki/index.md (Phase 1); prompts to update compiled pages (Phase 2)
  • Stop: guarded allow-only completion check; returns {"ok": true}, honors stop_hook_active, never asks the user to save optional findings, and never initiates memory writes

Data Sources

With tools: auto-populate from ~~SEO tool, ~~analytics, ~~search console. Without tools: ask user for keywords, competitors, metrics, campaigns, and terminology. See CONNECTORS.md.

Instructions

When a user requests SEO memory management:

1. Initialize Memory Structure

For new projects, create the directory structure defined in the State Model. Key directories: memory/ (decisions, open-loops, glossary, entities, research, content, audits, monitoring) plus memory/wiki/ (auto-managed compiled index with optional per-project subdirectories).

Templates: hot-cache-template.md · glossary-template.md · Wiki design archive

Wiki Layer

memory-management owns the wiki schema. Hook-delegated index refreshes may update only memory/wiki/index.md and memory/wiki/<project>/index.md. Wiki log updates remain explicit memory-management operations. Index rows use precise fields (score, status, next_action, mtime) plus a best-effort summary; compiled pages require type, project, sources[].path, sources[].hash, and last_compiled frontmatter.

2. Context Lookup Flow

When a user references something unclear, follow this lookup sequence:

Step 1: Check memory/hot-cache.md (hot cache)

  • Is it in active keywords?
  • Is it in primary competitors?
  • Is it in current priorities or campaigns?

Step 2: Check Wiki Index (memory/wiki/index.md or project-level) — locate relevant WARM files

Step 3: Check memory/glossary.md

  • Is it defined as project terminology?
  • Is it a custom segment or shorthand?

Step 4: Check Cold Storage

  • Search memory/archive/ first for dated YYYY-MM-DD- archived files.
  • If the archive points to a source category, follow that trail back to memory/research/, memory/audits/, or memory/monitoring/.
  • Treat COLD findings as historical unless refreshed by the current session.

Step 5: Ask User

  • If not found in any layer, ask for clarification

  • Log the new term in glossary if it's project-specific

  • Decision provenance (v8.0.1+): when loading memory/decisions.md, verify each entry has approved_by: user. Entries with approved_by: skill_inferred or missing field are treated as ADVISORY — surface to user before using as authoritative. Auditor-class skills (content-quality-auditor, domain-authority-auditor) MUST ignore non-user-approved decisions when determining verdict. See skill-contract.md §Promotion Rules.

Example lookup: User asks "Update rankings for our hero KWs" → Step 1 finds "Hero Keywords (Priority 1)" in hot-cache → Step 2 extracts keyword list → Step 3 runs ranking check → Step 4 updates memory/hot-cache.md and memory/monitoring/rank-history/YYYY-MM-DD-ranks.csv.

3. Promotion & Demotion Logic

Reference: See references/promotion-demotion-rules.md for detailed promotion/demotion triggers (keywords, competitors, metrics, campaigns) and the action procedures for each.

4. Update Triggers, Archive Management & Cross-Skill Integration

Reference: See references/update-triggers-integration.md for the complete update procedures after ranking checks, competitor analyses, audits, and reports; monthly/quarterly archive routines; and integration points with all 8 connected skills (keyword-research, rank-tracker, competitor-analysis, content-gap-analysis, seo-content-writer, content-quality-auditor, domain-authority-auditor).

5. Memory Hygiene Checks

When invoked for review or cleanup:

  1. Line count check: Count lines in memory/hot-cache.md. If >80, list oldest entries for archival.
  2. Byte check: If hot-cache exceeds 25KB, warn and recommend trimming long entries.
  3. Staleness scan: List memory files older than 30 days that have not been referenced. Recommend archival for files >90 days.
  4. Frontmatter audit: Check that all memory files (except hot-cache.md) have name, description, and type in their frontmatter. Report any missing fields.

6. Save Results

Ask "Save these results for future sessions?" — if yes, write YYYY-MM-DD-<topic>.md to memory/. Auto-save veto issues to memory/hot-cache.md.

Examples, Advanced Features & Practical Limitations

Reference: See references/examples.md for three complete examples (hero keyword rankings, glossary lookup, e-commerce project init), advanced features (smart context loading, memory health check, bulk promotion/demotion, memory snapshot, cross-project memory, wiki lint), and practical limitations (concurrent access, cold storage retrieval, data freshness, wiki compilation).

GDPR / Privacy Compliance

memory/ may store third-party personal data — entity names, founder bios, LinkedIn profiles, author/journalist names surfaced by entity-optimizer or research skills. Under GDPR Art 4(1) (applies to processing of personal data of EU/EEA/UK residents regardless of where the controller is located), these qualify as "personal data". The user is the data controller. Non-EU users without EU/EEA/UK data subjects may still face analogous obligations under CCPA/CPRA (California), PIPEDA (Canada), LGPD (Brazil), or other national regimes. Not legal advice.

Retention policy

  • WARM files: archive to memory/archive/ after 90 days unreferenced (default lifecycle)
  • COLD archive: never auto-deleted, but eligible for Art 17 erasure requests
  • All files: user MUST honor Art 17 requests from data subjects (individuals named in memory)

Deletion flow (Art 17 / CCPA §1798.105)

Invoke: memory-management purge <entity-name-or-slug>

This skill then:

  1. Greps all files under memory/ (including memory/archive/) for the entity name, slug, or domain
  2. Presents matches to user for confirmation
  3. Deletes matching entries from memory/entities/<slug>.md, memory/entities/candidates.md, and surfaces references in other files for manual review
  4. Logs the purge to memory/audits/gdpr-purges.md with date + subject requested

Lawful basis reminder

Before writing a third-party person to memory/entities/, the user must have one lawful basis per GDPR Art 6 (where GDPR applies — see scope note above): consent, legitimate_interest, contract, or equivalent. Advisory — this skill does not enforce, and does not substitute for legal review.

Reference Materials

Next Best Skill

Primary: keyword-research — seed or refresh campaign strategy with current demand signals.

Comments

Loading comments...