opm AGENTS.md

opm AGENTS.md is an instructions file for Codex, OpenCode from tbcrawford/opm. It costs 1,573 tokens per session, scanned A, original, MIT.

Project instructions for opm, a Go command-line tool that switches between separate OpenCode configuration profiles. A profile can contain different tools, agents, models, and instructions.

In plain words
What is it for?
Use it when developing or changing commands for creating, switching, listing, inspecting, copying, renaming, removing, or resetting profiles.
Why use it?
It defines the commands and conventions needed to manage isolated OpenCode setups without manually changing configuration files.

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

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

README.md
[![agentmods](https://agentmods.dev/badge/instructions/tbcrawford/opm/agents-md.svg)](https://agentmods.dev/instructions/tbcrawford/opm/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/tbcrawford/opm/agents-md"><img src="https://agentmods.dev/badge/instructions/tbcrawford/opm/agents-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 1,573 This file is loaded in full into every session.
When invoked 1,573 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.01573 $0.01573
Opus 5 $0.00787 $0.00787
Sonnet 5 $0.00315 $0.00315
Haiku 4.5 $0.00157 $0.00157

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

Security

Grade A, and why

opm 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 3d 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 · 142 lines

How it starts

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

Project

opm — OpenCode Profile Manager

A Go CLI tool that manages multiple OpenCode configurations by symlinking ~/.config/opencode to named profile directories. Users switch between completely isolated OpenCode environments (different MCPs, plugins, agents, models, AGENTS.md) with a single command.

Core Value: Switching OpenCode profiles should be one command — opm use <name> — and take effect after reloading OpenCode.

Command API

All subcommands are flat (no context grouping):

Command Description
opm init Initialize opm and migrate existing OpenCode config
opm use <name> Switch to a profile
opm create <name> Create a new profile
opm list List all profiles
opm show Print the name of the currently active profile
opm inspect <name> Show detailed information about a profile
opm rename <old> <new> Rename a profile
opm copy <src> <dst> Copy a profile to a new name
opm remove <name> [name...] Remove one or more profiles
opm path <name> Print the filesystem path to a profile directory
opm reset Restore ~/.config/opencode to a plain directory
opm doctor Check opm installation health

Constraints

  • Language: Go — single binary, fast, no runtime dependencies
  • Mechanism: Directory-level symlink (~/.config/opencode → profile dir), not file-level
  • UX: Flat subcommand surface (not docker context-style grouping)
  • Compatibility: Must not break existing OpenCode setup — opm init migrates current config non-destructively

Technology Stack

Layer Choice
CLI framework github.com/spf13/cobra v1.10.2
Output color github.com/fatih/color v1.19.0
Test assertions github.com/stretchr/testify v1.10.0
Release GoReleaser v2 (just release / just snapshot)
Linting golangci-lint v2.x

Read the full file on GitHub · 142 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. 3d ago First seen · 142 lines · 1,573 tokens per session scan A 62d94d8c735e

Subscribe to this mod's changes

opm AGENTS.md is an instructions file published in the GitHub repository tbcrawford/opm (11 stars, last pushed 1mo ago), licensed MIT. It adds 1,573 tokens to every session, about $0.0079 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.