Skills DirectorySkills Directory
SkillsLearnSecurityCategoriesDocsBlogPro
Sign InSubmit Skill
Skills Directory

Security-tested agent skills for Claude, coding agents, and AI workflows.

Directory

  • Browse Skills
  • All Skills A–Z
  • Claude Skills
  • Claude Code Skills
  • Agent Skills
  • Categories
  • Authors
  • Submit a Skill

Learn

  • Learn Hub
  • Install Claude Skills
  • Write SKILL.md
  • Skills vs MCP
  • Directories Compared

Security

  • Security
  • Methodology
  • Secure Claude Skills
  • Security Badges
  • Chrome Extension
  • Skill Manager

Company

  • About
  • Community
  • Blog
  • API Docs
  • Advertise

2026 Skills Directory. All rights reserved.

ProTermsPrivacyRefunds
Back to skills

Apx Telegram

BSecurity

APX Telegram plugin — channels, project pinning, master agents, media. Load BEFORE configuring a new bot or routing — channels[] is the only place credentials live.

12 stars
0 votes
0 copies
1 views
Added 9/27/2026
ai-agentsbashapi

Works with

cliapimcp

Security Analysis

B75/100
criticalExfiltrates credentials via HTTP — exact pattern from Snyk ToxicSkills study
criticalSends environment variables or credentials to an external URL

Pro shows the line behind each finding and how to fix it

Scanned 9/27/2026

$npx -y skills add agentprojectcontext/apx --skill apx-telegram --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Apx Telegram?

Add the live security badge to your README — it updates automatically with every re-scan.

Security grade badge for Apx Telegram
[![Security: B — Skills Directory](https://www.skillsdirectory.com/api/skills/agentprojectcontext-apx-telegram/badge)](https://www.skillsdirectory.com/skills/agentprojectcontext-apx-telegram)

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

Download with Pro
Files
SKILL.md
---
name: apx-telegram
description: APX Telegram plugin — channels, project pinning, master agents, media. Load BEFORE configuring a new bot or routing — channels[] is the only place credentials live.
---

# apx-telegram

APX polls `getUpdates` and routes messages. Config: `~/.apx/config.json → telegram`. Key model: **each channel can be pinned to a project and a master agent**. Messages on a pinned channel run inside that project, optionally handled by a specific agent instead of the default super-agent.

## Shape

```json
{
  "telegram": {
    "enabled": true,
    "poll_interval_ms": 1500,
    "route_to_agent": "",          // global default master agent (empty = super-agent)
    "respond_with_engine": true,   // global default auto-reply flag
    "channels": [
      {
        "name": "default",
        "bot_token": "<from BotFather>",
        "chat_id": "<numeric chat id>",
        "project": "acme",          // optional: pin to project
        "route_to_agent": "reviewer",  // optional: per-channel agent
        "respond_with_engine": true,   // optional: override global
        "owner_user_id": "123456789"   // optional: via `apx telegram owner`
      }
    ],
    "contacts": [],   // global roster (user_id → role)
    "roles": {}       // role → allowed tools
  }
}
```

Root `telegram.bot_token` / `telegram.chat_id` are **not read**. APX drops them on load, so a token written there silently does nothing — always use `channels[]`. With `channels[]` empty, APX polls one implicit `default` channel using `BOT_TELEGRAM_TOKEN` / `TELEGRAM_CHAT_ID` from the environment.

## Concrete CLI calls

```bash
apx telegram setup            # prints the config template (channels[] shape)

# Channels CRUD
apx telegram channel add                  # interactive
apx telegram channel add clientes --bot-token <T> --chat-id <C> --project acme --agent reviewer
apx telegram channel list                 # alias: ls
apx telegram channel show clientes        # alias: get
apx telegram channel set    clientes --project acme
apx telegram channel set    clientes --agent reviewer
apx telegram channel set    clientes --respond-engine false
apx telegram channel unset  clientes --project --agent
apx telegram channel remove clientes      # alias: rm
apx telegram owner          clientes <user_id>

# Contacts roster + roles (global; gate which tools a sender may trigger)
apx telegram contacts
apx telegram contacts rm <user_id>
apx telegram role  <user_id> <role>
apx telegram roles
apx telegram roles set <name> --tools a,b,c     # or --tools '*'
apx telegram roles rm  <name>

# Polling lifecycle (autostarts with daemon)
apx telegram start
apx telegram stop
apx telegram status

# Sending (defaults to first configured channel)
apx telegram send "text"
apx telegram send "text" --chat 123456789
apx telegram send "text" --interrupt            # bypass pending-agent queue (also: --force)

# Media (daemon HTTP API — no dedicated CLI subcommand yet)
curl -X POST http://127.0.0.1:7430/api/telegram/send_photo \
  -H "Authorization: Bearer $(cat ~/.apx/daemon.token)" \
  -H "Content-Type: application/json" \
  -d '{"photo":"/abs/path.png","caption":"...","channel":"clientes"}'
curl -X POST http://127.0.0.1:7430/api/telegram/send_voice \
  -H "Authorization: Bearer $(cat ~/.apx/daemon.token)" \
  -H "Content-Type: application/json" \
  -d '{"audio":"/abs/path.ogg","duration":5,"channel":"default"}'
```

Every `channel` CRUD write triggers `POST /api/admin/reload` so polling picks up the new wiring without restart.

## What "pin to project" does

On a message to a channel with `project: "acme"`:
1. The super-agent invocation gets `channelMeta.projectId = <acme's id>`.
2. The system prompt resolves project-scoped agents, MCPs, memory.
3. Tools (`list_agents`, `list_tasks`, `create_task`, …) default to that project — no need to repeat "in acme" each message.

## What "master agent" does

With `route_to_agent: "reviewer"`, an incoming message is dispatched to that project agent instead of the super-agent. Routing is **in-process** — `src/core/channels/telegram/dispatch.js` reads the agent and makes a single `callEngine` with the agent's `AGENT.md` + memory (there is no per-request `agents/:slug/chat` HTTP route). No tools: text in, text out. Use this for persona channels (reviewer, sales, support) instead of the general assistant. Empty = super-agent (default).

## Anti-examples

```bash
# DON'T write to the root fields — they are dropped on load.
apx config set --global telegram.bot_token "<T>"   # ← use channels[] via `apx telegram channel`

# DON'T expect routing magic from same project on two channels.
# A channel pins messages TO a project, not vice-versa. Same project from multiple
# channels is fine, but each channel has its own message log — no unified context.

# DON'T set route_to_agent to a non-existent slug.
apx telegram channel set default --agent nope    # silently 404s; verify with channel show
```

## Multiple bots, one APX

`channels[]` supports multiple `{bot_token, chat_id}` pairs — different bots OR the same bot with different chats. Plugin polls each in parallel; project/agent pinning is per-channel. Wire "client A bot, personal bot, notifications-only bot" as three channels.

## Don't

- Write to `telegram.bot_token` / `telegram.chat_id` at root.
- Expect `apx telegram send` to target a project — it targets a *chat id*. Verify wiring with `apx telegram channel show <name>`.
- Set `respond_with_engine: false` and then wonder why replies stop. That flag disables auto-reply for the channel.
- Forget the plugin only fires on listed chat IDs. Other chats are ignored.

Attribution

agentprojectcontextagentprojectcontext
View sourceSee grades on GitHubMore from agentprojectcontext →
SSkills DirectorySkills Directory

Ship a skill? Prove it's safe.

Free 120-pattern security scan, letter grade, and an embeddable README badge.

Submit a skill

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

Comments (0)

No comments yet. Be the first to comment!

SSkills DirectorySkills Directory

Ship a skill? Prove it's safe.

Free 120-pattern security scan, letter grade, and an embeddable README badge.

Submit a skill

Related Skills

Caveman

Terse caveman voice: answer first, fluff gone, every technical fact kept. Use for /caveman, "caveman mode", "talk like caveman", "be brief", "less tokens". Stays on until "stop caveman" or "normal mode".

1100021 votes

Hyperplan

Adversarial multi-agent planning skill. Self-orchestrates 5 hostile category members (unspecified-low, unspecified-high, deep, ultrabrain, artistry) via team-mode for ruthless cross-critique debate, distills only the defensible insights, then MANDATORILY hands the distilled insight bundle to the `plan` agent for executable plan formalization. Use when planning needs maximum rigor and surfacing of weak assumptions, blind spots, and over-engineering. Triggers: 'hyperplan', 'hpp', '/hyperplan', ...

698621 votes

Writing Skills

Create and manage Claude Code skills in HASH repository following Anthropic best practices. Use when creating new skills, modifying skill-rules.json, understanding trigger patterns, working with hooks, debugging skill activation, or implementing progressive disclosure. Covers skill structure, YAML frontmatter, trigger types (keywords, intent patterns), UserPromptSubmit hook, and the 500-line rule. Includes validation and debugging with SKILL_DEBUG. Examples include rust-error-stack, cargo-dep...

3931 votes

Mcp Code Execution

Routes multi-tool workflows through MCP servers for large datasets and pipelines. Use when Bash tool overhead is limiting throughput on data-heavy tasks.

3421 votes

catchup

Recovers the conversation and failed tool calls of a previous Codex, Amp, Claude Code, Antigravity, Cline, Copilot CLI, Cursor, DeepSeek Harness, Grok Build, Kimi, OpenCode, Pi Agent, or ZCode session. Use when the user says "catch up", "what did the last session do", "get me up to speed", "I switched agents", asks to recover/summarize a previous session before continuing, or asks to diagnose or report a catchup failure. Do NOT use for the current conversation, git history, or any non-agent log.

741 votes
View all in ai-agents →