Skip to content
Back to skills

Telegram Context

ASecurity

Toggle-enabled skill that fetches Telegram message history at session start for conversational continuity. Maintains context across sessions without relying solely on memory files.

  • 2 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added November 11, 2026
securityjavascriptjavagitapisecurity

Works with

  • api

Security analysis

A100/100

Pro scans all 2 files and shows the line behind each finding

Scanned November 11, 2026

npx -y skills add johnalbertini14-glitch/openclaw-skills --skill telegram-context --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Telegram Context?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Telegram Context
[![Security: A โ€” Skills Directory](https://www.skillsdirectory.com/api/skills/johnalbertini14-glitch-telegram-context/badge)](https://www.skillsdirectory.com/skills/johnalbertini14-glitch-telegram-context)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: telegram-context
description: Toggle-enabled skill that fetches Telegram message history at session start for conversational continuity. Maintains context across sessions without relying solely on memory files.
homepage: https://github.com/openclaw/skills
metadata:
  openclaw:
    emoji: "๐Ÿ’ฌ"
    requires:
      bins: []
      env: []
    permissions:
      - message:read
---

# 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`:
```json
{
  "enabled": true,
  "fetchCount": 20,
  "lastFetch": "2025-01-15T10:30:00Z"
}
```

## Implementation Notes

### Command Handlers

**Enable/disable:**
```javascript
// 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:**
```javascript
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 in this skill

  • SKILL.md3.9 KB
  • _meta.json291 B

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in security โ†’

Comments

Loading commentsโ€ฆ

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.