opm: Instructions file for Codex

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

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

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

Reuse

Borrowing it

Nothing to install: this file belongs to tbcrawford/opm. 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/tbcrawford/opm/main/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/github.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/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 opm AGENTS.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/tbcrawford/opm/agents-md"><img src="https://agentmods.dev/badge/instructions/tbcrawford/opm/agents-md.svg" alt="Reviewed on agentmods" width="80" 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. 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.01573 $0.01573
Opus 5.5 $0.00629 $0.00629
Sonnet 5.5 $0.00315 $0.00315
Haiku 4.5 $0.00157 $0.00157

Measured 2mo ago against content hash 62d94d8c735e, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 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 · 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. 2mo 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 3mo ago), licensed MIT. It adds 1,573 tokens to every session, about $0.0063 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.

Related

opm AGENTS.md compared with instructions from other repositories

opm AGENTS.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
opm AGENTS.mdtbcrawford/opmInstructions file113mo agoMITA1,573Codex, OpenCode
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA9,719GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file143kyesterdayMITA7,461Codex, OpenCode
langchain AGENTS.mdlangchain-ai/langchainInstructions file149kyesterdayMITA4,680Codex, OpenCode
vscode oss-third-party-notices.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA5,516GitHub Copilot
vscode copilot-instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA3,093GitHub Copilot
deepseek-harness AGENTS.mddeepseek-ai/deepseek-harnessInstructions file274k2d agoMITA4,313Codex, OpenCode