contentful.net AGENTS.md

A set of repository instructions for working on contentful.net, including its structure, build and contribution references, design decisions, review rules, and important compatibility constraints. It tells an agent where to find project information and which patterns must remain unchanged.

In plain words
What is it for?
Use it when changing or reviewing the contentful.net codebase, especially around target frameworks, HttpClient usage, Newtonsoft.Json, package boundaries, and repository documentation.
Why use it?
It reduces the risk of making changes that break supported frameworks, package publishing, dependency injection, or JSON behavior. It also points contributors to the project’s relevant guides and specifications.

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

Made for: Codex, OpenCode.

Per session 830 This file is loaded in full into every session.
When invoked 830 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.00830 $0.00830
Opus 5 $0.00415 $0.00415
Sonnet 5 $0.00166 $0.00166
Haiku 4.5 $0.00083 $0.00083

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

Security

Grade A, and why

contentful.net 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 · 54 lines

How it starts

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

Agent Guide

Read this file first. It tells you where to find context in this repo.

Quick Reference

What you need Where to look
How this repo is structured ARCHITECTURE.md
How to build/test/contribute CONTRIBUTING.md
Why decisions were made docs/ADRs/
What this repo does README.md
PR review rules .bito/guidelines/
Active specs/work docs/specs/

Sharp Edges & Invariants

  • Never remove netstandard2.0 targeting without a breaking-change release — consumers depend on this for cross-platform compatibility. Any target framework change requires a major version bump and a CONTRIBUTING.md update.
  • HttpClient is always injected by the caller, never instantiated internally — this is a deliberate design for testability and to respect ASP.NET Core's IHttpClientFactory lifecycle. Do not change this pattern.
  • Serialization is Newtonsoft.Json, not System.Text.Json — the public API surface (custom converters, [JsonProperty] attributes, JToken / JObject usage) is deeply tied to Newtonsoft. A migration would be a breaking change.
  • Two NuGet packages must stay independently publishablecontentful.csharp (core) and contentful.aspnetcore (integration). The AspNetCore package references the core package; never create a circular dependency.
  • Version numbers are bumped manually in .csproj files — there is no automated release pipeline. See CONTRIBUTING.md for the release procedure.
  • Rate-limit retries are built into the client — do not add external retry middleware without accounting for double-counting retries. MaxNumberOfRateLimitRetries controls the budget.
  • The Entry<T> pattern relies on property name matching for deserialization — field IDs in Contentful must match C# property names (case-insensitively). Renaming properties in models can silently break deserialization.
  • EU region support is configuration-only — pass DirectApiUrl and ManagementBaseUrl pointing to api.eu.contentful.com. No code changes needed; never hardcode region-specific URLs in library code.

Read the full file on GitHub · 54 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 · 54 lines · 830 tokens per session scan A 425f0ddb72e5

Subscribe to this mod's changes

contentful.net AGENTS.md is an instructions file published in the GitHub repository contentful/contentful.net (93 stars, last pushed 17d ago), licensed MIT. It adds 830 tokens to every session, about $0.0042 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.