pbf AGENTS.md

A repository guide for developers and coding agents working on pbf, a Go library and command-line tool for encoding and decoding Protocol Buffers, a data format for structured messages. It lists required documents, supported environments, working rules, and verification commands.

In plain words
What is it for?
Checking required files before editing, keeping Go changes focused, writing table-driven tests, and running formatting, tests, race checks, integration tests, linting, or full verification.
Why use it?
It prevents changes that conflict with the project's standards, public behavior, supported systems, or required checks.

Instructions file for CodexOpenCode

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/maguro/pbf/agents-md
Clone the repo
git clone --depth 1 https://github.com/maguro/pbf

Made for: Codex, OpenCode.

Per session 462 This file is loaded in full into every session.
When invoked 462 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.00462 $0.00462
Opus 5 $0.00231 $0.00231
Sonnet 5 $0.00092 $0.00092
Haiku 4.5 $0.00046 $0.00046

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

Security

Grade A, and why

pbf 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 2d 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 · 52 lines

How it starts

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

AGENTS.md

Required Reads

  • Before making any code or test edits, read CODING_STANDARDS.md.
  • If AGENTS.md and CODING_STANDARDS.md differ, follow the stricter rule.

Project Overview

  • Language: Go
  • Module: m4o.io/pbf/v2
  • Primary goals: stable PBF encoder/decoder library and pbf CLI

Environment

  • Preferred Go version: 1.23.x (see go.mod toolchain)
  • OS support: macOS, Linux, Windows

Working Agreement

  • Keep edits minimal and targeted to the task.
  • Preserve public API behavior unless change is explicitly requested.
  • Prefer table-driven tests for new behavior.
  • Avoid introducing new dependencies without clear need.

Analysis Depth

  • When collaboration level is High or Extra High, perform deep analysis before editing.
  • Do not stop at first-order reasoning; check invariants, race/close paths, and edge cases.
  • State assumptions explicitly and verify them against code before implementation.

Fast Start

  • Format: make fmt
  • Unit tests: make test
  • Race tests: make test-race
  • Integration tests: make test-integration
  • Lint: make lint
  • Full local CI parity: make verify

Code Style

  • Follow standard gofmt formatting.
  • Keep package boundaries explicit (internal/ remains non-public).
  • Return wrapped errors when adding new error paths (fmt.Errorf("...: %w", err)).

Validation Before Merge

  • Run make verify.
  • If behavior changes, add or update tests in the same change.
  • Keep README/docs in sync with user-facing CLI/library changes.

Execution Defaults

  • Make one focused change at a time and stop for review.
  • Do not bundle unrelated edits in a single change.
  • Do not use staging/cherry-pick style split workflows unless explicitly requested.
  • Preserve behavior unless an explicit behavior change is approved.
  • For concurrent close/error paths, default to first-wins semantics unless explicitly changed.
  • When refactoring a proposed solution, re-scan pending changes and remove code that is no longer relevant.

Read the full file on GitHub · 52 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. 2d ago First seen · 52 lines · 462 tokens per session scan A 308d0ea92c74

Subscribe to this mod's changes

pbf AGENTS.md is an instructions file published in the GitHub repository maguro/pbf (56 stars, last pushed 4mo ago), licensed Apache-2.0. It adds 462 tokens to every session, about $0.0023 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.