bobby: Instructions file for Claude Code

CLAUDE.md

bobby CLAUDE.md is an instructions file for Claude Code from Stewart86/bobby. It costs 1,487 tokens per session, scanned A, original, MIT.

Project instructions for Bobby, a self-hosted Discord chatbot that answers codebase questions, reports bugs, and turns business requests into technical requirements.

In plain words
What is it for?
Use them when developing or operating Bobby, including its Discord integration, code analysis, GitHub issue creation, and container deployment.
Why use it?
They document Bobby's architecture, required environment variables, services, and Docker setup so changes can follow the project's expected structure.

Instructions file for Claude Code

Written for Claude Code: the file is CLAUDE.md. Also seen: mentions CLAUDE.md; mentions Claude Code.

This is Stewart86/bobby's own configuration. It tells Claude Code how to work on bobby 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 bobby configures →

Reuse

Borrowing it

Nothing to install: this file belongs to Stewart86/bobby. 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/Stewart86/bobby/main/CLAUDE.md
Clone the repo
git clone --depth 1 https://github.com/Stewart86/bobby

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 bobby CLAUDE.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/stewart86/bobby/claude-md/github.svg)](https://agentmods.dev/instructions/stewart86/bobby/claude-md)
Your own site
<a href="https://agentmods.dev/instructions/stewart86/bobby/claude-md"><img src="https://agentmods.dev/badge/instructions/stewart86/bobby/claude-md/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for bobby CLAUDE.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/stewart86/bobby/claude-md"><img src="https://agentmods.dev/badge/instructions/stewart86/bobby/claude-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 1,487 This file is loaded in full into every session.
When invoked 1,487 The same file — it is already loaded in full.
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.01487 $0.01487
Opus 5.5 $0.00595 $0.00595
Sonnet 5.5 $0.00297 $0.00297
Haiku 4.5 $0.00149 $0.00149

Measured 2mo ago against content hash 781418979e93, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

bobby CLAUDE.md 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 2mo 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.md · 166 lines

How it starts

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

Bobby - Discord AI Assistant Bot

Overview

Bobby is a Discord chatbot that helps answer questions about your codebase, file bugs, and translate business requirements into technical requirements. Bobby leverages Claude Code to understand your codebase and provide intelligent responses in a self-hosted, privacy-first environment.

Core Architecture

Main Components

  • index.js - Main Node.js application using Bun runtime
  • Discord.js - Handles Discord bot interactions and thread management
  • Claude Code CLI - Powers AI analysis of codebases with streaming responses
  • GitHub CLI - Creates issues automatically when bugs are detected
  • Docker Container - Self-contained environment with all dependencies

Environment Variables Required

DISCORD_TOKEN=your_discord_bot_token
ANTHROPIC_API_KEY=your_anthropic_api_key  
GH_TOKEN=your_github_personal_access_token
GITHUB_REPO=owner/repo-name
ALLOWED_DISCORD_SERVERS=server_id1,server_id2 (optional)

Docker Architecture

  • Base Image: oven/bun:latest
  • Dependencies: Git, GitHub CLI v2.61.0, Claude Code CLI
  • Working Directory: /app
  • Repository Clone: /app/repo (target repository)
  • Data Storage: /app/data (Claude Code sessions and configs)
  • Entrypoint: entrypoint.sh (handles authentication and setup)

Thread-Based Session Management

Bobby uses Discord threads for session management with streaming responses:

  1. New Conversations: Mention Bobby in any channel to create a new thread with a new Claude Code session
  2. Follow-ups: Simply type in the thread (no need to mention Bobby) to continue the same Claude Code session
  3. Thread Naming: Threads are automatically named as Bobby - Title - session-id where:
    • Title is a 3-5 word summary generated by Claude (hidden from user via regex)
    • session-id is the Claude Code session identifier
  4. Streaming Responses: Real-time message streaming with JSON parsing
  5. Auto-Archive: Threads automatically archive after 24 hours of inactivity

Read the full file on GitHub · 166 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. 2mo ago First seen · 166 lines · 1,487 tokens per session scan A 781418979e93

Subscribe to this mod's changes

bobby CLAUDE.md is an instructions file published in the GitHub repository Stewart86/bobby (11 stars, last pushed 1y ago), licensed MIT. It adds 1,487 tokens to every session, about $0.0059 per session on Opus 5.5. 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-30.

Related

bobby CLAUDE.md compared with instructions from other repositories

bobby CLAUDE.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
bobby CLAUDE.mdStewart86/bobbyInstructions file111y agoMITA1,487Claude Code
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA9,719GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file143kyesterdayMITA7,461Codex, OpenCode
langchain AGENTS.mdlangchain-ai/langchainInstructions file149ktodayMITA4,680Codex, OpenCode
vscode oss-third-party-notices.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA5,516GitHub Copilot
vscode copilot-instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA3,093GitHub Copilot
deepseek-harness AGENTS.mddeepseek-ai/deepseek-harnessInstructions file275k2d agoMITA4,313Codex, OpenCode