rushindrasinha/ares-skills/twitch-ai-chatbot

Claude Code and agent skill by rushindrasinha/ares-skills

Trust tier 3
  • community
  • ext:[{"type":"config","description":"Configuration overrides"}]
Source check pending

Checking that the SKILL.md file is still in the repository.

Deploy an AI chatbot in a Twitch channel that responds to a configurable trigger word (e.g. !bot), engages viewers with AI replies, and requires no Twitch API key — uses pure WebSocket IRC.

Install

npx vskill@latest install rushindrasinha/ares-skills/twitch-ai-chatbot

Semi-extensibleMentions customization, but needs skill-specific knowledge. Read the extensible skills standard

SKILL.md

Overview

Connects to Twitch IRC via WebSocket and responds to a trigger word using an Anthropic model. No Twitch API key required for basic operation — only a bot account OAuth token.

Requirements: python3, aiohttp, websockets, Anthropic API key.


Setup

1. Create a bot Twitch account

Use a separate Twitch account for the bot. Get a chat OAuth token:

  1. Go to: https://twitchapps.com/tmi/
  2. Authorize with your bot account (not your main)
  3. Copy the oauth:XXXXXXXXXX token
2. Configure
bash
cd ~/ares-skills/twitch-ai-chatbot/scripts
cp config.example.json config.json

Edit config.json:

json
{
"channel": "yourchannelname",
"trigger_word": "!bot",
"bot_login": "your_bot_account",
"oauth_token": "oauth:XXXXXXXXXX",
"model": "claude-haiku-4-5",
"anthropic_api_key": "sk-ant-XXXXXXXX",
"system_prompt": "You are a helpful and fun AI chatbot in a Twitch chat. Keep responses short (under 150 chars), casual, and engaging. No offensive content.",
"cooldown_seconds": 30,
"max_messages_per_30s": 18,
"log_file": "chatbot.log",
"storage_dir": "./storage"
}

Key fields:

  • channel — Twitch channel to join (lowercase)
  • trigger_word — command viewers type to talk to the bot (e.g. !bot, !ai, !ask)
  • bot_login — Twitch username of the bot account
  • oauth_token — OAuth token from twitchapps.com/tmi (include the oauth: prefix)
  • model — Anthropic model ID. Recommended: claude-haiku-4-5 (fast + cheap)
  • system_prompt — customize the bot's personality and rules
  • cooldown_seconds — minimum seconds between bot responses (prevents spam)
3. Install dependencies
bash
pip3 install aiohttp websockets
4. Run
bash
python3 ~/ares-skills/twitch-ai-chatbot/scripts/chatbot.py

Or with a custom config path:

bash
python3 chatbot.py --config /path/to/config.json

Environment Variable Overrides

All key config values can be set via env vars (take precedence over config.json):

bash
export TWITCH_CHANNEL=yourchannelname
export TWITCH_LOGIN=your_bot_account
export TWITCH_OAUTH=oauth:XXXXXXXXXX
export TRIGGER_WORD=!bot
export AI_MODEL=claude-haiku-4-5
export ANTHROPIC_API_KEY=sk-ant-XXXXXXXX
export SYSTEM_PROMPT="You are a helpful bot..."
python3 chatbot.py

How It Works

  1. Bot connects to wss://irc-ws.chat.twitch.tv:443 — no API key needed
  2. Joins configured channel
  3. Watches all chat messages
  4. When a message starts with trigger_word: calls Anthropic API with last 10 chat messages as context
  5. Replies in chat: @username <AI response>
  6. Rate limiting: max 18 msgs/30s, configurable cooldown between responses
  7. Prompt injection sanitization built in
  8. Chat history persisted to JSONL at storage/chat_history.jsonl

Customizing the Bot

Change trigger word

Update trigger_word in config.json. Examples: !ai, !ask, !gpt, !help

Change personality

Update system_prompt. Example for a gaming bot:

You are an expert VALORANT coach in Twitch chat. Give quick tips and hype up plays. Max 150 chars per reply.
Change model
  • Fast/cheap: claude-haiku-4-5
  • Smarter: claude-sonnet-4-5
  • Avoid models with thinking tokens (slow, unpredictable output length)

Running as a Background Service

tmux
bash
tmux new-session -d -s twitch-bot 'python3 ~/ares-skills/twitch-ai-chatbot/scripts/chatbot.py'
launchd (macOS)

Create ~/Library/LaunchAgents/com.twitch-ai-chatbot.plist with appropriate configuration and launchctl load it.


Troubleshooting

Bot connects but doesn't respond: Check trigger_word matches exactly. Verify bot account is in the channel (it joins automatically on connect).

Authentication failed: Regenerate OAuth token at twitchapps.com/tmi. Tokens expire.

Rate limited by Twitch: Increase cooldown_seconds. Default 30s is safe for most use.

AI replies are too long: Add "Max 150 characters" to your system_prompt.

<!-- A·R·E·S 🛡️ | Mumbai | 2026-04-05 | github.com/rushindrasinha -->

Security

  • Security scanPassed, 90 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

7-day trend score
0

Not refreshed yet.

Extension points

  • configConfiguration overrides

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/rushindrasinha/ares-skills/twitch-ai-chatbot/badge)](https://verified-skill.com/skills/rushindrasinha/ares-skills/twitch-ai-chatbot)

Something wrong with this skill or its page? Tell us.