btrace: Instructions file for GitHub Copilot

.github/copilot-instructions.md

btrace copilot-instructions.md is an instructions file for GitHub Copilot from btraceio/btrace. It costs 1,098 tokens per session, scanned A, original, Apache-2.0.

Repository instructions for BTrace, a Java tool that adds tracing code to running Java applications without restarting them. They describe its Gradle multi-module structure, components, and development rules.

In plain words
What is it for?
Use them to locate the Java agent, compiler, runtime, command-line tools, tests, documentation, and service integrations while developing BTrace.
Why use it?
They give an agent the architecture and version details needed to change the correct module and avoid breaking the build or runtime tracing system.

Instructions file for GitHub Copilot

Written for GitHub Copilot: a Copilot instructions file. Also seen: mentions AGENTS.md.

This is btraceio/btrace's own configuration. It tells GitHub Copilot 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/.github/copilot-instructions.md
Clone the repo
git clone --depth 1 https://github.com/btraceio/btrace

Made for: GitHub Copilot.

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 copilot-instructions.md

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

Your own site · 80×15
<a href="https://agentmods.dev/instructions/btraceio/btrace/copilot-instructions"><img src="https://agentmods.dev/badge/instructions/btraceio/btrace/copilot-instructions.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 1,098 This file is loaded in full into every session.
When invoked 1,098 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.01098 $0.01098
Opus 5.5 $0.00439 $0.00439
Sonnet 5.5 $0.00220 $0.00220
Haiku 4.5 $0.00110 $0.00110

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

Security

Grade A, and why

btrace copilot-instructions.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.

.github/copilot-instructions.md · 126 lines

How it starts

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

GitHub Copilot Instructions for BTrace

About BTrace

BTrace is a safe, dynamic tracing tool for the Java platform. It dynamically instruments running Java applications to inject tracing code at runtime using bytecode instrumentation.

Project Structure

  • Gradle multi-module project with modules named btrace-*
  • Core modules: btrace-core, btrace-agent, btrace-runtime, btrace-client, btrace-instr
  • Build artifacts: btrace-dist for distributions
  • Tests: integration-tests/ for integration tests, src/test/java in modules for unit tests
  • Documentation: docs/ directory

Architecture Overview

  • btrace-agent: Attachable Java agent with class transformer, manages script lifecycle
  • btrace-compiler: Verifies and compiles BTrace scripts to bytecode
  • btrace-instr: ASM-based instrumentation and weaving utilities
  • btrace-runtime: APIs for scripts (printing, timers, data collection)
  • btrace-client: CLI/attach tooling for sending scripts to target JVM
  • services: SPI for pluggable exporters (e.g., statsd)

Development Guidelines

Language & Versions

  • Language: Java
  • Source/Target: Java 8
  • Build toolchain: JDK 11
  • Test framework: JUnit Jupiter (JUnit 5)

Code Style

  • Format: Google Java Format enforced via Spotless
  • Packages: All under io.btrace.*
  • Naming: Module names follow btrace-<component> pattern
  • Imports: Order enforced; remove unused imports
  • Comments: Only add if they match existing style or explain complex logic

Building & Testing

# Full build with unit tests
./gradlew build

# Build distribution only
./gradlew :btrace-dist:build

# Run unit tests
./gradlew test

# Run integration tests (requires dist build first)
./gradlew -Pintegration test

# Format code
./gradlew spotlessApply

# Check formatting
./gradlew spotlessCheck

Important Environment Variables

  • JAVA_HOME: Required for builds
  • TEST_JAVA_HOME: Required for integration tests (typically JDK 11)
  • BTRACE_TEST_DEBUG=true: Enable verbose integration test output
  • BTRACE_HOME: Optional, points to exploded dist

Read the full file on GitHub · 126 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 · 126 lines · 1,098 tokens per session scan A ec3b5fa1b3d5

Subscribe to this mod's changes

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