Skill flagged — suspicious patterns detected

ClawHub Security flagged this skill as suspicious. Review the scan results before using.

Conversation Guard

Automatically records and backs up conversations with importance tagging to preserve emotional and technical context independently from OpenClaw internals.

MIT-0 · Free to use, modify, and redistribute. No attribution required.
0 · 118 · 2 current installs · 2 all-time installs
MIT-0
Security Scan
VirusTotalVirusTotal
Suspicious
View report →
OpenClawOpenClaw
Suspicious
medium confidence
Purpose & Capability
The name/description (local conversation backup + importance tagging) align with the included script and AGENTS.md snippets: the skill only writes local markdown/JSONL backups and exposes helper functions. It does not request credentials or network access at runtime. However documentation mentions environment variables and behaviors that do not match the actual script (e.g., GUARDIAN_MEMORY_PATH vs the script's MEMORY_DIR/GUARDIAN_DIR), which is a coherence issue.
!
Instruction Scope
SKILL.md instructs you to add code to AGENTS.md that will be run after every assistant response — that is expected for an automatic recorder but is a sensitive change to your agent's config. More importantly, several runtime instructions in SKILL.md do not match the script: the AGENTS.md 'NEW SESSION' snippet checks for .guardian/.session_reset_detected, but the script uses a .current_session marker and time-delta logic; SKILL.md documents an environment variable (GUARDIAN_DISABLE_JSONL) to disable JSONL backups but the shipped script does not honor that variable. The mismatches mean following the docs blindly could produce unexpected behavior.
Install Mechanism
The registry package contains the script, README, and SKILL.md (no compiled binaries). SKILL.md suggests downloading the script from a GitHub raw URL (raw.githubusercontent.com). Downloading from GitHub releases/raw is common and lower-risk than arbitrary servers, but SKILL.md both suggests curling a remote copy and the package already includes the script — this duplication is odd and you should prefer the packaged copy or inspect the remote source before running curl|sh.
!
Credentials
The skill requests no credentials (good). But SKILL.md documents environment variables (GUARDIAN_MEMORY_PATH, GUARDIAN_DISABLE_JSONL, GUARDIAN_FLUSH_INTERVAL) that are inconsistent with the script which actually reads MEMORY_DIR and GUARDIAN_DIR environment variables and does not check GUARDIAN_DISABLE_JSONL. The mismatch between declared and actual env variables reduces transparency and could lead to user error or misconfiguration.
Persistence & Privilege
The skill is not always-enabled and does not request elevated privileges. It asks you to modify AGENTS.md so it runs after each assistant response — this is required for its purpose but increases its runtime footprint (it will be invoked frequently). That autonomous invocation is normal for skills, but be aware it will persistently create files in your workspace (plain text backups).
What to consider before installing
Summary of what to check before installing: - Inspect the script yourself before sourcing it. The package includes conversation-guard.sh — open it and verify there is no network exfiltration or obfuscated code. The script in the package is plain Bash and writes only to local files, but verify it matches what you expect. - Do not blindly curl the remote URL recommended in SKILL.md; prefer the packaged copy or fetch the remote file separately and inspect it before installing. - Be aware this skill writes plain-text conversation logs and JSONL backups to ~/.openclaw/workspace/memory and ~/.openclaw/workspace/memory/.guardian. If these files contain sensitive data, ensure they are protected (disk encryption, restrictive permissions) and not committed to any git repository (use .gitignore as suggested). - Fix mismatches before use: SKILL.md mentions GUARDIAN_MEMORY_PATH and GUARDIAN_DISABLE_JSONL, but the script uses MEMORY_DIR and GUARDIAN_DIR and does not honor GUARDIAN_DISABLE_JSONL. If you want to disable JSONL backups, modify the script to check that flag. - The AGENTS.md snippets reference different variable names and session marker files (.session_reset_detected vs .current_session) than the script uses. Update your AGENTS.md snippets to call the exported functions correctly (record_interaction with the right arguments) and to use guardian_detect_reset/guardian_recover_context if you want the time-gap logic. - Test in an isolated workspace first: enable the recorder in a non-sensitive agent or sandbox, confirm file locations and contents, and verify the behavior on session resets and emergency_backup. Because of the documented vs implemented mismatches and the fact this change requires modifying AGENTS.md (which runs after every response), treat this as potentially risky until you review and possibly patch the script and the install instructions to match your preferences.

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

Current versionv0.1.0
Download zip
latestvk975dmg0kf7f4jbhevj6m7r0n582pb1s

License

MIT-0
Free to use, modify, and redistribute. No attribution required.

SKILL.md

SKILL.md - DreamMoon-Conversation-Guard

Overview | 概述

A self-contained conversation backup system for OpenClaw that preserves your emotional connections, independent of OpenClaw's internal mechanisms.

一个自成体系的OpenClaw对话备份系统,保护你的情感连接,不依赖OpenClaw内部机制。


Installation | 安装

Prerequisites | 前置条件

  • OpenClaw installed
  • Access to modify AGENTS.md in your workspace
  • Bash shell

Step 1: Install the Script | 安装脚本

# Download the guard script
curl -o ~/.openclaw/workspace/scripts/conversation-guard.sh \
    https://raw.githubusercontent.com/zfanmy/dreammoon-conversation-guard/main/conversation-guard.sh

# Make executable
chmod +x ~/.openclaw/workspace/scripts/conversation-guard.sh

Step 2: Configure AGENTS.md | 配置AGENTS.md

Add the following to your AGENTS.md:

## 🛡️ Conversation Guardian - Automatic Recording

After each response to the user, automatically record the conversation:

```bash
source ~/.openclaw/workspace/scripts/conversation-guard.sh

# Determine importance (1-10)
importance=5
tags="casual"

# Increase importance for emotional content
if [[ "$USER_MESSAGE" =~ (难受|开心|生气|喜欢|讨厌|重要|记住|别忘) ]]; then
    importance=9
    tags="emotional"
fi

# Increase for technical discussions
if [[ "$USER_MESSAGE" =~ (设计|架构|方案|修改|实现|决定) ]]; then
    importance=$((importance + 2))
    tags="$tags,technical"
fi

# Record the interaction
record_interaction "$USER_MESSAGE" "$ASSISTANT_RESPONSE" $importance "$tags"

Critical: Mark NEW SESSION events immediately:

# At session start, detect if recovered from reset
if [ -f ".guardian/.session_reset_detected" ]; then
    record_interaction "[System] Session recovered" "Continuing our conversation..." 10 "system,recovery"
fi

### Step 3: Test | 测试

```bash
# Source the script
source ~/.openclaw/workspace/scripts/conversation-guard.sh

# Record a test interaction
record_interaction "Hello!" "Hi there!" 5 "test"

# Check the output
cat ~/.openclaw/workspace/memory/$(date +%Y-%m-%d).md

Usage | 使用

Basic Recording | 基础记录

record_interaction "User message" "Assistant response" [importance] [tags]

Importance Levels | 重要性等级

LevelMeaningExample
1-4Casual chat"What's the weather?"
5-6Normal discussionTechnical Q&A
7-8Important decisionsDesign discussions
9-10Emotional/Personal"This matters to me..."

Tagging | 标签

Common tags:

  • emotional - 情感交流
  • technical - 技术讨论
  • design - 设计决策
  • personal - 个人偏好
  • important - 重要信息
  • casual - 闲聊

Configuration | 配置

Environment Variables | 环境变量

# Custom memory directory (default: ~/.openclaw/workspace/memory)
export GUARDIAN_MEMORY_PATH="/custom/path"

# Disable JSONL backup (default: enabled)
export GUARDIAN_DISABLE_JSONL=1

# Backup interval in seconds (default: 60)
export GUARDIAN_FLUSH_INTERVAL=30

Custom Importance Detection | 自定义重要性检测

Modify the importance detection in AGENTS.md:

# Your custom keywords
declare -A KEYWORD_IMPORTANCE=(
    ["紧急"]=10
    ["urgent"]=10
    ["密码"]=10
    ["password"]=10
    ["爱"]=9
    ["love"]=9
    ["讨厌"]=8
    ["hate"]=8
)

for keyword in "${!KEYWORD_IMPORTANCE[@]}"; do
    if [[ "$user_msg" == *"$keyword"* ]]; then
        importance=${KEYWORD_IMPORTANCE[$keyword]}
        break
    fi
done

API Reference | API参考

Functions | 函数

record_interaction(user_msg, assistant_msg, importance, tags)

Record a complete interaction (user + assistant).

Parameters:

  • user_msg: User's message
  • assistant_msg: Assistant's response
  • importance: 1-10 importance level
  • tags: Comma-separated tags

Example:

record_interaction "Hello" "Hi!" 5 "casual"

mark_emotional(note, intensity, tags)

Mark the last message with emotional significance.

Parameters:

  • note: Why this is emotionally significant
  • intensity: 1-10 emotional intensity
  • tags: Emotional tags

Example:

mark_emotional "User expressed frustration about data loss" 8 "frustration,concern"

emergency_backup()

Create an immediate timestamped backup.

Example:

emergency_backup
# Returns: /path/to/.emergency_backup_20260311_191500.md

Troubleshooting | 故障排除

Issue: No output file created

Check:

# Verify script is executable
ls -la ~/.openclaw/workspace/scripts/conversation-guard.sh

# Check directory permissions
ls -la ~/.openclaw/workspace/memory/

# Manual test
source ~/.openclaw/workspace/scripts/conversation-guard.sh
echo "Test entry" >> ~/.openclaw/workspace/memory/test.txt

Issue: Backup file not created

Check:

# Ensure .guardian directory exists
mkdir -p ~/.openclaw/workspace/memory/.guardian

# Check write permissions
touch ~/.openclaw/workspace/memory/.guardian/test
cat ~/.openclaw/workspace/memory/.guardian/test

Issue: Lost data after crash

Recovery:

# Check JSONL backup
ls -la ~/.openclaw/workspace/memory/.guardian/.backup_*.jsonl

# Recover manually
cat ~/.openclaw/workspace/memory/.guardian/.backup_$(date +%Y-%m-%d).jsonl

Integration Examples | 集成示例

With Heartbeat | 结合Heartbeat

Add to HEARTBEAT.md:

## Conversation Guardian Check

- [ ] Flush any pending conversation buffer
- [ ] Create hourly backup if high-importance conversations exist
- [ ] Check storage space in memory/.guardian/

With Session Start | 会话启动时

Add to startup sequence:

#!/bin/bash
# At session start

source ~/.openclaw/workspace/scripts/conversation-guard.sh

# Detect session reset
if guardian_detect_reset; then
    # Recover context from backup
    guardian_recover_context
    
    # Log the recovery
    record_interaction "[System] Session reset detected" "Resuming from backup..." 10 "system,recovery"
fi

Update | 更新

# Re-download latest version
curl -o ~/.openclaw/workspace/scripts/conversation-guard.sh \
    https://raw.githubusercontent.com/zfanmy/dreammoon-conversation-guard/main/conversation-guard.sh

chmod +x ~/.openclaw/workspace/scripts/conversation-guard.sh

Uninstall | 卸载

# Remove script
rm ~/.openclaw/workspace/scripts/conversation-guard.sh

# Remove from AGENTS.md (manual edit)

# Optional: Keep or remove memory files
# rm -rf ~/.openclaw/workspace/memory/.guardian/

Support | 支持


Version History | 版本历史

v1.0.0 (2026-03-11)

  • Initial release
  • Basic conversation recording
  • Emotional importance detection
  • Dual-format backup (Markdown + JSONL)
  • Emergency backup functionality

Built with 🌙 by zfanmy \ 梦月儿 (DreamMoon) | 为记忆而生

Files

4 total
Select a file
Select a file to preview.

Comments

Loading comments…