react-svg AGENTS.md

Repository instructions for react-svg, a React project for creating and maintaining SVG graphics—images made from shapes and paths rather than pixels. They cover writing style, commits, pull requests, architecture, builds, tests, and releases.

In plain words
What is it for?
Use them when changing the React or SVG code, writing commits or pull requests, running builds and tests, or preparing a release.
Why use it?
They prevent inconsistent language and release practices, and make sure changes follow the project’s testing and documentation expectations.

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

Made for: Codex, OpenCode.

Per session 1,330 This file is loaded in full into every session.
When invoked 1,330 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.01330 $0.01330
Opus 5 $0.00665 $0.00665
Sonnet 5 $0.00266 $0.00266
Haiku 4.5 $0.00133 $0.00133

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

Security

Grade A, and why

react-svg 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 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.

AGENTS.md · 110 lines

How it starts

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

AGENTS.md

Rules for coding agents that the code and config don't already state. Keep it that way: a constraint that can live in a comment next to the thing it constrains belongs there, not here.

Writing

  • NZ English everywhere ("colour", "behaviour", "initialise").
  • Match a document's length to what it needs. Cover the substance, then stop: no filler sections, restated summaries or boilerplate.
  • Commit subjects are one capitalised line, git log --oneline style. Add a body whenever the change had a reason the diff does not show: what it fixes, what it rules out, what constraint forced the shape it has. Mechanical changes need none.
  • No conventional-commit prefixes (feat:, fix:, chore(deps):) in commit subjects or PR titles. Write a plain capitalised sentence. Nothing reads the prefix: the version bump comes from the PR label, and renovate is set to semanticCommits: "disabled" to match.
  • PR titles are copied verbatim into the generated release notes, so write them as the changelog line you want readers to see.
  • Hard-wrap commit message bodies at 72 columns; git log does not reflow them. Do not hard-wrap PR or issue descriptions: GitHub reflows markdown, and its web editor leaves wrapped source ragged once anyone edits it.

Architecture

Injection happens in a single effect in src/ReactSVG.tsx. The two-wrapper structure, outer managed by React and inner managed by @tanem/svg-injector, is load-bearing: don't collapse it.

That file's comments cover the rest: why forwardRef is required, why the effect's dependency list is deliberately narrow, why the callbacks are read through a ref, and what the teardown guard protects. Read them before changing the injection flow.

Build & test

npm run test:src is the development loop. npm test is the full gate: its test:* glob includes test:react, which installs and runs every version in the React matrix, so expect it to take minutes. npm run size, npm run test:dist and the package:* checks read dist/, so they need a current npm run build.

Read the full file on GitHub · 110 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 · 110 lines · 1,330 tokens per session scan A e310719112da

Subscribe to this mod's changes

react-svg AGENTS.md is an instructions file published in the GitHub repository tanem/react-svg (883 stars, last pushed 6d ago), licensed MIT. It adds 1,330 tokens to every session, about $0.0066 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.