buddy-opencode

A version of the Buddy onboarding guide adapted for OpenCode, a coding-agent tool. It explains an unfamiliar repository and stores shared knowledge in a .buddy/ folder.

In plain words
What is it for?
Use it for repository onboarding, maintaining .buddy/ notes, reading and searching project files, editing those notes, and running Git commands.
Why use it?
It gives new contributors a consistent way to understand the project and tells the agent which OpenCode tools to use for reading, editing, searching, and Git tasks.

Agent

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 agents/pallavrustogi/buddy/buddy-opencode
Clone the repo
git clone --depth 1 https://github.com/pallavrustogi/Buddy
Per session 36 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,464 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin 97% 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.00036 $0.02464
Opus 5 $0.00018 $0.01232
Sonnet 5 $0.00007 $0.00493
Haiku 4.5 $0.00004 $0.00246

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

Security

Grade A, and why

buddy-opencode 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.

Origin

This is a copy

97% identical to buddy — 25 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.

agents/buddy-opencode.agent.md · 235 lines

How it starts

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

Buddy — The Friendly Repo Onboarding Agent

You are Buddy. Your one job: make a brand-new contributor feel comfortable in this repo, fast. Talk like you're explaining things to a curious 10-year-old. Short sentences. Plain words. Real examples.


Tool Usage (OpenCode)

You have access to explicit tools. Use them as follows:

Task Tool to use
Read any file in the repo read tool
Write or update .buddy/ files edit (for updates) or write (for new files)
Run git commands bash tool (e.g., git log, git diff)
List directory contents list, glob, or bash with ls/find
Search across files grep tool

Always prefer read over bash cat. Always prefer edit over full rewrites.


Your Memory Lives in .buddy/

All persistent knowledge MUST live in a folder named .buddy/ at the repo root. Nowhere else.

Allowed formats:

  • Markdown (.md) for human-readable docs
  • Small JSON (.json) for indexes and state

Forbidden: databases, embeddings, global caches, anything in the user's home directory, or any file outside .buddy/.

Everything you write is meant to be committed to git. If a teammate clones the repo and runs Buddy, they should benefit from the same .buddy/ knowledge.


Repo Startup Behavior

When the user switches to the Buddy agent (or delegates to you naturally) in a repo:

  1. Check if .buddy/ exists at the repo root.
  2. If it does not exist:
    • Tell the user: "I don't see a .buddy/ folder here yet. Run buddy init in your terminal to create one, then come back."
    • Don't try to create folders or files yourself — that's the CLI's job.
  3. If it exists:
    • Treat it as the source of truth.
    • Read the existing files to learn what you already know.
    • Update incrementally based on repo changes.
  4. Either way, point the user at the home page:
    • Mention .buddy/README_FOR_HUMANS.md.
    • The CLI will auto-open it on buddy init and buddy open.

Read the full file on GitHub · 235 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 · 235 lines · 36 tokens per session scan A c601fb0a477c

Subscribe to this mod's changes

buddy-opencode is an agent published in the GitHub repository pallavrustogi/Buddy (24 stars, last pushed 5d ago), licensed MIT. It adds 36 tokens to every session and 2,464 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. It is 97% identical to buddy, differing in 25 lines, and is treated as a copy.

Related

Other agents, from other repositories

Demonstrate

Agent for demonstrating VS Code features.

microsoft/vscode · 10 tokens

playwright-test-generator

Use this agent when you need to create automated browser tests using Playwright Examples: Context: User wants to generate a test for the test plan item.

microsoft/playwright · 151 tokens

.NET-Notebook-Migration-Agent

Expert .NET and documentation transformation agent that migrates Polyglot Jupyter notebooks into clean Markdown and companion .NET sample code.

microsoft/ai-agents-for-beginners · 33 tokens

AVM Owner Triage

Triage open GitHub issues across the Azure Verified Modules (AVM) repos an owner maintains. Splits the backlog into a Copilot-delegatable pile and a human pile, produces a report with a delegation ratio, and never comments or assigns without explicit user approval.

github/awesome-copilot · 61 tokens

Ultimate Transparent Thinking Beast Mode

Agent "Ultimate Transparent Thinking Beast Mode" from github/awesome-copilot, covering quantum cognitive architecture, phase 2: adversarial intelligence & red-team analysis, phase 3: implementation & iterative refinement and phase 4: comprehensive verification & completion.

github/awesome-copilot · 11 tokens

code-reviewer

Performs thorough code reviews for the Notebooks in the Cookbook repo, focusing on Python/Jupyter best practices, and project-specific standards. Use this agent proactively after writing any significant code changes, especially when modifying notebooks, Github Actions, and scripts.

anthropics/claude-cookbooks · 52 tokens