claude-force: Skill for Claude Code

.claude/skills/telegram-bot-patterns/SKILL.md

telegram-bot-patterns is a skill for Claude Code from khanh-vu/claude-force. It costs 0 tokens per session (843 once invoked), scanned A, original, MIT.

A set of design patterns for building Telegram bots, including bots that show trading-portfolio information and offer buttons for actions.

In plain words
What is it for?
Use it to build Telegram trading-bot screens such as portfolio status, detailed views, profit-and-loss reports, and refresh actions.
Why use it?
It provides a clear way to organize bot commands, interactive buttons, replies, and portfolio data instead of designing each interaction from scratch.

Skill for Claude Code

Written for Claude Code: installed under .claude/.

This is khanh-vu/claude-force's own configuration. It tells Claude Code how to work on claude-force itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything claude-force configures →

Reuse

Borrowing it

Nothing to install: this file belongs to khanh-vu/claude-force. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/khanh-vu/claude-force/main/.claude/skills/telegram-bot-patterns/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/khanh-vu/claude-force

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for telegram-bot-patterns

README.md
[![agentmods](https://agentmods.dev/badge/skills/khanh-vu/claude-force/telegram-bot-patterns.svg)](https://agentmods.dev/skills/khanh-vu/claude-force/telegram-bot-patterns)
Your own site
<a href="https://agentmods.dev/skills/khanh-vu/claude-force/telegram-bot-patterns"><img src="https://agentmods.dev/badge/skills/khanh-vu/claude-force/telegram-bot-patterns.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 843 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00000 $0.00843
Opus 5 $0.00000 $0.00421
Sonnet 5 $0.00000 $0.00169
Haiku 4.5 $0.00000 $0.00084

Measured 6d ago against content hash b8127b025f21, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

telegram-bot-patterns scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 6d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/skills/telegram-bot-patterns/SKILL.md · 133 lines

How it starts

The opening of the file, as written. The whole thing — 133 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Telegram Bot Patterns

Patterns for building secure, interactive Telegram bot interfaces for trading bots.

Command Handler Pattern

from telegram import Update, InlineKeyboardMarkup, InlineKeyboardButton
from telegram.ext import ContextTypes

async def portfolio_status(update: Update, context: ContextTypes.DEFAULT_TYPE):
    """Display current portfolio with interactive buttons"""

    # Fetch portfolio data
    portfolio = await get_portfolio_status()

    # Create interactive keyboard
    keyboard = [
        [InlineKeyboardButton("📊 Detailed View", callback_data='portfolio_detail')],
        [InlineKeyboardButton("💰 P&L Report", callback_data='pnl_report')],
        [InlineKeyboardButton("🔄 Refresh", callback_data='refresh')]
    ]
    reply_markup = InlineKeyboardMarkup(keyboard)

    # Format message
    message = f"""
📈 **Portfolio Status**

Total Value: ${portfolio['total_value']:,.2f}
Today's P&L: ${portfolio['daily_pnl']:+,.2f} ({portfolio['daily_pnl_pct']:+.2f}%)
Open Positions: {portfolio['num_positions']}

💼 Top 3 Positions:
{format_top_positions(portfolio['positions'])}
    """

    await update.message.reply_text(
        message,
        parse_mode='Markdown',
        reply_markup=reply_markup
    )

Authentication Pattern

from functools import wraps

# Whitelist of allowed user IDs
ALLOWED_USERS = {123456789, 987654321}

def restricted(func):
    """Decorator to restrict command to whitelisted users"""
    @wraps(func)
    async def wrapped(update: Update, context: ContextTypes.DEFAULT_TYPE, *args, **kwargs):
        user_id = update.effective_user.id

        if user_id not in ALLOWED_USERS:
            logger.warning(f"Unauthorized access attempt from user {user_id}")
            await update.message.reply_text(
                "⛔ Access denied. This incident has been logged."
            )
            return

        return await func(update, context, *args, **kwargs)
    return wrapped

@restricted
async def execute_trade(update: Update, context: ContextTypes.DEFAULT_TYPE):
    """Execute trade - requires authorization"""
    # Trading logic here
    pass

Read the full file on GitHub · 133 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 6d ago First seen · 133 lines · 0 tokens per session scan A b8127b025f21

Subscribe to this mod's changes

telegram-bot-patterns is a skill published in the GitHub repository khanh-vu/claude-force (5 stars, last pushed 9mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 843 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

x402

Set up Browser Use Cloud payments with x402 — pay per request from a crypto wallet (USDC on Base mainnet), no signup or API key. Two setups it works out up front — "just use it" (set up a wallet so you or Claude Code can run cloud browser tasks paid from the wallet — Claude writes and runs throwaway scripts, nothing…

browser-use/browser-use · 175 tokens

tushare

A Python interface for Tushare, a financial data service that provides market and company information for stocks, funds, futures, and digital assets. It returns queried data as pandas tables.

HKUDS/Vibe-Trading · 79 tokens

stripe-best-practices

Guides Stripe integration decisions across API selection (Checkout Sessions vs PaymentIntents), Connect platform setup (Accounts v2, controller properties), billing/subscriptions, tax and registrations (Stripe Tax, automatictax, product tax codes), Treasury financial accounts, integration options (Checkout, Payment…

stripe/ai · 134 tokens

pinme-uniwebpay

Use when generating, modifying, or reviewing PinMe Worker (Cloudflare Worker TypeScript) code that accepts payments through UniwebPay — payment links, products/prices, checkout sessions, payment status reads, refunds, subscriptions, or handling UniwebPay webhooks with @uniwebpay/sdk in a PinMe project.

glitternetwork/pinme · 71 tokens

erp-xpp

Finance and Operations X++ development lifecycle — scaffold models, author classes, custom services/APIs, and data entities, install matching SDKs, compile deployable packages, deploy packages, synchronize databases, and verify deployed artifacts. Use when the user wants to create, build, compile, package, deploy…

microsoft/Dataverse-skills · 84 tokens

kalshi-api

Kalshi exchange mechanics — RSA-PSS auth, order schema, YES/NO orderbook convention, WebSocket, and endpoint surface. Market-type-agnostic shared layer for all Kalshi skills.

agiprolabs/claude-trading-skills · 44 tokens