btrace: Instructions file for Codex

AGENTS.md

btrace AGENTS.md is an instructions file for Codex, OpenCode from btraceio/btrace. It costs 890 tokens per session, scanned A, original, Apache-2.0.

A set of instructions for coding agents working on BTrace, a Java tracing tool that observes running Java programs. It explains the project's multi-module Gradle structure, where Gradle is the build system.

In plain words
What is it for?
Use it when changing BTrace code, tests, build files, documentation, or distribution components. It helps agents find the relevant module and follow the project's Java and testing conventions.
Why use it?
It gives agents the repository context, coding rules, and verification requirements needed to make appropriate changes.

Instructions file for CodexOpenCode

Written for Codex and OpenCode: the file is AGENTS.md. Also seen: mentions CLAUDE.md.

This is btraceio/btrace's own configuration. It tells Codex and OpenCode how to work on btrace 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 btrace configures →

About the project

BTrace is a Java diagnostic tool that dynamically inserts tracing into running Java applications without restarting or recompiling them. Java developers and operations teams use it to inspect methods, timings, fields, allocations, and other runtime behavior in production environments. Catalogue add-ons provide instructions for using BTrace.

btraceio/btrace · 5,997 stars · on GitHub

Reuse

Borrowing it

Nothing to install: this file belongs to btraceio/btrace. 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/btraceio/btrace/develop/AGENTS.md
Clone the repo
git clone --depth 1 https://github.com/btraceio/btrace

Made for: Codex, OpenCode.

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 btrace AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/btraceio/btrace/agents-md/github.svg)](https://agentmods.dev/instructions/btraceio/btrace/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/btraceio/btrace/agents-md"><img src="https://agentmods.dev/badge/instructions/btraceio/btrace/agents-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 btrace AGENTS.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/btraceio/btrace/agents-md"><img src="https://agentmods.dev/badge/instructions/btraceio/btrace/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 890 This file is loaded in full into every session.
When invoked 890 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.00890 $0.00890
Opus 5.5 $0.00356 $0.00356
Sonnet 5.5 $0.00178 $0.00178
Haiku 4.5 $0.00089 $0.00089

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

Security

Grade A, and why

btrace AGENTS.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.

AGENTS.md · 66 lines

How it starts

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

Repository Guide for Coding Agents

Start here

BTrace is a Java tracing tool: the client compiles and sends a script, the agent instruments the target JVM, and the runtime emits results. The root project is a multi-module Gradle build.

  • btrace-agent — attachable agent, script lifecycle, and bytecode instrumentation/weaving
  • btrace-compiler — script verification and compilation
  • btrace-runtime / btrace-core — script APIs, runtime support, and protocol
  • btrace-client — CLI and attachment client
  • btrace-dist — distribution assembly; integration-tests — end-to-end tests
  • btrace-extensions/* — extension API and implementations

For the developer command reference and code-navigation pointers, see CLAUDE.md. For user and contributor documentation, start at docs/README.md.

Non-negotiable rules

  • Do not commit unless the changes are fully tested or the user explicitly requests a commit.
  • Preserve unrelated working-tree changes.
  • In Java code, import types and use simple names; do not introduce fully qualified type names in source.
  • Main code targets Java 8 and uses the Java 11 toolchain. Follow Spotless/Google Java Format.
  • Unit tests live in src/test/java and use *Test; integration tests live in integration-tests/src/test/java.
  • Changes to user-visible behavior that crosses modules or process boundaries must include end-to-end functional coverage in integration-tests; unit and component tests are required where useful but are not a substitute for exercising the real client, agent, target JVM, and protocol interaction.
  • Confirm that a new test or build gate fails when it should, not only that it passes. Run it against the unfixed code, or against input it must reject, and check the failure is the expected one. A check that cannot fail reports success regardless of what the code does, and reads as coverage while providing none. Where a revert is used to produce the failure, revert only the code under test: reverting too much fails for an unrelated reason and proves nothing about the behavior being asserted.

Read the full file on GitHub · 66 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 · 66 lines · 890 tokens per session scan A 1bb964182dd8

Subscribe to this mod's changes

btrace AGENTS.md is an instructions file published in the GitHub repository btraceio/btrace (5,997 stars, last pushed yesterday), licensed Apache-2.0. It adds 890 tokens to every session, about $0.0036 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.