ai-observer CLAUDE.md

ai-observer CLAUDE.md is an instructions file for coding agents from tobilg/ai-observer. It costs 3,189 tokens per session, scanned B, original, MIT.

A project instruction document for AI Observer, a monitoring system that collects activity data from AI coding tools and displays it in a web dashboard.

In plain words
What is it for?
Use it when developing, testing, building, or running AI Observer's Go backend, React frontend, trace storage, or dashboard.
Why use it?
It gives agents the project overview and the commands needed to install dependencies, run the backend or frontend, build the system, and run tests.

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/tobilg/ai-observer/claude-md
Clone the repo
git clone --depth 1 https://github.com/tobilg/ai-observer

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 ai-observer CLAUDE.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/tobilg/ai-observer/claude-md.svg)](https://agentmods.dev/instructions/tobilg/ai-observer/claude-md)
Your own site
<a href="https://agentmods.dev/instructions/tobilg/ai-observer/claude-md"><img src="https://agentmods.dev/badge/instructions/tobilg/ai-observer/claude-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 3,189 This file is loaded in full into every session.
When invoked 3,189 The same file — it is already loaded in full.
Security scan B 1 finding. 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.03189 $0.03189
Opus 5 $0.01595 $0.01595
Sonnet 5 $0.00638 $0.00638
Haiku 4.5 $0.00319 $0.00319

Measured 4d ago against content hash e639fbbb70ea, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade B, and why

ai-observer CLAUDE.md scanned grade B with 1 finding 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.

Reads agent configuration directoriesmediumAgent snooping

.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.

# Gemini CLI - add to ~/.gemini/settings.json
CLAUDE.md · 303 lines

How it starts

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

CLAUDE.md

This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.

Project Overview

AI Observer is an OpenTelemetry-compatible observability backend designed for monitoring AI coding tools (Claude Code, OpenAI Codex CLI, Gemini CLI). It provides real-time ingestion of OTLP traces, metrics, and logs with a DuckDB-based storage layer and a React dashboard.

Build & Development Commands

# Setup
make setup              # Install all dependencies (go mod download + pnpm install)

# Development
make dev                # Run both backend and frontend in dev mode (parallel)
make backend-dev        # Run only backend (go run ./cmd/server)
make frontend-dev       # Run only frontend (pnpm dev at localhost:5173)

# Build
make all                # Build both backend and frontend
make backend            # Build backend binary to bin/ai-observer
make frontend           # Build frontend for production

# Testing
make test               # Run all tests
make backend-test       # Run Go tests: cd backend && go test -v ./...
make frontend-test      # Run frontend tests: cd frontend && pnpm test

# Run a single Go test
cd backend && go test -v -run TestFunctionName ./path/to/package

# Run a single frontend test
cd frontend && pnpm vitest run src/path/to/file.test.ts

# Linting
make lint               # Run all linters
make backend-lint       # Run golangci-lint
make frontend-lint      # Run ESLint

# Cleanup
make clean              # Remove bin/ and frontend/dist/

Architecture

Backend (Go)

The backend runs two HTTP servers simultaneously:

  1. OTLP Ingestion Server (port 4318) - Receives telemetry from AI tools

    • POST /v1/traces - Trace data (protobuf or JSON)
    • POST /v1/metrics - Metrics data
    • POST /v1/logs - Log data
    • Supports HTTP/1.1 + h2c (HTTP/2 cleartext), gzip-compressed payloads
    • Auto-detects JSON vs Protobuf format regardless of Content-Type header
  2. API/WebSocket Server (port 8080) - Serves dashboard and real-time updates

    • /api/traces, /api/metrics, /api/logs - Query endpoints
    • /api/services, /api/stats - Aggregations
    • /api/dashboards - Dashboard CRUD
    • /ws - WebSocket for real-time updates to frontend
    • Serves embedded React frontend at root

Read the full file on GitHub · 303 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 · 303 lines · 3,189 tokens per session scan B e639fbbb70ea

Subscribe to this mod's changes

ai-observer CLAUDE.md is an instructions file published in the GitHub repository tobilg/ai-observer (272 stars, last pushed 2mo ago), licensed MIT. It adds 3,189 tokens to every session, about $0.0159 per session on Opus 5. A static security scan graded it B with 1 finding (reads agent configuration directories). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.