jdbg CLAUDE.md

jdbg CLAUDE.md is an instructions file for coding agents from PieceOfFall/jdbg. It costs 3,929 tokens per session, scanned B, a copy of jdbg AGENTS.md, Apache-2.0.

Repository instructions for jdbg, a Rust command-line tool and MCP server for interactively debugging Java programs.

In plain words
What is it for?
Use them when working on jdbg, including its Java debugging backends, background sessions, command-line interface, or MCP server.
Why use it?
They give coding agents the project's architecture, constraints, and rules so changes do not violate established design decisions.

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/pieceoffall/jdbg/claude-md
Clone the repo
git clone --depth 1 https://github.com/PieceOfFall/jdbg

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

README.md
[![agentmods](https://agentmods.dev/badge/instructions/pieceoffall/jdbg/claude-md.svg)](https://agentmods.dev/instructions/pieceoffall/jdbg/claude-md)
Your own site
<a href="https://agentmods.dev/instructions/pieceoffall/jdbg/claude-md"><img src="https://agentmods.dev/badge/instructions/pieceoffall/jdbg/claude-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 3,929 This file is loaded in full into every session.
When invoked 3,929 The same file — it is already loaded in full.
Security scan B 1 finding. Scan, not verified.
Origin 94% copy Near-identical to another mod 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.03929 $0.03929
Opus 5 $0.01965 $0.01965
Sonnet 5 $0.00786 $0.00786
Haiku 4.5 $0.00393 $0.00393

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

Security

Grade B, and why

jdbg 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 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.

Reads agent configuration directoriesmediumAgent snooping

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

`~/.claude/settings.json`, and the embedded MCP skill to `~/.claude/skills/jdbg/SKILL.md`.
Origin

This is a copy

94% identical to jdbg AGENTS.md — 30 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

CLAUDE.md · 203 lines

How it starts

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

CLAUDE.md — java-agent-debugger (jdbg)

Coding charter for AI agents working in this repo. Rules and constraints only. For architecture, module layout, command/tool surface, output schema, dependencies, and status, read DESIGN.md (the factual design-and-implementation reference). This file does NOT duplicate it.

What this project is (one paragraph)

jdbg is a cross-platform Rust CLI (binary jdbg, crate java-agent-debugger, edition 2024) that lets an AI agent debug Java interactively through the JDK's jdb compatibility backend plus an optional Java JDI sidecar backend — prompt-aware (never sleep-based), stateful (a background daemon keeps sessions alive across calls), Windows-first. It is consumed two ways: the CLI and an MCP server (jdbg __mcp, native tool calls for Claude Code, Codex, and OpenCode). Full detail in DESIGN.md.

Binding constraints (do not violate without asking)

These are settled decisions. Changing them needs explicit user sign-off.

  • Keep blocking boundaries where they are settled. The existing jdb engine, daemon registry, daemon IPC, and per-session command locking remain std::thread + channels + blocking IO unless explicitly redesigned. tokio is allowed for rmcp MCP serving and the JDI sidecar transport/lifecycle subsystem.
  • No temp files, no shell, no sleeps. Commands are written straight to jdb's stdin. Readiness is detected by reading until the prompt, never by sleeping. There is no shell involved anywhere (no injection surface).
  • Minimal dependencies. Do not add a crate when std suffices. rmcp is allowed only for MCP protocol/tool serving, not daemon IPC or debugger backend RPC. Deliberately excluded: once_cell, nix, daemonize, portable-pty/conpty, any broad TCP/RPC framework, any windows/winapi crate (use std raw FFI for the few Win32 calls). Use std::sync::LazyLock for one-time regex compilation and std::os::* for platform bits.
  • Keep Java sidecar dependencies isolated. Java-only expression/evaluation dependencies belong in sidecar/jdi and are packaged into the Gradle fat jar jdbg-jdi-sidecar.jar. Do not add a Rust RPC framework or Rust JDWP stack for sidecar work unless the user explicitly approves that redesign.
  • One daemon per user; one in-flight command per session. The per-session command Mutex is held across write+wait — jdb is line-oriented and cannot interleave commands. Different sessions run in parallel.
  • The daemon is the single writer of the on-disk registry (atomic temp-in-same-dir + rename). The CLI only reads it (offline fallback). The in-memory session map is the source of truth while the daemon is alive.
  • Keep modules small and single-purpose. If a file grows large it is doing too much — split it.
  • Use English for code comments and commit messages. Source/test comments, Rustdoc, git commit messages, and PR/review comments written for the project history should be in English.

Read the full file on GitHub · 203 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 · 203 lines · 3,929 tokens per session scan B d60ed39b5375

Subscribe to this mod's changes

jdbg CLAUDE.md is an instructions file published in the GitHub repository PieceOfFall/jdbg (11 stars, last pushed 1mo ago), licensed Apache-2.0. It adds 3,929 tokens to every session, about $0.0196 per session on Opus 5. A static security scan graded it B with 1 finding (reads agent configuration directories). It is 94% identical to jdbg AGENTS.md, differing in 30 lines, and is treated as a copy.