sdk-generator AGENTS.md

sdk-generator AGENTS.md is an instructions file for Codex, OpenCode from appwrite/sdk-generator. It costs 3,980 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

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 · 325 stars · on GitHub

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/appwrite/sdk-generator/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.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.svg" alt="Measured on agentmods" height="20"></a>
Per session 3,980 This file is loaded in full into every session.
When invoked 3,980 The same file — it is already loaded in full.
Security scan C 1 finding. 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.03980 $0.03980
Opus 5 $0.01990 $0.01990
Sonnet 5 $0.00796 $0.00796
Haiku 4.5 $0.00398 $0.00398

Measured yesterday against content hash d9765d49edf4, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, 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 yesterday.

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 · 384 lines

How it starts

The opening of the file, as written. The whole thing — 384 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, Deno
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 · 384 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. yesterday 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 (325 stars, last pushed today), licensed MIT. It adds 3,980 tokens to every session, about $0.0199 per session on Opus 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.