sync-api-endpoints

A rule for keeping HTTP route information synchronized across firmware code and documentation. An HTTP route is a web address and method that an application or device accepts, such as `GET /settings`.

In plain words
What is it for?
Use it whenever an HTTP method, path, or query parameter changes. It helps update the endpoint table, API examples, supported values, errors, summaries, and relevant firmware handling together.
Why use it?
It prevents the HTML index, API reference, README, and hardware-testing notes from describing different routes or parameter values. It also covers related wrong-method handling for test routes.

Cursor rule for Cursor

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 rules/jamro/tiny-engineer/sync-api-endpoints
Clone the repo
git clone --depth 1 https://github.com/jamro/tiny-engineer

Made for: Cursor.

Per session 0 Nothing until a file matches its globs; then the whole rule loads.
When invoked 309 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 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.00000 $0.00309
Opus 5 $0.00000 $0.00154
Sonnet 5 $0.00000 $0.00062
Haiku 4.5 $0.00000 $0.00031

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

Security

Grade A, and why

sync-api-endpoints scanned grade A 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 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.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

2. **API reference** — [`docs/api.md`](docs/api.md): full section per endpoint (curl, JSON, params, errors)
.cursor/rules/sync-api-endpoints.mdc · 19 lines

What it actually says

Sync HTTP endpoints across firmware and docs

When adding, removing, or changing the method, path, or query parameters of any HTTP route, update all of the following in the same change:

  1. HTML indexsrc/http/index_page.cpp: main endpoint table matches all routes; parameter sections for /anim, /settings, and /test/servo list every supported value and range
  2. API referencedocs/api.md: full section per endpoint (curl, JSON, params, errors)
  3. Summaries — if the endpoint list, params, or boot URLs changed, also update README.md and docs/hardware/testing.md
  4. 405 paths — if new /test/* or similar paths get wrong-method handling, update isHttpTestPath() in src/http/test_handlers.cpp and handleNotFound as needed

Do not duplicate long behavioral docs (animation behavior tables, RGB LED) in the HTML index — one-line route descriptions only, except the supported-parameter lists for /anim, /settings, and /test/servo.

Parameter values in the HTML index must match docs/api.md exactly.

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 · 19 lines · 0 tokens per session scan A e3ae4a2aeaca

Subscribe to this mod's changes

sync-api-endpoints is a cursor rule published in the GitHub repository jamro/tiny-engineer (117 stars, last pushed 2d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 309 tokens. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.