Repository inventory

pbnicad/telegram-bot-grammy-skill

Skills indexed from this repository, with install-style signals scoped to the repo.
1 skills2 GitHub stars0 weekly installsTypeScriptGitHubOwner profile

Overview

This skill provides a complete workflow for building Telegram bots using the grammY framework, TypeScript, Drizzle ORM, and Cloudflare Workers. It includes project scaffolding, D1 database integration, testing with Vitest, linting with Biome, and GitHub Actions CI/CD for multi-environment deployments. The setup is optimized for Cloudflare D1 (SQLite) and scalable webhook handling on Workers.

How this skill works

I scaffold a TypeScript Cloudflare Worker project, install grammY and Drizzle, and add a Drizzle schema that maps users and settings to a D1 database. The bot runs inside the Worker fetch handler, uses grammY command handlers to process updates, and persists user data with Drizzle via the D1 binding. CI runs linting and tests, then deploys to dev or production environments using Wrangler and GitHub Actions.

When to use it

  • Starting a new Telegram bot project targeting Cloudflare Workers and D1
  • Adding commands, user storage, or settings persistence to an existing bot
  • Setting up Drizzle ORM migrations and D1 database integration
  • Creating automated tests for bot handlers with Vitest
  • Configuring multi-environment CI/CD with GitHub Actions and Wrangler

Best practices

  • Keep environment-specific values in wrangler.toml and GitHub secrets (BOT_TOKEN, D1 ids, API tokens).
  • Use Drizzle schema files to generate migrations and apply them per environment (dev vs production).
  • Run lint and tests in pre-commit hooks and CI to prevent regressions before deploys.
  • Use webhookCallback with the cloudflare-mod adapter for efficient Worker integration.
  • Protect the production environment in GitHub with required reviewers and stricter secrets handling.

Example use cases

  • Create a new bot skeleton: scaffolding, grammY setup, and a /start command that persists users.
  • Add a settings feature: a settings table related to users and commands to update preferences.
  • Implement automated migrations: generate SQL from Drizzle and apply to D1 development and production.
  • Write Vitest suites for command handlers and run them in GitHub Actions on pull requests.
  • Deploy separate dev and prod Workers with different BOT_INFO and D1 bindings using Wrangler environments.

FAQ

Generate SQL from the Drizzle schema with drizzle-kit, create a D1 migration via wrangler d1 migrations create, then apply migrations locally and remotely using wrangler d1 migrations apply.

How do I test bot handlers locally?

Use Vitest to write handler tests and run them in CI or locally; mock the D1 binding or use a local SQLite instance created from the Drizzle schema for integration tests.

1 skills

More from this maintainer
Other repositories and skills published under the same GitHub owner.
Skills library
Jump back to the full directory or explore grouped topics.
Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational