opencode-primer: Instructions file for Codex

AGENTS.md

opencode-primer AGENTS.md is an instructions file for Codex, OpenCode from wesammustafa/opencode-primer. It costs 1,646 tokens per session, scanned A, original, MIT.

A documentation repository that teaches developers how to use OpenCode, an AI coding tool, with prompts, configuration examples, integrations, and practical workflows.

In plain words
What is it for?
Learning about OpenCode's terminal interface, custom agents, commands, skills, plugins, MCP integrations, and workflow configuration.
Why use it?
It organizes setup guidance and examples so users can configure OpenCode without guessing how its features fit together.

Instructions file for CodexOpenCode

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

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

Reuse

Borrowing it

Nothing to install: this file belongs to wesammustafa/opencode-primer. 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/wesammustafa/opencode-primer/main/AGENTS.md
Clone the repo
git clone --depth 1 https://github.com/wesammustafa/opencode-primer

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 opencode-primer AGENTS.md

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

Your own site · 80×15
<a href="https://agentmods.dev/instructions/wesammustafa/opencode-primer/agents-md"><img src="https://agentmods.dev/badge/instructions/wesammustafa/opencode-primer/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 1,646 This file is loaded in full into every session.
When invoked 1,646 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.01646 $0.01646
Opus 5.5 $0.00658 $0.00658
Sonnet 5.5 $0.00329 $0.00329
Haiku 4.5 $0.00165 $0.00165

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

Security

Grade A, and why

opencode-primer 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 1mo 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 · 131 lines

How it starts

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

AGENTS.md

Project instructions for OpenCode. Read every session.

What this repo is

A practical, opinionated guide to using OpenCode — README, supporting docs, drop-in agent prompts, MCP walkthroughs, and a worked example of a fully-configured .opencode/ directory. It's a documentation repository, not application code.

Repo layout

.
├── README.md                       # Main guide (the centerpiece)
├── AGENTS.md                       # This file
├── CONTRIBUTING.md                 # How to contribute
├── SECURITY.md · CODE_OF_CONDUCT.md
├── LICENSE                         # MIT
├── opencode.json · tui.json        # Example configs with safe defaults
├── docs/
│   ├── quickstart.md               # 5-minute getting-started
│   ├── zen.md                      # Zen model gateway details
│   ├── tui.md                      # TUI mastery
│   ├── agents.md                   # Custom agent deep dive
│   ├── commands.md                 # Custom slash commands
│   ├── skills.md                   # Agent skills
│   ├── plugins.md                  # Plugin/hook system
│   ├── mcp.md                      # MCP integration
│   ├── workflows.md                # Real-world recipes
│   ├── migration.md                # Migration from Claude Code / Cursor
│   └── reference/
│       ├── cli.md                  # All CLI commands
│       ├── slash-commands.md       # All TUI slash commands
│       ├── permissions.md          # Permission model
│       ├── changelog.md            # OpenCode releases
│       ├── faq.md                  # FAQ + troubleshooting
│       └── further-reading.md      # External resources
├── .opencode/
│   ├── agents/                     # Example custom agents
│   ├── commands/                   # Example custom commands
│   ├── plugins/                    # Example plugins (audit log, secret blocker)
│   └── skills/                     # Example agent skills
├── .github/                        # CI (lint-docs.yml), issue/PR templates
├── mcp-servers/                    # MCP server walkthroughs
├── specialized-agents/             # Drop-in specialist prompts
│   ├── system-prompts/             # System prompts (7 roles)
│   └── descriptions/               # Role descriptions
└── Images/                         # Banner, diagrams, screenshots

Read the full file on GitHub · 131 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. 1mo ago First seen · 131 lines · 1,646 tokens per session scan A 45b9d91cdc27

Subscribe to this mod's changes

opencode-primer AGENTS.md is an instructions file published in the GitHub repository wesammustafa/opencode-primer (403 stars, last pushed 3mo ago), licensed MIT. It adds 1,646 tokens to every session, about $0.0066 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

Other instructions, from other repositories