telegram-dev

全面的 Telegram 开发指南,涵盖 Bot 开发、Mini Apps (Web Apps)、客户端开发的完整技术栈。

2025emma/vibe-coding-cnUpdated May 13, 2026

Works with

Claude CodeCursorClineWindsurfCodexGooseGitHub CopilotZed

1

total installs

1

this week

18.8K

GitHub stars

0

upvotes

Install Skill

Run in your terminal

$npx skills add https://github.com/2025emma/vibe-coding-cn --skill telegram-dev

1

installs

1

this week

18.8K

stars

Installation Guide

How to use telegram-dev on Cursor

AI-first code editor with Composer

1

Prerequisites

Before installing skills in Cursor, ensure your development environment meets these requirements:

  • Cursor installed and configured on your machine
  • Node.js 16+ with npm — verify with node --version
  • Active project directory where you want to add telegram-dev
2

Run the install command

Execute the skills CLI command in your project's root directory to begin installation:

$npx skills add https://github.com/2025emma/vibe-coding-cn --skill telegram-dev

Fetches telegram-dev from 2025emma/vibe-coding-cn and configures it for Cursor.

3

Select Cursor when prompted

The CLI shows a list of agents. Use arrow keys and space to select Cursor:

◆ Which agents do you want to install to?
│ ── Universal (.agents/skills) ────────────────
│ · Cline · Codex · Goose · Windsurf
│ ●Cursor(selected)
│ · Cursor · Aider · Continue
4

Verify installation

Confirm successful installation by checking the skill directory location:

.cursor/skills/telegram-dev

Restart Cursor to activate telegram-dev. Access via /telegram-dev in your agent's command palette.

Security Notice

We perform automated surface-level scans (Gen AI Scanner, Socket, Snyk) during installation. These checks detect common vulnerabilities but do not guarantee complete security. Always review skill source code and verify the publisher's reputation before production use.

Skills execute code in your environment. Always review source, verify the publisher, and test in isolation before production.

Documentation

Telegram 生态开发技能

全面的 Telegram 开发指南,涵盖 Bot 开发、Mini Apps (Web Apps)、客户端开发的完整技术栈。

何时使用此技能

当需要以下帮助时使用此技能:

  • 开发 Telegram Bot(消息机器人)
  • 创建 Telegram Mini Apps(小程序)
  • 构建自定义 Telegram 客户端
  • 集成 Telegram 支付和业务功能
  • 实现 Webhook 和长轮询
  • 使用 Telegram 认证和存储
  • 处理消息、媒体和文件
  • 实现内联模式和键盘

Telegram 开发生态概览

三大核心 API

  1. Bot API - 创建机器人程序

    • HTTP 接口,简单易用
    • 自动处理加密和通信
    • 适合:聊天机器人、自动化工具
  2. Mini Apps API (Web Apps) - 创建 Web 应用

    • JavaScript 接口
    • 在 Telegram 内运行
    • 适合:小程序、游戏、电商
  3. Telegram API & TDLib - 创建客户端

    • 完整的 Telegram 协议实现
    • 支持所有平台
    • 适合:自定义客户端、企业应用

Bot API 开发

快速开始

API 端点:

https://api.telegram.org/bot<TOKEN>/METHOD_NAME

获取 Bot Token:

  1. 与 @BotFather 对话
  2. 发送 /newbot
  3. 按提示设置名称
  4. 获取 token

第一个 Bot (Python):

import requests

BOT_TOKEN = "your_bot_token_here"
API_URL = f"https://api.telegram.org/bot{BOT_TOKEN}"

# 发送消息
def send_message(chat_id, text):
    url = f"{API_URL}/sendMessage"
    data = {"chat_id": chat_id, "text": text}
    return requests.post(url, json=data)

# 获取更新(长轮询)
def get_updates(offset=None):
    url = f"{API_URL}/getUpdates"
    params = {"offset": offset, "timeout": 30}
    return requests.get(url, params=params).json()

# 主循环
offset = None
while True:
    updates = get_updates(offset)
    for update in updates.get("result", []):
        chat_id = update["message"]["chat"]["id"]
        text = update["message"]["text"]
        
        # 回复消息
        send_message(chat_id, f"你说了:{text}")
        
        offset = update["update_id"] + 1

核心 API 方法

更新管理:

  • getUpdates - 长轮询获取更新
  • setWebhook - 设置 Webhook
  • deleteWebhook - 删除 Webhook
  • getWebhookInfo - 查询 Webhook 状态

消息操作:

  • sendMessage - 发送文本消息
  • sendPhoto / sendVideo / sendDocument - 发送媒体
  • sendAudio / sendVoice - 发送音频
  • sendLocation / sendVenue - 发送位置
  • editMessageText - 编辑消息
  • deleteMessage - 删除消息
  • forwardMessage / copyMessage - 转发/复制消息

交互元素:

  • sendPoll - 发送投票(最多 12 个选项)
  • 内联键盘 (InlineKeyboardMarkup)
  • 回复键盘 (ReplyKeyboardMarkup)
  • answerCallbackQuery - 响应回调查询

文件操作:

  • getFile - 获取文件信息
  • downloadFile - 下载文件
  • 支持最大 2GB 文件(本地 Bot API 模式)

支付功能:

  • sendInvoice - 发送发票
  • answerPreCheckoutQuery - 处理支付
  • Telegram Stars 支付(最高 10,000 Stars)

Webhook 配置

设置 Webhook:

import requests

BOT_TOKEN = "your_token"
WEBHOOK_URL = "https://yourdomain.com/webhook"

requests.post(
    f"https://api.telegram.org/bot{BOT_TOKEN}/setWebhook",
    json={"url": WEBHOOK_URL}
)

Flask Webhook 示例:

from flask import Flask, request
import requests

app = Flask(__name__)
BOT_TOKEN = "your_token"

@app.route('/webhook', methods=['POST'])
def webhook():
    update = request.get_json()
    
    chat_id = update["message"]["chat"]["id"]
    text = update["message"]["text"]
    
    # 发送回复
    requests.post(
        f"https://api.telegram.org/bot{BOT_TOKEN}/sendMessage",
        json={"chat_id": chat_id, "text": f"收到: {text}"}
    )
    
    return "OK"

if __name__ == '__main__':
    app.run(port=5000)

Webhook 要求:

  • 必须使用 HTTPS
  • 支持 TLS 1.2+
  • 端口:443, 80, 88, 8443
  • 公共可访问的 URL

内联键盘

创建内联键盘:

def send_inline_keyboard(chat_id):
    keyboard = {
        "inline_keyboard": [
            [
                {"text": "按钮 1", "callback_data": "btn1"},
                {"text": "按钮 2", "callback_data": "btn2"}
            ],
            [
                {"text": "打开链接", "url": "https://example.com"}
            ]
        ]
    }
    
    requests.post(
        f"{API_URL}/sendMessage",
        json={
            "chat_id": chat_id,
            "text": "选择一个选项:",
            "reply_markup": keyboard
        }
    )

处理回调:

def handle_callback_query(callback_query):
    query_id = callback_query["id"]
    data = callback_query["data"]
    chat_id = callback_query["message"]["chat"]["id"]
    
    # 响应回调
    requests.post(
        f"{API_URL}/answerCallbackQuery",
        json={"callback_query_id": query_id, "text": f"你点击了 {data}"}
    )
    
    # 更新消息
    requests.post(
        f"{API_URL}/editMessageText",
        json={
            "chat_id": chat_id,
            "message_id": callback_query["message"]["message_id"],
            "text": f"你选择了:{data}"
        }
    )

内联模式

配置内联模式: 与 @BotFather 对话,发送 /setinline

处理内联查询:

def handle_inline_query(inline_query):
    query_id = inline_query["id"]
    query_text = inline_query["query"]
    
    

List & Monetize Your Skill

Submit your Claude Code skill and start earning

Get started →

Use Cases

User Story & Requirements Generation

Create detailed user stories, acceptance criteria, and feature specs

Example

Generate user stories for 'password reset feature' with acceptance criteria, edge cases, and test scenarios

Reduce spec writing time by 50%, ensure comprehensive coverage

Competitive Analysis

Research competitors, compare features, identify gaps

Example

Analyze 5 competitor products, create feature comparison matrix, suggest differentiation opportunities

Complete competitive research in 2 hours instead of 2 days

Roadmap Prioritization

Evaluate features using frameworks (RICE, ICE, Kano) and create prioritized backlogs

Example

Score 20 feature ideas using RICE framework, generate prioritized roadmap with rationale

Make data-driven prioritization decisions faster

Stakeholder Communication

Draft PRDs, status updates, and stakeholder presentations

Example

Create executive summary of Q3 roadmap, monthly progress report, feature launch announcement

Save 3-5 hours/week on communication overhead

Implementation Guide

Prerequisites

  • Claude Desktop or compatible AI client
  • Access to product documentation and roadmap tools (Jira, Notion, etc.)
  • Understanding of product management frameworks (RICE, Jobs-to-be-Done, etc.)
  • Stakeholder contact information and communication channels

Time Estimate

30-60 minutes to see productivity improvements

Steps

  1. 1Install product management skill
  2. 2Start with user story generation for known feature
  3. 3Progress to competitive analysis: research 2-3 competitors
  4. 4Use for roadmap prioritization: apply RICE/ICE scoring
  5. 5Draft stakeholder communications and refine based on feedback
  6. 6Build template library for recurring PM tasks
  7. 7Share effective prompts with product team

Common Pitfalls

  • Not validating competitive research—verify facts before sharing
  • Accepting user stories without involving engineering team
  • Over-relying on frameworks without qualitative judgment
  • Not customizing outputs to company culture and communication style
  • Skipping stakeholder validation of generated requirements

Best Practices

✓ Do

  • +Validate research and competitive analysis with real data
  • +Collaborate with engineering when generating technical requirements
  • +Customize frameworks and templates to your company context
  • +Use skill for first drafts, refine with stakeholder input
  • +Document successful prompt patterns for PM tasks
  • +Combine AI efficiency with human judgment and intuition

✗ Don't

  • Don't publish competitive analysis without fact-checking
  • Don't finalize user stories without engineering review
  • Don't make prioritization decisions solely on AI scoring
  • Don't skip customer validation of generated requirements
  • Don't ignore company-specific context and culture

💡 Pro Tips

  • Provide context: company goals, constraints, customer feedback
  • Ask for alternatives: 'Show 3 ways to prioritize this roadmap'
  • Request stakeholder-specific formatting: 'Executive summary vs. engineering spec'
  • Use skill for 70% generation + 30% customization to company needs

When to Use This

✓ Use when

Use for user story writing, competitive research, roadmap prioritization, stakeholder communication, and PRD drafting. Best for reducing repetitive documentation and research work.

✗ Avoid when

Avoid for strategic product vision (requires deep customer empathy), pricing decisions (needs market and financial expertise), or when face-to-face customer discovery is more valuable than speed.

Learning Path

  1. 1Basic: user stories, feature specs, status updates
  2. 2Intermediate: competitive analysis, prioritization frameworks, PRDs
  3. 3Advanced: product strategy, go-to-market planning, OKR setting
  4. 4Expert: product vision, market positioning, business model innovation

Related Skills

Reviews

4.848 reviews
  • I
    Ira DialloDec 28, 2024

    telegram-dev has been reliable in day-to-day use. Documentation quality is above average for community skills.

  • I
    Ira BhatiaDec 24, 2024

    Registry listing for telegram-dev matched our evaluation — installs cleanly and behaves as described in the markdown.

  • M
    Michael AbbasDec 4, 2024

    telegram-dev reduced setup friction for our internal harness; good balance of opinion and flexibility.

  • O
    Olivia LiNov 23, 2024

    We added telegram-dev from the explainx registry; install was straightforward and the SKILL.md answered most questions upfront.

  • I
    Ishan HuangNov 19, 2024

    Solid pick for teams standardizing on skills: telegram-dev is focused, and the summary matches what you get after install.

  • S
    Sakshi PatilNov 11, 2024

    Useful defaults in telegram-dev — fewer surprises than typical one-off scripts, and it plays nicely with `npx skills` flows.

  • C
    Chinedu LopezOct 14, 2024

    Keeps context tight: telegram-dev is the kind of skill you can hand to a new teammate without a long onboarding doc.

  • I
    Ishan HarrisOct 10, 2024

    I recommend telegram-dev for anyone iterating fast on agent tooling; clear intent and a small, reviewable surface area.

  • C
    Chaitanya PatilOct 2, 2024

    Registry listing for telegram-dev matched our evaluation — installs cleanly and behaves as described in the markdown.

  • C
    Chinedu BansalSep 25, 2024

    Registry listing for telegram-dev matched our evaluation — installs cleanly and behaves as described in the markdown.

showing 1-10 of 48

1 / 5

Discussion

Comments — not star reviews
  • No comments yet — start the thread.