Skill flagged — suspicious patterns detected

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

context-manager

v1.0.1

智能上下文管理系统 - 支持多模型自适应、分层记忆、动态注入、SQLite 数据库

0· 129·0 current·0 all-time
byzone@q012315

Install

OpenClaw Prompt Flow

Install with OpenClaw

Best for remote or guided setup. Copy the exact prompt, then paste it into OpenClaw for q012315/q012315-context-manager.

Previewing Install & Setup.
Prompt PreviewInstall & Setup
Install the skill "context-manager" (q012315/q012315-context-manager) from ClawHub.
Skill page: https://clawhub.ai/q012315/q012315-context-manager
Keep the work scoped to this skill only.
After install, inspect the skill metadata and help me finish setup.
Required binaries: python3
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 q012315-context-manager

ClawHub CLI

Package manager switcher

npx clawhub@latest install q012315-context-manager
Security Scan
VirusTotalVirusTotal
Benign
View report →
OpenClawOpenClaw
Suspicious
high confidence
!
Purpose & Capability
Name/description promise a full-featured context manager (multi-model adaptation, layered memory, dynamic injection, compression, import/export, search, indexing, management history). The included Python script implements only basic persistence and simple auto-management (init, add, stats, auto-manage). Required binary (python3) is appropriate, but many claimed capabilities are absent from the code and some DB fields in SKILL.md are not present in the actual schema. The workspace default path (~/.openclaw/workspace-telegram-bot1) is oddly specific and not explained.
!
Instruction Scope
SKILL.md documents many CLI commands and behaviors (--search, --export, --import, --compress, --load-for-task, --list-all, --delete, --update, --history, --reset) that the script does not implement. SKILL.md also suggests environment variables and a config file path (~/.openclaw/config/context-manager.json) that the script never reads. The instructions therefore give the agent broad expectations it cannot actually follow; this mismatch increases risk of surprising behavior or user confusion.
Install Mechanism
No install spec; skill is instruction + a Python script. That is low-risk compared with arbitrary remote downloads. The script writes an SQLite DB into a subdirectory in the user's home (~/.openclaw/...); creating files under the user's home is expected for this kind of tool but worth noting.
Credentials
SKILL.md suggests optional environment variables (OPENCLAW_MODEL, CONTEXT_LIMIT, AUTO_MANAGEMENT) and a config file, but the Python script does not read these env vars or config file. The metadata lists sqlite3 as a package (sqlite3 is part of Python stdlib). No credentials or secrets are requested. The inconsistency between advertised env/config usage and actual code is notable.
Persistence & Privilege
The skill is not 'always: true' and does not request elevated privileges. It creates a workspace and writes an SQLite DB under the user's home directory (~/.openclaw/workspace-telegram-bot1/memory/memories.db). That is expected for a local memory tool but the hard-coded workspace name (contains 'telegram-bot1') is unusual and may be a leftover; consider this suspicious but not privileged.
Scan Findings in Context
[NO_FINDINGS] expected: Static pre-scan reported no regex-based findings. That does not imply the project is coherent; manual review shows functional mismatches between documentation and code.
What to consider before installing
This skill's documentation promises many features (search, compression, import/export, tagging, advanced DB schema, dynamic model injection) that the bundled script does not implement — the script only supports init, add, stats, and a simple auto-manage calculation. Before installing or running: (1) review the script yourself — it writes an SQLite DB to ~/.openclaw/workspace-telegram-bot1/memory/memories.db; (2) run it in a sandbox or isolated account if you want to test; (3) if you expect the advertised features, ask the author for a version that implements them or for clear release notes; (4) be cautious trusting SKILL.md claims (env vars and config paths are documented but unused). There are no signs of network exfiltration or credential access in the provided code, but the documentation/code mismatch is a red flag — treat as suspicious and verify behavior before giving it production access.

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

Runtime requirements

🧠 Clawdis
Binspython3
latestvk97dkzd94stnv5ydncbpb7xstn83b76h
129downloads
0stars
2versions
Updated 1mo ago
v1.0.1
MIT-0

Context Manager - 智能上下文管理系统

高效的上下文管理工具,支持多模型自适应、分层记忆、动态注入、完整的数据库管理。

核心特性

  • 多模型支持 - 自动适应不同模型的上下文限制
  • 分层记忆系统 - 热/温/冷三层记忆分离
  • SQLite 数据库 - 快速搜索和完整索引
  • 动态记忆注入 - 根据任务自动加载相关记忆
  • 智能压缩 - 删除重复、合并相同内容
  • 自适应策略 - 根据上下文限制自动调整管理策略

支持的模型

模型上下文限制管理策略
Claude Haiku8K激进压缩
Claude Sonnet200K温和压缩
Claude Opus200K温和压缩
GPT-48K激进压缩
GPT-4 Turbo128K温和压缩
GPT-4o128K温和压缩
Gemini 1.5 Pro1M最小压缩
Qwen 3.5 Plus128K温和压缩

快速开始

1. 初始化系统

python3 scripts/context-manager.py --init

2. 添加记忆

python3 scripts/context-manager.py --add "你的记忆内容" --importance 0.9

3. 查看统计

python3 scripts/context-manager.py --stats

4. 自动管理

python3 scripts/context-manager.py --auto-manage

5. 搜索记忆

python3 scripts/context-manager.py --search "关键词"

高级用法

指定模型

python3 scripts/context-manager.py --model "gpt-4-turbo" --auto-manage

加载相关记忆

python3 scripts/context-manager.py --load-for-task "我需要了解 Gmail 配置"

压缩内存

python3 scripts/context-manager.py --compress --level aggressive

导出数据

python3 scripts/context-manager.py --export memories.json

导入数据

python3 scripts/context-manager.py --import memories.json

配置

环境变量

export OPENCLAW_MODEL="gpt-4-turbo"
export CONTEXT_LIMIT="128000"
export AUTO_MANAGEMENT="true"

配置文件 (~/.openclaw/config/context-manager.json)

{
  "default_model": "gpt-4-turbo",
  "auto_management": true,
  "compression_level": "moderate",
  "archive_threshold": 0.8,
  "compress_threshold": 0.6,
  "hot_memory_ratio": 0.2,
  "warm_memory_ratio": 0.4,
  "cold_memory_ratio": 0.4
}

数据库结构

memories 表

CREATE TABLE memories (
    id INTEGER PRIMARY KEY,
    content TEXT NOT NULL,
    importance REAL DEFAULT 1.0,
    layer TEXT DEFAULT 'warm',
    created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
    last_accessed TIMESTAMP,
    access_count INTEGER DEFAULT 0,
    tokens INTEGER,
    tags TEXT
);

memory_index 表

CREATE TABLE memory_index (
    id INTEGER PRIMARY KEY,
    memory_id INTEGER,
    keyword TEXT,
    relevance REAL,
    FOREIGN KEY(memory_id) REFERENCES memories(id)
);

management_history 表

CREATE TABLE management_history (
    id INTEGER PRIMARY KEY,
    model_name TEXT,
    usage_percent REAL,
    action TEXT,
    tokens_saved INTEGER,
    created_at TIMESTAMP
);

工作流程

用户输入
    ↓
检测模型 + 获取上下文限制
    ↓
选择自适应策略
    ↓
计算当前使用率
    ↓
执行相应操作 (压缩/合并/归档)
    ↓
搜索相关记忆
    ↓
动态注入到上下文
    ↓
模型处理

管理策略

小模型 (8K tokens)

使用率 < 50%  → 正常
使用率 50-70% → 定期压缩
使用率 70-80% → 积极压缩 + 合并
使用率 > 80%  → 激进压缩 + 归档

中等模型 (50K tokens)

使用率 < 60%  → 正常
使用率 60-75% → 定期压缩
使用率 75-85% → 中等压缩 + 合并
使用率 > 85%  → 积极压缩 + 归档

大模型 (200K tokens)

使用率 < 70%  → 正常
使用率 70-80% → 轻度压缩
使用率 80-90% → 中等压缩
使用率 > 90%  → 积极压缩

常见问题

Q: 如何查看所有记忆?

python3 scripts/context-manager.py --list-all

Q: 如何删除特定记忆?

python3 scripts/context-manager.py --delete <memory_id>

Q: 如何更新记忆重要性?

python3 scripts/context-manager.py --update <memory_id> --importance 0.8

Q: 如何查看管理历史?

python3 scripts/context-manager.py --history

Q: 如何重置系统?

python3 scripts/context-manager.py --reset

性能指标

指标
记忆保留率100%
上下文优化80-95%
搜索速度< 100ms
数据库大小< 10MB
支持记忆数10,000+

版本历史

v1.0.0 (2026-03-21)

  • ✅ 初始版本
  • ✅ 分层记忆系统
  • ✅ SQLite 数据库
  • ✅ 多模型支持
  • ✅ 动态记忆注入
  • ✅ 自适应管理策略

许可证

MIT

作者

完美爬爬虾 🦐

贡献

欢迎提交 Issue 和 Pull Request!

Comments

Loading comments...