sdk-generator: Instructions file for Codex

AGENTS.md

sdk-generator AGENTS.md is an instructions file for Codex, OpenCode from appwrite/sdk-generator. It costs 4,433 tokens per session, scanned C, original, MIT.

Repository instructions for coding agents working on a tool that generates software-development kits (SDKs) from templates. They explain how template changes affect generated files and related programming languages.

In plain words
What is it for?
Use them when editing SDK templates, registering new generated files, or checking the results across JavaScript, Dart, Swift, Kotlin, Go, and other supported languages.
Why use it?
They help prevent changes from being lost, generated files from becoming outdated, or child SDKs from breaking after a parent template changes.

Instructions file for CodexOpenCode ✓ vendor

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

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

About the project

Appwrite SDK Generator is a PHP library that creates software development kits for multiple programming languages and platforms from API specifications. It helps developers produce client libraries with services, methods, models, enums, and related types from formats such as OpenAPI.

appwrite/sdk-generator · 329 stars · on GitHub · appwrite.io

Reuse

Borrowing it

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

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 sdk-generator AGENTS.md

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

Your own site · 80×15
<a href="https://agentmods.dev/instructions/appwrite/sdk-generator/agents-md"><img src="https://agentmods.dev/badge/instructions/appwrite/sdk-generator/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 4,433 This file is loaded in full into every session.
When invoked 4,433 The same file — it is already loaded in full.
Security scan C 1 finding. 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.04433 $0.04433
Opus 5.5 $0.01773 $0.01773
Sonnet 5.5 $0.00887 $0.00887
Haiku 4.5 $0.00443 $0.00443

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

Security

Grade C, and why

sdk-generator AGENTS.md scanned grade C with 1 finding 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 6d 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.

Recursive force deletehighDestructive command

rm -rf with a variable or a broad path is one typo away from removing the wrong tree.

rm -rf examples/dart examples/flutter
AGENTS.md · 392 lines

How it starts

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

Agents Guide — SDK Generator

This file provides guidance for AI agents (Claude Code and subagents) working in this repository.

Critical Rules for Agents

Rule 1: Always regenerate after template edits

Templates are not used directly — they're rendered at generation time. The examples/ folder is the ground truth for what the generator actually produces. Always regenerate after making template changes.

Rule 2: New files require getFiles() registration

The generator does not auto-discover templates. Every output file must have an explicit entry in the getFiles(): array method of the corresponding Language class. Forgetting this means the file silently doesn't get generated.

Rule 3: Check language inheritance before changing parent templates

Parent Children affected
JS Web
Web Node, ReactNative
Dart Flutter
Swift Apple
Kotlin Android
Go CLI

Modifying a parent's template or getFiles() affects all children. Regenerate and verify child SDKs too.

One coupling is not visible in the hierarchy.

templates/cli/install.sh.twig and templates/cli/install.ps1.twig build every download URL from language.params.npmPackage. The same parameter names release assets produced by .goreleaser.yaml and consumed by the Scoop manifest and npm platform packages. Change the asset naming in one place and all four must move together.

Regenerate the CLI after changing any of them:

php example.php cli

Rule 4: copy scope = no Twig processing

Files with 'scope' => 'copy' are copied verbatim — no variable substitution happens. If your new file needs template variables, use 'scope' => 'default' (or service, method, etc.).

Rule 5: Destination paths are also Twig templates

The destination string in each getFiles() entry supports Twig expressions and filters:

'destination' => 'src/Services/{{ service.name | caseCamel }}.php',

Read the full file on GitHub · 392 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. 6d ago Changed · +2 lines · +194 tokens per session 1b6cf4e737b4
  2. 17d ago Changed 5b809bef1757
  3. 19d ago Changed · -4 tokens per session 78aedcdcc968
  4. 1mo ago Changed 3dfd7f67c7b9
  5. 1mo ago Changed · +6 lines · +263 tokens per session 2362c3a234d8
  6. 2mo ago First seen · 384 lines · 3,980 tokens per session scan C d9765d49edf4

Subscribe to this mod's changes

sdk-generator AGENTS.md is an instructions file published in the GitHub repository appwrite/sdk-generator (329 stars, last pushed yesterday), licensed MIT. It adds 4,433 tokens to every session, about $0.0177 per session on Opus 5.5. A static security scan graded it C with 1 finding (recursive force delete). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

sdk-generator AGENTS.md compared with instructions from other repositories

sdk-generator AGENTS.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
sdk-generator AGENTS.mdappwrite/sdk-generatorInstructions file329yesterdayMITC4,433Codex, OpenCode
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA9,719GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file143ktodayMITA7,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