Agent skill

Telegram Gateway Debug Loop

by z80dev in z80dev/lemon

Debug and stress-test lemon gateway behavior by acting as both sides of Telegram conversations: run lemon-gateway with debug logs, then use Telethon with user credentials to send/reply messages in a…

MITAuto-check: notesTesting & QA

Install Telegram Gateway Debug Loop

skills CLI
$ npx skills add z80dev/lemon --skill telegram-gateway-debug-loop -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install z80dev/lemon telegram-gateway-debug-loop --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/z80dev/lemon.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/telegram-gateway-debug-loop .claude/skills/telegram-gateway-debug-loop && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
telegram-gateway-debug-loop
GitHub stars
131
Token cost
~744 tokens
SKILL.md length
268 words
Files
1
Skills in repo
6
Repo updated
First seen
Licence
MIT

At a glance

Debug and stress-test lemon gateway behavior by acting as both sides of Telegram conversations: run lemon-gateway with debug logs, then use Telethon with user credentials to send/reply messages in a…

  • Works in 3 steps: Load Telegram credentials from… → Start gateway with debug logging → Optionally attach a remote shell for…
  • Delivery failures
  • SKILL.md covers Setup, Sending Messages via Telethon, Inspecting Runtime State and Watching for Failures, plus 2 more sections
  • Calls uv

What it does

Telegram Gateway Debug Loop is an agent skill from z80dev/lemon. Debug and stress-test lemon gateway behavior by acting as both sides of Telegram conversations: run lemon-gateway with debug logs, then use Telethon with user credentials to send/reply messages in a dedicated topic while watching gateway logs and runtime state. Use for stuck runs, delivery failures, scheduler/lock contention, async delegation bugs, and context overflows.

Its SKILL.md is about 740 tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Testing & QA, covering Load testing. It works with Telegram. The repository describes itself as: BEAM-native platform for LLM agents: OTP-supervised per-run processes, pluggable engines and channels, contract-tested extension points, and a deterministic multi-agent sim arena. The licence is MIT.

When your agent uses it

  • Delivery failures
  • Scheduler/lock contention
  • Async delegation bugs
  • Context overflows

Example prompts

  • “/telegram-gateway-debug-loop”

Requirements

  • Python 3
  • Pre-approved tools (allowed-tools): Read, Grep, Bash, Glob, Write

Workflow steps

3 steps, taken from the first numbered list in SKILL.md.

  1. Load Telegram credentials from ~/.zeebot/api_keys/telegram.txt.
  2. Start gateway with debug logging
  3. Optionally attach a remote shell for live introspection

What it can do on your machine

Read from SKILL.md and the folder at commit 899e215. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves these tools, so the agent can use them without asking each time:

    • Read
    • Grep
    • Bash
    • Glob
    • Write

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • uv

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use uv, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Telegram Gateway Debug Loop loads about 744 tokens when it runs. Until then it costs about 100 tokens; SKILL.md has 268 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~100
When it runs · the whole SKILL.md, loaded when a task matches
~744

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check: notes

The automated check noted patterns worth knowing about, such as sudo or a known installer.

  • NotePre-approves every shell command (allowed-tools: Bash)SKILL.md
    allowed-tools: Read, Grep, Bash, Glob, Write

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from z80dev/lemon at commit 899e215, republished under its MIT licence (© z80dev). 268 words, ~744 tokens.

Download SKILL.mdSave it as .claude/skills/telegram-gateway-debug-loop/SKILL.md (or your agent's skills folder).
name
telegram-gateway-debug-loop
description
Debug and stress-test lemon gateway behavior by acting as both sides of Telegram conversations: run lemon-gateway with debug logs, then use Telethon with user credentials to send/reply messages in a dedicated topic while watching gateway logs and runtime state. Use for stuck runs, delivery failures, scheduler/lock contention, async delegation bugs, and context overflows.
allowed-tools
Read, Grep, Bash, Glob, Write
disable-model-invocation
true
argument-hint
[description of issue to debug]

Telegram Gateway Debug Loop

Use this skill to run end-to-end repros with real Telegram traffic.

Setup

  1. Load Telegram credentials from ~/.zeebot/api_keys/telegram.txt.

    • Read the file to get api_id, api_hash, and phone number.
    • NEVER print, echo, or commit these values. Hold them in memory only.
  2. Start gateway with debug logging:

    bash
    cd /Users/z80/dev/lemon
    LOG_LEVEL=debug ./bin/lemon-gateway --debug --sname lemon_gateway_debug

    Run this in the background and monitor its output.

  3. Optionally attach a remote shell for live introspection:

    bash
    iex --sname lemon_attach --cookie lemon_gateway_dev_cookie --remsh lemon_gateway_debug@$(hostname -s)

Sending Messages via Telethon

  1. Use Telethon through uv (no global install needed):

    bash
    uv run --with telethon python <script.py>

    Write a temporary Python script that:

    • Connects with the user's Telegram credentials
    • Sends messages into a dedicated debug topic/thread
    • Keeps all probes in that thread
  2. Stress async behavior with prompts that trigger delegation/tool runs:

    • agent_id=coder delegation
    • Async poll loops
    • Multi-step tool workflows

Inspecting Runtime State

  1. While traffic is active, inspect runtime state via the remote shell:
    • :sys.get_state(LemonGateway.Scheduler) — scheduler state
    • :sys.get_state(LemonGateway.EngineLock) — lock state
    • DynamicSupervisor.which_children(LemonGateway.ThreadWorkerSupervisor) — active workers

Watching for Failures

  1. Watch gateway logs for high-value failure signatures:
    • :unknown_channel — message routed to unknown channel
    • Scheduler stalls or lock starvation
    • Context overflow/trim failures
    • Delivery retries/timeouts

Capturing Repros

  1. For each repro, capture:
    • The exact prompt(s) sent
    • Thread ID
    • Timestamps
    • State snapshots from the remote shell
    • Relevant log lines

If $ARGUMENTS is provided, focus the debug session on reproducing that specific issue.

Secrets + Safety

  • NEVER print or commit API keys, session strings, OTPs, or phone numbers.
  • Keep credentials in local secret files only.
  • If session auth is invalid, re-auth locally and update only local secret files.
  • Do not include credentials in any script files that get written to disk — pass them via environment variables or read them at runtime.

© z80dev, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .claude/skills/telegram-gateway-debug-loop of z80dev/lemon.

Open the folder on GitHubat commit 899e215

Compare with similar skills

Telegram Gateway Debug Loop next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Telegram Gateway Debug Loop compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Telegram Gateway Debug Loop this skillz80dev/lemon131—~744Automated safety check: NotesMIT
Writing Livekit Scenarioslivekit-examples/agent-starter-python2641 repos~2.5kAutomated safety check: PassMIT
Go Testingcxuu/golang-skills1701 repos~1.3kAutomated safety check: PassApache-2.0
Goalcraftgrp06/goalcraft102—~3.8kAutomated safety check: PassMIT
Thinking Partnermattnowdev/thinking-partner205—~4.4kAutomated safety check: PassMIT
Challengeblueberrycongee/termcanvas406—~1.5kAutomated safety check: PassMIT

Similar skills

  • Writing Livekit Scenarios

    livekit-examples/agent-starter-python

    Creates and maintains the scenarios a LiveKit agent simulation runs, and wires the agent to consume them.

    264 GitHub starsUsed in 1 repo~2.5k tokens
    Testing & QAAuto-check passed
  • Go Testing

    cxuu/golang-skills

    A skill your agent uses when writing, reviewing, or improving Go test code — including table-driven tests, subtests, parallel tests, test helpers, test doubles, and assertions with cmp.Diff.

    170 GitHub starsUsed in 1 repo~1.3k tokens
    Testing & QAAuto-check passed
  • Goalcraft

    grp06/goalcraft

    Turn a rough draft, vague ambition, or messy task brief into a powerful Codex /goal objective for persistent, evidence-checked work.

    102 GitHub stars~3.8k tokensUpdated 4 mo ago
    Testing & QAAuto-check passed
  • Thinking Partner

    mattnowdev/thinking-partner

    A deterministic thinking partner that challenges assumptions and applies mental models to sharpen decisions, solve problems, and think more clearly.

    205 GitHub stars~4.4k tokensUpdated 6 mo ago
    Testing & QAAuto-check passed
  • Challenge

    blueberrycongee/termcanvas

    Adversarial review skill. An agent skill from blueberrycongee/termcanvas.

    406 GitHub stars~1.5k tokensUpdated 4 mo ago
    Testing & QAAuto-check passed
  • Vision

    kunchenguid/vision

    Draft and stress-test a VISION.md for a repository, then iterate with the author on an interactive review board until approved.

    329 GitHub stars~2.9k tokensUpdated 1 mo ago
    Testing & QAAuto-check passed

More from z80dev/lemon

  • Verify Lemon

    z80dev/lemon

    Verify lemon features against a running (or disposable) instance using the cheapest sufficient tier: DIRECT (attach/RPC + control-plane WS + bus observation, no Telegram), FAKE TELEGRAM (hermetic…

    131 GitHub stars~4k tokensUpdated 21 days ago
    Auto-check: notes
  • Pinata

    z80dev/lemon

    Pin files and JSON to IPFS via Pinata (JWT auth + helper scripts).

    131 GitHub stars~418 tokensUpdated 21 days ago
    Auto-check passed
  • Discord Client

    z80dev/lemon

    Interact with Discord via a bot: read channels, send messages, list guilds/channels, upload files, manage threads.

    131 GitHub stars~771 tokensUpdated 21 days ago
    Auto-check: notes
  • Runtime Remsh

    z80dev/lemon

    Connect to a running Lemon or lemon-gateway BEAM node, run recompile() for hot code reload, and execute Elixir code in that live runtime via IEx remsh or rpc-eval.

    131 GitHub stars~819 tokensUpdated 21 days ago
    Auto-check passed
  • Session Logs

    z80dev/lemon

    Search and analyze your own Lemon session logs (older/parent conversations) using jq.

    131 GitHub stars~949 tokensUpdated 21 days ago
    Auto-check passed

Works with

Categories

Questions about Telegram Gateway Debug Loop

What does Telegram Gateway Debug Loop do?

Debug and stress-test lemon gateway behavior by acting as both sides of Telegram conversations: run lemon-gateway with debug logs, then use Telethon with user credentials to send/reply messages in a…. Telegram Gateway Debug Loop is an agent skill from z80dev/lemon. Debug and stress-test lemon gateway behavior by acting as both sides of Telegram conversations: run lemon-gateway with debug logs, then use Telethon with user credentials to send/reply messages in a dedicated topic while watching gateway logs and runtime state.

When should I use Telegram Gateway Debug Loop?

Telegram Gateway Debug Loop fits situations like: delivery failures; scheduler/lock contention; async delegation bugs; context overflows.

How do I install Telegram Gateway Debug Loop in Claude Code?

Run `npx skills add z80dev/lemon --skill telegram-gateway-debug-loop -a claude-code`. Or copy the skill folder (.claude/skills/telegram-gateway-debug-loop in z80dev/lemon) into .claude/skills/telegram-gateway-debug-loop in your project. Claude Code loads it when a task matches its description.

How do I install Telegram Gateway Debug Loop in Codex?

Run `npx skills add z80dev/lemon --skill telegram-gateway-debug-loop -a codex`. Or copy the skill folder (.claude/skills/telegram-gateway-debug-loop in z80dev/lemon) into .agents/skills/telegram-gateway-debug-loop in your project. Codex loads it when a task matches its description.

Can I use Telegram Gateway Debug Loop in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add z80dev/lemon --skill telegram-gateway-debug-loop -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/telegram-gateway-debug-loop, .gemini/skills/telegram-gateway-debug-loop, .github/skills/telegram-gateway-debug-loop and .opencode/skills/telegram-gateway-debug-loop in your project.

What does Telegram Gateway Debug Loop need to run?

Going by SKILL.md and its folder, Telegram Gateway Debug Loop needs the command-line tools its instructions call (uv). Our summary lists: Python 3. Its frontmatter pre-approves these tools: Read, Grep, Bash, Glob, Write.

Does Telegram Gateway Debug Loop access the network?

SKILL.md contains no URLs. Its commands use uv, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Telegram Gateway Debug Loop safe to install?

Our automated static check of SKILL.md found notes only (pre-approves every shell command (allowed-tools: bash)), nothing it rates as a warning. It is not a guarantee. Review the folder before installing.

What licence does Telegram Gateway Debug Loop use?

Telegram Gateway Debug Loop is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Telegram Gateway Debug Loop use?

About 744 tokens (SKILL.md is roughly 3k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Telegram Gateway Debug Loop?

Skills that share tags, products or a category with Telegram Gateway Debug Loop: Writing Livekit Scenarios (livekit-examples/agent-starter-python, 264 stars), Go Testing (cxuu/golang-skills, 170 stars), Goalcraft (grp06/goalcraft, 102 stars) and Thinking Partner (mattnowdev/thinking-partner, 205 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Telegram Gateway Debug Loop?

z80dev (a GitHub user) maintains it in z80dev/lemon, which has 131 GitHub stars. The repository holds 6 skills in this directory. The repository was last updated on September 16, 2026.

Source: z80dev/lemon on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.