nanotracker-api-sdk: Skill for Codex

.agents/skills/api-subscribe-stream/SKILL.md

api-subscribe-stream is a skill for Codex from savannah-i-g/nanotracker-api-sdk. It costs 49 tokens per session (698 once invoked), scanned A, original, MIT.

Instructions for detecting changes in a live nanoTracker editing session from code outside the web page. Because the relay does not send event streams, the instructions use periodic checks of a small project summary.

In plain words
What is it for?
Use them to trigger visualisation updates, synchronize an external sequencer, or log edits when project-level nanoTracker data changes.
Why use it?
They provide a lightweight way to notice edits without sending requests so often that the relay is overloaded.

Skill for Codex

Written for Codex: agents/openai.yaml present. Also seen: installed under .agents/ (shared by several agents).

This is savannah-i-g/nanotracker-api-sdk's own configuration. It tells Codex how to work on nanotracker-api-sdk 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 nanotracker-api-sdk configures →

Reuse

Borrowing it

Nothing to install: this file belongs to savannah-i-g/nanotracker-api-sdk. 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/savannah-i-g/nanotracker-api-sdk/main/.agents/skills/api-subscribe-stream/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/savannah-i-g/nanotracker-api-sdk

Made for: Codex.

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 api-subscribe-stream

README.md
[![agentmods](https://agentmods.dev/badge/skills/savannah-i-g/nanotracker-api-sdk/api-subscribe-stream.svg)](https://agentmods.dev/skills/savannah-i-g/nanotracker-api-sdk/api-subscribe-stream)
Your own site
<a href="https://agentmods.dev/skills/savannah-i-g/nanotracker-api-sdk/api-subscribe-stream"><img src="https://agentmods.dev/badge/skills/savannah-i-g/nanotracker-api-sdk/api-subscribe-stream.svg" alt="Measured on agentmods" height="20"></a>
Per session 49 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 698 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. 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.00049 $0.00698
Opus 5 $0.00024 $0.00349
Sonnet 5 $0.00010 $0.00140
Haiku 4.5 $0.00005 $0.00070

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

Security

Grade A, and why

api-subscribe-stream 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 8d 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/skills/api-subscribe-stream/SKILL.md · 96 lines

How it starts

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

Subscribe to nanoTracker changes (from outside the page)

When to use

You need to react to changes the user makes in the editor (or that another agent makes via the API) — for example, regenerating a visualisation, syncing to an external sequencer, logging edits.

Why subscribe doesn't cross the relay

window.nanoTracker.subscribe(fn) exists in the page, but it fires local React effects. The relay forwards request/reply pairs, not event streams. So external callers must poll.

The good news: getProjectSummary is dirt cheap. A 1 Hz poll is totally fine. A 10 Hz poll is fine for small projects. Don't go faster — the relay's rate limit is 20 batches/sec across all sources.

Cheap-revision pattern

let lastSig = "";
async function poll() {
  const out = await call("read", { op: "getProjectSummary" });
  const sig = JSON.stringify(out.data);
  if (sig !== lastSig) {
    lastSig = sig;
    onChange(out.data);
  }
  setTimeout(poll, 1000);
}
poll();

getProjectSummary returns scalars — bpm, speed, channels, patternCount, orderListLength, sampleCount, instrumentTableSize. The JSON is short and stable; comparing as a string works.

Detecting cell-level changes

Project summary catches structural changes (pattern added, bpm changed). It doesn't catch a single cell edit. For finer detection, add getPatternList:

const list = await call("read", { op: "getPatternList" });
const fp   = list.data.map(p => `${p.id}:${p.filledCells}`).join(",");

filledCells increments/decrements with every cell edit. Combine with the summary signature to catch most changes cheaply.

Cell-exact diffing

If you really need to know which cell changed, you have to fetch the range and diff client-side. Do that lazily — only when one of the cheaper signatures has changed.

Don't busy-loop on errors

If the page disconnects you'll start seeing errors with code: "internal", message: "no nanoTracker tab connected". Back off:

let backoff = 1000;
async function poll() {
  try {
    /* ... */
    backoff = 1000;
  } catch (e) {
    backoff = Math.min(backoff * 2, 30000);
  }
  setTimeout(poll, backoff);
}

Read the full file on GitHub · 96 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 8d ago First seen · 96 lines · 49 tokens per session scan A de7c063b1866

Subscribe to this mod's changes

api-subscribe-stream is a skill published in the GitHub repository savannah-i-g/nanotracker-api-sdk (20 stars, last pushed 4mo ago), licensed MIT. It adds 49 tokens to every session and 698 once invoked, about $0.0002 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.

Related

Other skills, from other repositories

opencli-sitemap-author

Use when creating or maintaining OpenCLI site sitemaps: agent-facing navigation, page-state, action, workflow, API-reference, pitfall, and fallback knowledge for a website. Use after browser exploration discovers durable site context, when a sitemap is stale, or when promoting local site knowledge into the repo.

jackwener/OpenCLI · 67 tokens

debug-optimize-lcp

Guides debugging and optimizing Largest Contentful Paint (LCP) using Chrome DevTools MCP tools. Use this skill whenever the user asks about LCP performance, slow page loads, Core Web Vitals optimization, or wants to understand why their page's main content takes too long to appear. Also use when the user mentions…

ChromeDevTools/chrome-devtools-mcp · 99 tokens

interactive-login

How to complete browser/interactive logins (aws / gh / glab / gcloud). The platform backgrounds the login poller so it survives the human's browser round-trip — and when that does NOT work.

yc-software/qm · 46 tokens

pinchtab-mcp

Use this skill when a task requires browser automation through PinchTab's MCP server connected to a remote browser instance. Covers navigation, element interaction, data extraction, form filling, multi-step flows, and session management via MCP tools.

pinchtab/pinchtab · 52 tokens

azure-messaging-webpubsub-java

Build real-time web applications with Azure Web PubSub SDK for Java. Use when implementing WebSocket-based messaging, live updates, chat applications, or server-to-client push notifications.

microsoft/skills · 43 tokens

google-safe-browsing

Prevent and fix Google Safe Browsing "Dangerous site" flags. Use when launching a public web app, buying/picking a domain, building a login or signup page, or when any site shows a red "Dangerous site" / "Deceptive site" warning in Chrome, Brave, Safari, Firefox, or Edge. Triggers on "dangerous site", "deceptive…

davidondrej/skills · 105 tokens