Skip to main content
skill CX Codex

bot-developer — Claude Code skill: bots and installation

The bot-developer skill guides bot development for Discord, Telegram, and Slack, covering conversation state, API limits, and moderation. Use it when a bot needs multi-step interactions or automated rules.

MIT 218 installs ★ 274 updated 2026-10-30

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add curiositech/some_claude_skills --skill bot-developer -a claude-code
Open on GitHub

What bot-developer does

The skill outlines event-driven bot architecture, message queues, and separate services for areas such as users and moderation. For multi-turn conversations, it covers finite state machines, context retention, and clearing idle sessions. Its rate-limiting guidance includes Redis-backed limits and adapting to API response headers.

Moderation patterns include escalating penalties based on points, gradual point decay, and automated checks for spam, links, and banned words. The material also covers permission checks, token handling, and input validation. In-memory Python state disappears on restart, so the skill recommends Redis for session state and PostgreSQL for persistent data.

Reference material covers architecture, rate limiting, moderation, and templates for Discord.py and Telegram webhooks. For production Telegram bots, it favors webhooks over long polling; that choice affects how the bot connects to Telegram.

What it helps with

  • design event handling for a Discord bot
  • preserve conversation state between messages
  • throttle API calls using response headers
  • set up automated checks for spam and links
  • check permissions before running bot actions

Example prompts for the agent

  • Design a Discord moderation bot that detects spam and links.
  • Add a multi-step conversation to my Telegram bot and preserve its context.
  • Review my Slack bot handlers for API throttling and permission checks.

How to install bot-developer

1Skills CLI (Vercel)

npx skills add curiositech/some_claude_skills --skill bot-developer -a claude-code

2Manually: put the files in place

~/.claude/skills/bot-developer/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/bot-developer/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about bot-developer

How do I install bot-developer in Claude Code?

Run npx skills add curiositech/some_claude_skills --skill bot-developer -a claude-code. The skill file will be at ~/.claude/skills/bot-developer/SKILL.md.

What does bot-developer do?

It guides development of Discord, Telegram, and Slack bots, including conversation flows, moderation, and API rate limiting.

How does bot-developer handle bot state?

It recommends Redis for conversation state and PostgreSQL for persistent data. State kept in a Python dictionary is lost when the process restarts.

Source text

SKILL.md · MIT
---
name: bot-developer
description: Expert bot developer specializing in Discord, Telegram, Slack automation with deep knowledge of rate limiting, state machines, event sourcing, moderation systems, and conversational AI integration.
  Activate on 'Discord bot', 'Telegram bot', 'Slack bot', 'chat automation', 'moderation system'. NOT for web APIs (use backend-architect), general automation scripts (use python-pro), or frontend chat
  widgets (use frontend-developer).
allowed-tools: Read,Write,Edit,Bash,WebSearch,WebFetch
metadata:
  category: AI & Machine Learning
  pairs-with:
  - skill: api-architect
    reason: Design robust bot backend APIs
  - skill: devops-automator
    reason: Deploy and scale bot infrastructure
  tags:
  - discord
  - telegram
  - slack
  - bots
  - automation
---

# Bot Developer

Expert in building production-grade bots with proper architecture, state management, and scalability.

## Quick Start

```
User: "Build a Discord moderation bot with auto-mod"

Bot Developer:
1. Set up event-driven architecture (message broker + service layer)
2. Implement state machine for multi-turn mod flows
3. Add distributed rate limiting (Redis)
4. Create point-based moderation with decay
5. Configure auto-mod rules (spam, caps, links, words)
6. Deploy with proper logging and error handling
```

**Key principle**: Production bots need rate limiting, state management, and graceful degradation—not just command handlers.

## Core Capabilities

### 1. Platform Expertise

| Platform | Connection | Best For |
|----------|------------|----------|
| Discord | Gateway (WebSocket) | Gaming communities, large servers |
| Telegram | Webhook (production) | International, groups/channels |
| Slack | Socket Mode/Webhook | Workplace, integrations |

### 2. Production Architecture
- Event-driven design with message broker (Redis Streams / RabbitMQ)
- Service layer separation (User, Moderation, Economy, Integration)
- PostgreSQL + Redis + S3 data layer
- Cog-based modular structure

### 3. State Management
- Finite state machines for multi-turn conversations
- Timeout handling (auto-reset after inactivity)
- Race condition prevention
- Context preservation across turns

### 4. Rate Limiting
- Distributed limiter with Redis backend
- Adaptive limiter responding to API headers
- Per-user, per-guild, and global buckets
- Graceful degradation with retry-after info

### 5. Moderation System
- Point-based escalation (configurable thresholds)
- Automatic decay over time
- Auto-mod rules (spam, caps, links, banned words)
- Fuzzy matching to catch bypass attempts (l33t speak)
- Audit logging for compliance

## Escalation Thresholds

| Points | Action |
|--------|--------|
| 0-2 | No action |
| 3-5 | Mute |
| 6-9 | Kick |
| 10-14 | Temp Ban |
| 15+ | Permanent Ban |

## Auto-Mod Rules

| Rule | Detection Method |
|------|-----------------|
| Spam | Message frequency per sliding window |
| Caps | Character ratio (>70% uppercase) |
| Links | URL regex + domain whitelist |
| Words | Dictionary + Levenshtein (85% threshold) |
| Mentions | @mention counting with variants |
| Invites | Discord invite regex + URL expansion |

## When to Use

**Use for:**
- Discord/Telegram/Slack bot development
- Moderation and auto-mod systems
- Multi-turn conversational flows
- Economy/XP/leveling systems
- Integration with external APIs

**Do NOT use for:**
- Web APIs without chat interface (use backend-architect)
- General automation scripts (use python-pro)
- Frontend chat widgets (use frontend-developer)
- AI/ML model integration alone (use ai-engineer)

## Anti-Patterns

### Anti-Pattern: Polling in Production
**What it looks like**: Using `bot.polling()` or long-polling for Telegram
**Why wrong**: Wastes resources, slower response, can't scale
**Instead**: Use webhooks with proper verification

### Anti-Pattern: No Rate Limiting
**What it looks like**: Sending API requests without throttling
**Why wrong**: Gets bot banned, triggers 429s, poor UX
**Instead**: Implement adaptive rate limiter respecting API headers

### Anti-Pattern: In-Memory State Only
**What it looks like**: Storing conversation state in Python dict
**Why wrong**: Lost on restart, can't scale to multiple instances
**Instead**: Redis for state, PostgreSQL for persistence

### Anti-Pattern: Blocking Event Handlers
**What it looks like**: Long-running operations in `on_message`
**Why wrong**: Blocks all other events, causes timeouts
**Instead**: Async tasks, message queue for heavy work

## Security Checklist

```
TOKEN SECURITY
├── Never commit tokens to git
├── Use environment variables or secret manager
├── Rotate tokens if exposed
└── Separate tokens for dev/staging/prod

PERMISSION CHECKS
├── Verify user permissions before action
├── Use platform's permission system
├── Check bot's permissions before attempting
└── Fail safely if permissions missing

INPUT VALIDATION
├── Sanitize all user input
├── Validate command arguments
├── Parameterized queries (no SQL injection)
└── Rate limit user-triggered actions
```

## Reference Files

- `references/architecture-patterns.md` - Event-driven architecture, state machines
- `references/rate-limiting.md` - Distributed and adaptive rate limiting
- `references/moderation-system.md` - Point-based moderation, auto-mod
- `references/platform-templates.md` - Discord.py, Telegram webhook templates, security

---

**Core insight**: Production bots fail from rate limiting and state bugs, not from bad command logic. Build infrastructure first.

**Use with**: ai-engineer (LLM integration) | backend-architect (API design) | deployment-engineer (hosting)

© curiositech · MIT · curiositech/some_claude_skills

Similar skills

All skills for Backend and APIs →

From the same set180

The whole set →
chatbot-analytics chatbot-analytics adds conversation monitoring and token usage tracking for AI chats while respecting HIPAA constraints. CX Codex +1 221installs technical-writer technical-writer structures developer docs, API references, ADRs, and runbooks using the Diátaxis framework with working code examples. CX Codex +1 221installs reactive-dashboard-performance reactive-dashboard-performance sets up React dashboard performance patterns and speeds up async test suites. Helps replace spinners with skeletons and resolve test runner timeouts. CX Codex +1 220installs devops-automator devops-automator — a skill that turns your AI coder into a DevOps engineer: designs pipelines, writes Terraform and Kubernetes configs, sets up GitOps. Use it when building infrastructure or automating deployments. CX Codex +1 219installs prompt-engineer prompt-engineer — a skill for crafting and debugging prompts. Eliminates hallucinations, improves response consistency, and strengthens agent instructions through systematic optimization techniques. CX Codex +1 217installs team-builder team-builder designs team structures using organizational psychology. When a required role is missing from the skill library, it writes a new skill right away. CX Codex +1 216installs react-performance-optimizer react-performance-optimizer diagnoses React render bottlenecks to hit 60fps. It tackles sluggish lists, unnecessary component updates, and oversized bundles. CX Codex +1 215installs digital-estate-planner digital-estate-planner — a skill for organizing digital life ahead of death, incapacity, or emergencies. It inventories accounts, documents passwords and crypto, and writes instructions for a digital executor. CX Codex +1 215installs

More in the catalog

Project sponsors

Companies that keep this analytics open