dive CLAUDE.md

dive CLAUDE.md is an instructions file for coding agents from deepnoodle-ai/dive. It costs 1,916 tokens per session, scanned A, original, Apache-2.0.

A project guide for Dive, a Go library for building AI agents and connecting them to language-model providers. It explains the project overview, commands, architecture, and main types.

In plain words
What is it for?
Use it when working on Dive code, running its tests, building its optional command-line tool, or learning where agent, tool, session, and language-model behavior is defined.
Why use it?
It gives an unfamiliar contributor the context needed to understand how agents, tools, extensions, sessions, and model interfaces fit together.

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

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

README.md
[![agentmods](https://agentmods.dev/badge/instructions/deepnoodle-ai/dive/claude-md.svg)](https://agentmods.dev/instructions/deepnoodle-ai/dive/claude-md)
Your own site
<a href="https://agentmods.dev/instructions/deepnoodle-ai/dive/claude-md"><img src="https://agentmods.dev/badge/instructions/deepnoodle-ai/dive/claude-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 1,916 This file is loaded in full into every session.
When invoked 1,916 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.01916 $0.01916
Opus 5 $0.00958 $0.00958
Sonnet 5 $0.00383 $0.00383
Haiku 4.5 $0.00192 $0.00192

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

Security

Grade A, and why

dive 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 5d 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 · 93 lines

How it starts

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

CLAUDE.md

Project Overview

Dive is a Go library for building AI agents and integrating with leading LLMs. Library-first approach — the CLI in experimental/cmd/dive/ is secondary.

Commands

  • go test ./... — Run all tests
  • cd experimental/cmd/dive && go build — Build the CLI (optional)
  • Use github.com/deepnoodle-ai/wonton/assert for all tests

Architecture

Core Types

  • Agent (agent.go): Created via NewAgent(AgentOptions), returns *Agent. Manages tool execution and conversation.
  • Extension (agent.go): Extension interface (Tools, Hooks, Rules) for composable agent capabilities. Set on AgentOptions.Extensions. Extensions provide tools, hooks, and system prompt rules that are merged during NewAgent.
  • Session (dive.go): Session interface (ID, Messages, SaveTurn). Set on AgentOptions.Session or per-call via WithSession. The session package provides New() (in-memory) and store-backed implementations.
  • LLM (llm/llm.go): LLM and StreamingLLM interfaces abstract over providers.
  • Tool (tool.go): Tool and TypedTool[T] interfaces. FuncTool[T]() creates tools from functions with auto-generated schemas. Toolset interface provides dynamic tool resolution per LLM request. Tool panics are auto-recovered. All toolkit constructors return *dive.TypedToolAdapter[T] (satisfies dive.Tool).
  • Hooks (hooks.go): Hooks struct groups hook slices on AgentOptions. Hook types: SessionStartHook, PreGenerationHook, PostGenerationHook, PreToolUseHook, PostToolUseHook, PostToolUseFailureHook, StopHook, PreIterationHook, OnSuspendHook. All hooks receive *HookContext. PreToolUse hooks can set HookContext.UpdatedInput to rewrite the tool args. SessionStartHook fires once at the start of a fresh conversation (no prior messages, non-resume) and returns a *SessionStartResult to seed it (durable or ephemeral via Persist).
  • Tracer (tracer.go): Tracer interface for observation (tracing, metrics, audit logging). Three methods (StartAgentRun, StartChat, StartToolCall) return (ctx, span); the agent threads ctx through downstream calls so spans nest naturally. NopTracer (default) and MultiTracer live in core; the OpenTelemetry adapter is otel.NewTracer in the dive/otel module.
  • Suspend/Resume (tool.go, response.go, dive.go): A tool can pause the agent mid-turn by returning NewSuspendResult(prompt, metadata) or NewSuspendResultWithReason(prompt, reason, metadata) (sets ToolResult.Suspend). SuspendReason classifies why: SuspendReasonInput (default) or SuspendReasonAuth. CreateResponse returns (*Response, nil) with Status == ResponseStatusSuspended and Response.Suspension *SuspensionState. Resume via WithToolResults (session-backed) or WithResume(state, results) (stateless). SuspendableSession is an optional Session extension for auto-persistence with CancelSuspension(ctx) to abandon a suspended turn. OnSuspend hooks fire before persistence. See docs/guides/suspend-resume.md.

Read the full file on GitHub · 93 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. 5d ago First seen · 93 lines · 1,916 tokens per session scan A 4c597bff0109

Subscribe to this mod's changes

dive CLAUDE.md is an instructions file published in the GitHub repository deepnoodle-ai/dive (133 stars, last pushed yesterday), licensed Apache-2.0. It adds 1,916 tokens to every session, about $0.0096 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.

Related

Other instructions, from other repositories