Token导航 LogoToken导航TokenDH.com
前端设计只读github未标认证来源可访问许可证需确认审计异常

memory-graph-builder内存图构建器

Agent Skill

memory-graph-builder 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

288

周安装

12

GitHub Stars

58

下载量

96
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:memory-graph-builder(内存图构建器)
来源仓库:https://github.com/archieindian/openclaw-superpowers
仓库路径:skills/memory-graph-builder
安装命令:
npx skills add https://github.com/archieindian/openclaw-superpowers --skill memory-graph-builder
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/archieindian/openclaw-superpowers --skill memory-graph-builder

简介

memory-graph-builder 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合围绕仓库状态、代码变更或协作事项进行整理。

  • 它适用于前端设计类任务,可辅助 Agent 梳理项目结构、跟踪开发进度或生成可视化协作图谱。
  • 通过 npx skills add 命令从指定 GitHub 仓库安装,需结合原始 README 核验具体用法和功能边界。
  • 安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写操作。
  • 使用时需注意该技能属于前端设计类别,主要面向代码协作流程的组织和展示。

SKILL.md

Memory Graph Builder

What it does

OpenClaw stores agent memory in a flat MEMORY.md file — one line per fact, no structure, no relationships. This works until your agent has 200+ memories and half of them are duplicates, three contradict each other, and the whole file costs 4,000 tokens every session.

Memory Graph Builder treats MEMORY.md as a raw data source and builds a structured knowledge graph on top of it. Each memory becomes a node with typed relationships to other nodes. The graph enables:

  • Duplicate detection — "User prefers dark mode" and "User likes dark theme" are the same fact
  • Contradiction detection — "User uses Python 3.8" vs "User uses Python 3.12"
  • Staleness detection — Facts older than a configurable threshold that haven't been referenced
  • Memory digest — A compressed, relationship-aware summary that replaces raw MEMORY.md in the system prompt, saving 30-60% tokens

Inspired by OpenLobster's Neo4j-backed graph memory system, adapted to work on top of OpenClaw's existing MEMORY.md without requiring a database.

When to invoke

  • Automatically, nightly at 10pm (cron)
  • After bulk memory additions (e.g., after project-onboarding)
  • When the agent's context initialisation feels slow (memory bloat)
  • Manually to audit memory quality

Graph structure

Each memory line becomes a node:

nodes:
  - id: "mem_001"
    text: "User prefers Python for backend work"
    category: preference    # preference | fact | project | person | tool | config
    entities: ["user", "python", "backend"]
    added_at: "2026-03-01"
    last_referenced: "2026-03-15"
    confidence: 0.9
edges:
  - from: "mem_001"
    to: "mem_014"
    relation: related_to    # related_to | contradicts | supersedes | depends_on

How to use

python3 graph.py --build                    # Parse MEMORY.md, build graph
python3 graph.py --duplicates               # Show duplicate clusters
python3 graph.py --contradictions           # Show contradicting pairs
python3 graph.py --stale --days 30          # Show memories not referenced in 30 days
python3 graph.py --digest                   # Generate compressed memory digest
python3 graph.py --digest --max-tokens 1500 # Digest with token budget
python3 graph.py --prune --dry-run          # Show what would be removed
python3 graph.py --prune                    # Remove duplicates + stale entries
python3 graph.py --stats                    # Graph statistics
python3 graph.py --status                   # Last build summary
python3 graph.py --format json

Cron wakeup behaviour

Nightly at 10pm:

  1. Read MEMORY.md
  2. Rebuild graph (incremental — only re-processes new/changed lines)
  3. Detect duplicates and contradictions
  4. Flag stale entries (>30 days unreferenced by default)
  5. Generate fresh memory digest
  6. Write digest to ~/.openclaw/workspace/memory-digest.md
  7. Log summary to state

Memory digest

The digest is a compressed representation of the knowledge graph optimized for LLM consumption. Instead of dumping every raw line, it:

  • Groups related memories by category
  • Merges duplicate facts into single entries
  • Marks contradictions with [CONFLICT] so the agent can resolve them
  • Omits stale entries below a confidence threshold
  • Respects a configurable max-token budget

Example digest output:

## Preferences
- Prefers Python for backend, TypeScript for frontend
- Dark mode everywhere; compact UI layouts
- Commit messages: imperative mood, max 72 chars

## Active Projects
- openclaw-superpowers: skill library, 40 skills, MIT license
- personal-site: Next.js 14, deployed on Vercel

## People
- Alice (teammate): works on auth, prefers Go

## Conflicts (needs resolution)
- [CONFLICT] Python version: "3.8" vs "3.12" — ask user to clarify

Procedure

Step 1 — Build the graph

python3 graph.py --build

Step 2 — Review duplicates and contradictions

python3 graph.py --duplicates
python3 graph.py --contradictions

Fix contradictions by editing MEMORY.md directly or asking the agent to clarify.

Step 3 — Prune stale entries

python3 graph.py --prune --dry-run
python3 graph.py --prune

Step 4 — Generate and use the digest

python3 graph.py --digest --max-tokens 1500

Point OpenClaw's memory injection at ~/.openclaw/workspace/memory-digest.md instead of raw MEMORY.md.

State

Graph structure, digest cache, and audit history stored in ~/.openclaw/skill-state/memory-graph-builder/state.yaml.

Fields: last_build_at, node_count, edge_count, duplicate_count, contradiction_count, stale_count, digest_tokens, build_history.

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

33.77%
按下载量换算32

Claude

31.43%
按下载量换算30

Cursor

21.45%
按下载量换算21

Gemini CLI

9.12%
按下载量换算9

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

未通过

权限和风险

只读

该 Skill 主要提供规则、说明或参考内容,本身偏只读;真正读写文件、联网或执行命令仍取决于宿主 Agent 的任务。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills