Skip to content

Conversation

@howlonghasitBen
Copy link

@howlonghasitBen howlonghasitBen commented Feb 2, 2026

Summary

Adds documentation for using claude-mem with OpenClaw to reduce token usage through persistent memory compression.

What's included

  • docs/claude-mem-integration.md - Integration guide covering:
    • 3-layer progressive disclosure pattern (~10x token savings)
    • How claude-mem complements OpenClaw's MEMORY.md system
    • SKILL.md template for ClawHub packaging
    • Configuration and resources

Why

claude-mem captures Claude Code session context, compresses it with AI, and injects relevant history into future sessions. When combined with OpenClaw's workspace memory (MEMORY.md, daily logs), this provides comprehensive context without token bloat.

Token Savings

The 3-layer search pattern:

  1. search → Compact index (~50-100 tokens/result)
  2. timeline → Chronological context
  3. get_observations → Full details ONLY for filtered IDs

Results in ~10x token reduction compared to loading full context.

Related

Greptile Overview

Greptile Summary

Adds a new documentation page (docs/claude-mem-integration.md) describing how to use the external claude-mem Claude Code plugin alongside OpenClaw. The guide covers installation, an example settings.json, a “3-layer progressive disclosure” token-savings workflow, how this complements OpenClaw’s memory files, and includes a sample SKILL.md template plus links to related resources.

Confidence Score: 4/5

  • This PR is safe to merge; it only adds documentation, with a few spots that could confuse users if commands/links drift.
  • Changes are limited to a new markdown guide with no runtime impact. Main risks are doc accuracy (install path/commands, pinned model identifier, and external links).
  • docs/claude-mem-integration.md

(3/5) Reply to the agent's comments like "Can you suggest a fix for this @greptileai?" or ask follow-up questions!

Context used:

  • Context from dashboard - AGENTS.md (source)

Adds documentation for using claude-mem with OpenClaw to reduce token usage
through persistent memory compression.

- Explains 3-layer progressive disclosure pattern (~10x token savings)
- Shows how claude-mem complements OpenClaw's MEMORY.md system
- Includes SKILL.md template for ClawHub packaging
- Links to resources and configuration options
@vercel
Copy link
Contributor

vercel bot commented Feb 2, 2026

@howlonghasitBen is attempting to deploy a commit to the Amantus Machina Team on Vercel.

A member of the Team first needs to authorize it.

Copy link

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 file reviewed, 5 comments

Edit Code Review Agent Settings | Greptile

Comment on lines 23 to 26
# Or manually
cd ~/.claude/plugins/marketplaces
git clone https://github.com/thedotmack/claude-mem.git thedotmack
cd thedotmack && npm install
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[P1] Manual install path and commands look inconsistent with typical Claude Code plugin layout.

The snippet clones claude-mem into ~/.claude/plugins/marketplaces/thedotmack but then runs cd thedotmack && npm install, which suggests the clone directory is a vendor namespace rather than the package itself. If users follow this verbatim, they may end up in the wrong directory (or with a misleading folder name). Consider aligning the clone target and cd step so it’s unambiguous what directory ends up containing the plugin.

(Also, this repo’s docs mention bun elsewhere; if this project expects bun by default, calling out npm specifically here may confuse users.)

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

Prompt To Fix With AI
This is a comment left during a code review.
Path: docs/claude-mem-integration.md
Line: 23:26

Comment:
[P1] Manual install path and commands look inconsistent with typical Claude Code plugin layout.

The snippet clones `claude-mem` into `~/.claude/plugins/marketplaces/thedotmack` but then runs `cd thedotmack && npm install`, which suggests the clone directory is a vendor namespace rather than the package itself. If users follow this verbatim, they may end up in the wrong directory (or with a misleading folder name). Consider aligning the clone target and `cd` step so it’s unambiguous what directory ends up containing the plugin.

(Also, this repo’s docs mention `bun` elsewhere; if this project expects `bun` by default, calling out `npm` specifically here may confuse users.)

<sub>Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!</sub>

How can I resolve this? If you propose a fix, please make it concise.

Comment on lines 33 to 42
```json
{
"model": "claude-sonnet-4-20250514",
"workerPort": 37777,
"dataDir": "~/.claude-mem/data",
"logLevel": "info",
"contextInjection": {
"enabled": true,
"maxTokens": 4000
}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[P2] Example config pins a specific model name/version that may go stale or not match user access.

Hard-coding "model": "claude-sonnet-4-20250514" in the example can cause copy/paste failures if the claude-mem plugin (or the user’s account) expects a different identifier. Consider either using a placeholder (e.g. "<your-model>") or noting that this value must match the models supported in the user’s environment.

Prompt To Fix With AI
This is a comment left during a code review.
Path: docs/claude-mem-integration.md
Line: 33:42

Comment:
[P2] Example config pins a specific model name/version that may go stale or not match user access.

Hard-coding `"model": "claude-sonnet-4-20250514"` in the example can cause copy/paste failures if the claude-mem plugin (or the user’s account) expects a different identifier. Consider either using a placeholder (e.g. `"<your-model>"`) or noting that this value must match the models supported in the user’s environment.

How can I resolve this? If you propose a fix, please make it concise.

Comment on lines 98 to 102
Access the memory stream at http://localhost:37777 to:
- View real-time observations
- Browse session history
- Search past context
- Configure settings
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[P3] Localhost URL is unlinked and may be misread in terminals.

Consider formatting http://localhost:37777 as an inline link or code span for readability and to avoid accidental punctuation/markdown issues in some renderers.

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

Prompt To Fix With AI
This is a comment left during a code review.
Path: docs/claude-mem-integration.md
Line: 98:102

Comment:
[P3] Localhost URL is unlinked and may be misread in terminals.

Consider formatting `http://localhost:37777` as an inline link or code span for readability and to avoid accidental punctuation/markdown issues in some renderers.

<sub>Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!</sub>

How can I resolve this? If you propose a fix, please make it concise.

Comment on lines 108 to 109
- [OpenClaw Documentation](https://docs.openclaw.ai)
- [Discord](https://discord.com/invite/J4wttp9vDu)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[P2] External links look potentially incorrect/out of scope for this repo.

https://docs.openclaw.ai and the Discord invite may not be the canonical OpenClaw docs/community for this repository (and the invite could expire). If these are intentional, it may be worth ensuring they’re the official, stable URLs for OpenClaw/ClawHub to avoid sending users to the wrong place.

Prompt To Fix With AI
This is a comment left during a code review.
Path: docs/claude-mem-integration.md
Line: 108:109

Comment:
[P2] External links look potentially incorrect/out of scope for this repo.

`https://docs.openclaw.ai` and the Discord invite may not be the canonical OpenClaw docs/community for this repository (and the invite could expire). If these are intentional, it may be worth ensuring they’re the official, stable URLs for OpenClaw/ClawHub to avoid sending users to the wrong place.

How can I resolve this? If you propose a fix, please make it concise.

Comment on lines 79 to 89
```markdown
---
name: claude-mem
description: Persistent memory compression for Claude Code. Automatically captures session context, compresses with AI, and injects relevant history into future sessions.
homepage: https://github.com/thedotmack/claude-mem
metadata:
openclaw:
emoji: "🧠"
requires:
bins: ["node", "npm", "claude"]
---
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[P2] SKILL.md frontmatter includes an emoji which may violate some packaging/CI constraints.

If ClawHub/OpenClaw skill metadata is parsed strictly (YAML frontmatter), including emoji: "🧠" can be fine, but some tooling expects ASCII-only metadata. If the skill spec supports emoji, consider mentioning that; otherwise, using a short name/icon reference avoids potential parsing/encoding issues.

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

Prompt To Fix With AI
This is a comment left during a code review.
Path: docs/claude-mem-integration.md
Line: 79:89

Comment:
[P2] SKILL.md frontmatter includes an emoji which may violate some packaging/CI constraints.

If ClawHub/OpenClaw skill metadata is parsed strictly (YAML frontmatter), including `emoji: "🧠"` can be fine, but some tooling expects ASCII-only metadata. If the skill spec supports emoji, consider mentioning that; otherwise, using a short name/icon reference avoids potential parsing/encoding issues.

<sub>Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!</sub>

How can I resolve this? If you propose a fix, please make it concise.

Copy link
Contributor

@vercel vercel bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Additional Suggestion:

The claude-mem-integration.md documentation file is not listed in docs/README.md, preventing users from discovering it through the documentation index

Fix on Vercel

- SKILL.md with usage documentation
- install.sh that clones repo, installs deps, and registers marketplace
- Automatic registration ensures OpenClaw-spawned Claude Code instances use claude-mem
Comment on lines 39 to 47
# Check if thedotmack already registered
if grep -q "thedotmack" "$KNOWN_MARKETPLACES"; then
echo " ✓ Marketplace already registered"
else
# Add thedotmack to existing file using jq or fallback
if command -v jq >/dev/null 2>&1; then
jq '. + {"thedotmack": {"source": {"source": "github", "repo": "thedotmack/claude-mem"}, "installLocation": "'"$PLUGINS_DIR/thedotmack"'", "lastUpdated": "'"$(date -Iseconds)"'"}}' "$KNOWN_MARKETPLACES" > "$KNOWN_MARKETPLACES.tmp"
mv "$KNOWN_MARKETPLACES.tmp" "$KNOWN_MARKETPLACES"
echo " ✓ Added to existing marketplaces"
Copy link
Contributor

@vercel vercel bot Feb 2, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

jq command that modifies the JSON file lacks error handling - corrupted temp file could replace the original marketplace configuration on failure

Fix on Vercel

- Clarify install path structure with note about marketplace namespace
- Use generic model identifier with note about customization
- Fix localhost URL formatting (wrap in backticks)
- Note emoji support in SKILL.md frontmatter
- Update Discord invite to canonical OpenClaw link
- Add claude-mem to docs/README.md index
- Improve jq JSON parsing in install.sh for marketplace check
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant