Multi-Chat Context Manager

👤 derick001 📦 v1.0.0 ⭐ 4.3 ⬇️ 1.1K 下載
🤖 AI-Agent 免費

📖 技能介紹


name: multi-chat-context-manager description: CLI tool to store and retrieve conversation contexts per channel/user. version: 1.0.2 author: skill-factory metadata: openclaw: requires: bins: - python3


Multi-Chat Context Manager

What This Does

A simple CLI tool to store, retrieve, and clear conversation contexts. Contexts are saved as JSON, keyed by channel/user/thread IDs. This is a utility library, not an auto-integration plugin.

When To Use

  • You need to manually store conversation history per channel or user
  • You want a simple key-value context store for your scripts
  • You're building custom integrations and need context persistence

Usage

Store a conversation: python3 scripts/context_manager.py store --channel "telegram-123" --user "user-456" --message "Hello" --response "Hi there"

Retrieve context: python3 scripts/context_manager.py retrieve --channel "telegram-123" --user "user-456"

Clear context: python3 scripts/context_manager.py clear --channel "telegram-123"

List all contexts: python3 scripts/context_manager.py list

Examples

Example 1: Store and retrieve

Store: python3 scripts/context_manager.py store --channel "discord-general" --user "john" --message "What is AI?" --response "AI is artificial intelligence."

7w4.net收錄了海量優質技能外掛。

Retrieve: python3 scripts/context_manager.py retrieve --channel "discord-general" --user "john"

Output: { "channel_id": "discord-general", "user_id": "john", "history": [{"message": "What is AI?", "response": "AI is artificial intelligence."}] }

Requirements

  • Python 3.x
  • No external dependencies

Limitations

  • This is a CLI tool, not an auto-integration plugin
  • Does not automatically intercept messages from platforms
  • Stores data in plaintext JSON (not encrypted)
  • No file-locking for concurrent access
  • You must call it manually from your scripts or workflows

🤖 AI 評測

這個工具整體質量中等偏上,核心功能實現完整,文件清晰易讀,可以滿足基本的上下文儲存和檢索需求。雙介面設計提供了靈活性,無依賴的特性也降低了使用門檻。主要不足是 Shell 和 Python 的使用方式不統一,引數格式差異容易造成混淆;資料儲存沒有加密和併發保護,大型專案使用需謹慎。適合作為輕量級輔助工具,不建議用於高併發或安全性要求高的生產環境。

📊 多維度評分

適應性4.5
規範性4.1
有效性4.3
可靠性4
可信度4.8

📁 包含檔案 (6 個)

📄 SKILL.md 1.8 KB
📄 _meta.json 145 B
📄 data/contexts.json 2 B
📄 scripts/context-manager.sh 3.3 KB
📄 scripts/context_manager.py 5.1 KB
📄 tests/test_context_manager.py 3.2 KB