templates: Instructions file for Codex

AGENTS.md

templates AGENTS.md is an instructions file for Codex, OpenCode from solana-foundation/templates. It costs 474 tokens per session, scanned A, original, MIT.

Repository instructions that explain how coding agents should work in the solana-foundation/templates project. They cover project context, commands, editing rules, and checks.

In plain words
What is it for?
Use them when changing templates or related scripts: read the required documentation, keep edits focused, regenerate metadata when needed, and run the project’s install, generation, lint, and formatting commands.
Why use it?
They reduce accidental changes to generated files and clarify how to validate template updates safely.

Instructions file for CodexOpenCode

Written for Codex and OpenCode: the file is AGENTS.md.

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

Reuse

Borrowing it

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

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

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

Your own site · 80×15
<a href="https://agentmods.dev/instructions/solana-foundation/templates/agents-md"><img src="https://agentmods.dev/badge/instructions/solana-foundation/templates/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 474 This file is loaded in full into every session.
When invoked 474 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.00474 $0.00474
Opus 5.5 $0.00190 $0.00190
Sonnet 5.5 $0.00095 $0.00095
Haiku 4.5 $0.00047 $0.00047

Measured 28d ago against content hash d7b25f3209a3, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

templates 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 28d 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 · 41 lines

How it starts

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

Agent Instructions

This file gives AI coding agents the minimum context needed to work safely in this repository. It applies to the whole repo.

Start Here

  • Read README.md, CONTRIBUTING.md, and COMMUNITY_TEMPLATE_GUIDE.md before changing template behavior.
  • Use the focused notes in docs/agents/ for repo map, template metadata, validation, and review checks.
  • Keep changes small and local to the affected template or script.
  • Do not overwrite user work or generated files by hand.

Common Commands

  • pnpm install installs root tooling.
  • pnpm generate regenerates template metadata and docs.
  • pnpm lint validates template structure, metadata, Open Graph images, and formatting.
  • pnpm format formats repo files.
  • pnpm health runs the templates health check (install + build + deps/audit/deprecation/doc-drift). See docs/agents/health-check.md.
  • pnpm health:test runs the health check's own unit tests.

Editing Rules

  • Read docs/agents/repository-map.md before assuming current directory layout.
  • Do not manually edit generated files unless you are updating the generator and intentionally checking output.
  • If you change a template package.json, add/remove a template, or change metadata, run pnpm generate.
  • Every template directory listed in root package.json repokit.groups must contain a package.json and og-image.png.
  • Never add secrets, private keys, personal wallet data, local RPC credentials, or real API tokens.
  • Keep .env files out of templates. Use .env.example when configuration is needed, with placeholders for sensitive values and safe defaults for non-sensitive values.
  • For agent, MCP, wallet, or transaction automation templates, document authentication, permissions, and user approval boundaries clearly.

More Detail

  • docs/agents/repository-map.md
  • docs/agents/template-authoring.md
  • docs/agents/template-metadata.md
  • docs/agents/testing-and-ci.md
  • docs/agents/review-checklist.md
  • docs/agents/known-gotchas.md
  • docs/agents/health-check.md
  • docs/agents/ui-testing-plan.md

Read the full file on GitHub · 41 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. 28d ago Changed · +4 lines · +71 tokens per session d7b25f3209a3
  2. 2mo ago First seen · 37 lines · 403 tokens per session scan A 86180ea00481

Subscribe to this mod's changes

templates AGENTS.md is an instructions file published in the GitHub repository solana-foundation/templates (113 stars, last pushed 3d ago), licensed MIT. It adds 474 tokens to every session, about $0.0019 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

templates AGENTS.md compared with instructions from other repositories

templates AGENTS.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
templates AGENTS.mdsolana-foundation/templatesInstructions file1133d agoMITA474Codex, OpenCode
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA9,719GitHub Copilot
vscode oss-third-party-notices.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA5,516GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file143kyesterdayMITA7,461Codex, OpenCode
langchain AGENTS.mdlangchain-ai/langchainInstructions file149ktodayMITA4,680Codex, OpenCode
vscode copilot-instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA3,093GitHub Copilot
vscode model-prompts.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA2,022GitHub Copilot