Multi-Chat Context Manager

v1.0.0

CLI tool to store and retrieve conversation contexts per channel/user.

0· 469·1 current·1 all-time
Security Scan
VirusTotalVirusTotal
Benign
View report →
OpenClawOpenClaw
Benign
high confidence
Purpose & Capability
Name/description (store/retrieve/clear per channel/user) align with the provided Python script, shell wrapper, and example usage. Only python3 is required and the code performs only local JSON file operations — proportional to the stated purpose.
Instruction Scope
SKILL.md instructions map directly to the scripts and describe manually invoking the CLI. The runtime instructions do not reference external endpoints or unrelated system paths. Notes: the tests attempt to set CONTEXT_STORAGE_PATH but the main code does not read that env var (so tests are buggy/inconsistent), and store_context uses os.path.getmtime(__file__) as a timestamp (likely a logic bug — returns file modification time, not current time). These are correctness issues, not evidence of malicious scope creep.
Install Mechanism
No install spec; the skill is instruction-only but bundles small scripts and tests. No network downloads or archive extraction are performed by an installer. Risk surface is limited to the included local Python scripts writing a JSON file.
Credentials
The skill declares no required environment variables or credentials, and the code does not request secrets. The test file sets CONTEXT_STORAGE_PATH to point tests at a temp file, but the main code does not read that env var — an inconsistency (likely a test bug). No disproportionate credential or config access is present.
Persistence & Privilege
The skill is not always-enabled and is user-invocable. Its persistence is limited to writing a local plaintext JSON file (data/contexts.json) within the package tree; it does not modify other skills or system-wide settings.
Assessment
This skill appears to do what it says: a small, local CLI context store that writes plaintext JSON. Before installing or using it, consider: (1) Data sensitivity — contexts are stored unencrypted in data/contexts.json, so avoid storing secrets or sensitive PII. (2) Storage location and permissions — the default path is inside the skill directory; you may want to move it or restrict filesystem permissions. (3) Concurrency — there is no file-locking; concurrent writes may corrupt the file. (4) Test/code inconsistencies — tests set CONTEXT_STORAGE_PATH but the main code ignores it; if you need a custom path, modify the code to honor an env var. (5) Minor bugs — stored timestamps use the script file mtime instead of the current time (adjust to use datetime.now()). (6) No network or credential access detected. If these limitations are acceptable, the skill is coherent and low-risk; otherwise, review/patch the code (particularly storage path handling and timestamping) before use.

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

Runtime requirements

Binspython3
latestvk977z05kx403dey3wpadmg0pw981tbyq
469downloads
0stars
4versions
Updated 1mo ago
v1.0.0
MIT-0

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."

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

Comments

Loading comments...