Telegram Context

Fetches recent Telegram messages at session start to maintain conversation context across sessions, with toggle and manual fetch commands.

MIT-0 · Free to use, modify, and redistribute. No attribution required.
0 · 521 · 0 current installs · 0 all-time installs
MIT-0
Security Scan
VirusTotalVirusTotal
Benign
View report →
OpenClawOpenClaw
Benign
high confidence
Purpose & Capability
The name/description say it will fetch recent Telegram messages for session continuity; the instructions only read/write a local memory file and call the built-in `message` tool limited to the current chat. These requirements are proportionate to that purpose.
Instruction Scope
SKILL.md instructs the agent to read/write memory/telegram-context.json and to call the platform `message` tool with action: 'list' for the current Telegram chat. That stays within the stated scope. Two things to note: (1) message content is explicitly included in the agent context and sent to your configured LLM provider (this is a privacy exposure the skill discloses), and (2) the skill assumes the platform's `message` tool enforces the 'current chat only' restriction — if the gateway/tool is misconfigured, fetched scope could be wider than intended.
Install Mechanism
No install spec or external downloads — instruction-only skill. No files are written by an installer, which minimizes supply-chain risk.
Credentials
The skill declares no environment variables or credentials (which is consistent). It does rely on the OpenClaw gateway having Telegram channel permissions already configured; that external permission is necessary but not requested by the skill itself. Also, the registry metadata doesn't list the memory path it uses (memory/telegram-context.json), though using a skill-local memory file is expected.
Persistence & Privilege
The skill is not always-on and is user-invocable. It reads/writes its own state file but does not request system-wide config changes or elevated privileges. Autonomous invocation is allowed by default but is not an unusual privilege here.
Assessment
This skill appears to do exactly what it says: when enabled it will fetch recent messages from the current Telegram chat (via the platform's message tool), include those messages in the AI context, and store only a small local settings file (memory/telegram-context.json). Before enabling: (1) Confirm you trust the OpenClaw gateway's Telegram integration and that it enforces 'current chat only' permissions; misconfiguration there could broaden access. (2) Remember fetched messages are sent to your configured LLM provider and may appear in logs—avoid auto-fetch for very sensitive conversations or use manual fetch with a low fetchCount. (3) Check where memory/telegram-context.json is stored/backed up and who can read it. Test the skill in a non-sensitive chat first to confirm behavior matches expectations.

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

Current versionv1.0.1
Download zip
chat-historyvk97ebvcfengmm1v50fw28xqrqd814ztecontextvk97ebvcfengmm1v50fw28xqrqd814ztelatestvk97ebvcfengmm1v50fw28xqrqd814ztememoryvk97ebvcfengmm1v50fw28xqrqd814zteprivacyvk97ebvcfengmm1v50fw28xqrqd814ztetelegramvk97ebvcfengmm1v50fw28xqrqd814zte

License

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

Runtime requirements

💬 Clawdis

SKILL.md

Telegram Context

Provides conversational continuity by fetching recent Telegram messages at session start. When enabled, the agent automatically retrieves message history to maintain context across disconnected sessions.

Credits

Created by @fourthdensity

Commands

  • /telegram-context on — Enable automatic history fetching
  • /telegram-context off — Disable automatic fetching
  • /telegram-context status — Show current settings
  • /telegram-context fetch [n] — Manually fetch last n messages (default: 20)

Setup

  1. The skill auto-detects Telegram channels — no configuration needed
  2. State is stored in memory/telegram-context.json
  3. Only activates when the current channel is Telegram

How It Works

When a session starts in Telegram:

  1. Check memory/telegram-context.json for enabled state
  2. If enabled, fetch recent messages via message tool
  3. Provide history as context for the conversation
  4. Update lastFetch timestamp

State File

memory/telegram-context.json:

{
  "enabled": true,
  "fetchCount": 20,
  "lastFetch": "2025-01-15T10:30:00Z"
}

Implementation Notes

Command Handlers

Enable/disable:

// Read current state
read: memory/telegram-context.json

// Update state
write: memory/telegram-context.json
{
  "enabled": true/false,
  "fetchCount": 20,
  "lastFetch": "2025-01-15T10:30:00Z"
}

Manual fetch:

message: {
  action: "list",
  limit: 20  // or user-specified count
}
// Provide results as context summary

Session Start Behavior

At the start of each Telegram session:

  1. Check if memory/telegram-context.json exists
  2. If enabled, call message tool with action: "list"
  3. Summarize recent messages for context window
  4. Acknowledge continuity to user (optional)

Implementation Scope

The skill uses OpenClaw's built-in message tool with:

  • action: "list" — limited to the current Telegram chat only
  • No access to other chats, channels, or external Telegram accounts
  • Requires the OpenClaw gateway to have Telegram channel permissions already configured

Privacy & Security

Data Handling:

  • Only fetches from the current chat (never cross-chats or other Telegram conversations)
  • Message content is included in the agent's context window and sent to the configured LLM provider
  • No message content is stored in telegram-context.json — only settings and timestamps
  • Message content may appear in OpenClaw session logs (depends on your logging configuration)

Recommendations for Sensitive Conversations:

  • Use manual fetch (/telegram-context fetch) instead of auto-fetch
  • Set low fetchCount (5-10) to minimize context exposure
  • Disable the skill entirely when discussing sensitive topics: /telegram-context off
  • Be aware that fetched messages become part of the conversation history sent to AI models

User Control:

  • Full toggle on/off anytime — no persistence beyond your control
  • No external credentials or API keys required
  • No binaries installed — pure instruction-based skill

Limitations

  • Telegram-only (other channels not supported)
  • Requires appropriate message permissions via OpenClaw gateway
  • Large history may need summarization to fit context window
  • Fetched messages are sent to your configured LLM provider — review your threat model for sensitive conversations

Tips

  • Set fetchCount to 10-30 for most use cases (balance context vs. tokens)
  • Use /telegram-context fetch 50 when you need deep context for a specific task
  • Works best alongside MEMORY.md for long-term persistence

Files

1 total
Select a file
Select a file to preview.

Comments

Loading comments…