bobby CLAUDE.md

bobby CLAUDE.md is an instructions file for coding agents 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

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add instructions/stewart86/bobby/claude-md
Clone the repo
git clone --depth 1 https://github.com/Stewart86/bobby

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.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.svg" alt="Measured on agentmods" 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. Scan, not verified.
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 $0.01487 $0.01487
Opus 5 $0.00744 $0.00744
Sonnet 5 $0.00297 $0.00297
Haiku 4.5 $0.00149 $0.00149

Measured 4d ago against content hash 781418979e93, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, 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 4d 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. 4d 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.0074 per session on Opus 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.