api-mirror

api-mirror is a skill for Claude Code from cyanheads/pubchem-mcp-server. It costs 68 tokens per session (6,013 once invoked), scanned A, a copy of api-mirror, Apache-2.0.

A library for building a local mirror of a large upstream dataset. A mirror is a locally stored copy that can be searched quickly instead of repeatedly requesting every page from the original service.

In plain words
What is it for?
Use it in a Node or Bun server that imports bulk data, keeps it synchronized, and searches fields such as titles, authors, abstracts, or update dates.
Why use it?
It reduces slow, repetitive live-API queries and supports resumable synchronization with an embedded SQLite database and optional full-text search.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is ./scripts/.

Part of the pubchem-mcp-server plugin — 35 skills, 1 MCP server shipped together

Good fit Use it in a Node or Bun server that imports bulk data, keeps it synchronized, and searches fields such as titles, authors, abstracts, or update dates.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/cyanheads/pubchem-mcp-server
agentmods
npx agentmods add skills/cyanheads/pubchem-mcp-server/api-mirror

Made for: Claude Code.

Or install pubchem-mcp-server, the plugin that ships this one along with the rest of its 35 skills, 1 MCP server.

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-mirror

README.md
[![agentmods](https://agentmods.dev/badge/skills/cyanheads/pubchem-mcp-server/api-mirror/github.svg)](https://agentmods.dev/skills/cyanheads/pubchem-mcp-server/api-mirror)
Your own site
<a href="https://agentmods.dev/skills/cyanheads/pubchem-mcp-server/api-mirror"><img src="https://agentmods.dev/badge/skills/cyanheads/pubchem-mcp-server/api-mirror/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 api-mirror

Your own site · 80×15
<a href="https://agentmods.dev/skills/cyanheads/pubchem-mcp-server/api-mirror"><img src="https://agentmods.dev/badge/skills/cyanheads/pubchem-mcp-server/api-mirror.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 68 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 6,013 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 100% copy Near-identical to another mod 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.00068 $0.06013
Opus 5.5 $0.00027 $0.02405
Sonnet 5.5 $0.00014 $0.01203
Haiku 4.5 $0.00007 $0.00601

Measured yesterday against content hash 410b78663b75, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

api-mirror 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 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.

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.

Origin

This is a copy

100% identical to api-mirror — 39 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

framework-skills/api-mirror/SKILL.md · 189 lines

How it starts

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

Context

The MirrorService owns the source-agnostic half of a local mirror — the embedded store, the sync-state machine, the runner — so a server supplies only the two parts that are irreducibly per-source: the ingester (a sync generator) and the schema. It targets the embedded-SQLite tier (~10⁴–10⁷ rows). Node/Bun only: bun:sqlite is built-in on Bun, better-sqlite3 is an optional peer dependency on Node; the store is unavailable on Workers (no SQLite, no persistent filesystem). On Bun the store needs 1.4.4 or later, the framework's engines.bun floor. An older Bun keeps running a multi-statement exec past a statement that fails, so a migration that fails partway is recorded as applied; opening a store there rejects with ConfigurationError (data.reason: 'unsupported_bun_version') naming both versions, before any file is created. Bun does not enforce engines itself, at install or at run.

Import from @cyanheads/mcp-ts-core/mirror.

For a Node distribution, inspect the exact published better-sqlite3 tarball and loader before deciding which platforms need a native build. Version 13.2.0 includes Node-API binaries for macOS, Windows and Linux on x64 and arm64, with separate musl binaries. If the server bundles the driver in its own npm tarball, keep it resolvable from the framework package. Bundling only the driver can put it below the server while npm hoists the framework above it. Bundling the framework and driver together keeps them in the same dependency tree. Verify the actual tarball from a clean npm exec install with install scripts disabled and exercise a mirror-backed tool. For a Desktop bundle, compare the packaged binaries with the upstream prebuilds and repeat the tool call through the extracted manifest entry point.

For multiple datasets, choose the publication boundary before choosing SQLite paths. Each file has one sync-state row, one writer lease and one migration history. Give independently synced stores separate files. When readers need to join datasets from the same generation, define one store and create the related tables in its migrations. Track per-source revisions in those tables when their freshness differs.

Read the full file on GitHub · 189 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 Changed · +25 lines 410b78663b75
  2. 24d ago Changed · +24 lines 68970065b7ed
  3. 1mo ago Changed · +1 lines 295ccb236d75
  4. 1mo ago Changed · +4 lines 9f413113d4e8
  5. 2mo ago Changed · +2 lines c798117ba567
  6. 3mo ago First seen · 133 lines · 68 tokens per session scan A 89b98aefc722

Subscribe to this mod's changes

api-mirror is a skill published in the GitHub repository cyanheads/pubchem-mcp-server (13 stars, last pushed 2d ago), licensed Apache-2.0. It adds 68 tokens to every session and 6,013 once invoked, about $0.0003 per session on Opus 5.5. A static security scan graded it A with 0 findings. It is 100% identical to api-mirror, differing in 39 lines, and is treated as a copy.

Related

api-mirror compared with skills from other repositories

api-mirror next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
api-mirrorcyanheads/pubchem-mcp-serverSkill132d agoApache-2.0A68Claude Code
add-toolcyanheads/brapi-mcp-serverSkill48d agoApache-2.0A35Claude Code
api-contextcyanheads/brapi-mcp-serverSkill48d agoApache-2.0A84Claude Code
api-errorscyanheads/brapi-mcp-serverSkill48d agoApache-2.0A54Claude Code
api-lintercyanheads/brapi-mcp-serverSkill48d agoApache-2.0A86Claude Code
api-workerscyanheads/brapi-mcp-serverSkill48d agoApache-2.0A51Claude Code
add-servicecyanheads/brapi-mcp-serverSkill48d agoApache-2.0A38Claude Code