sync

sync is a command for Claude Code from jhlee0409/claude-plugins. It costs 20 tokens per session (3,667 once invoked), scanned A, original, MIT.

A command that updates application code from an OpenAPI specification, which is a machine-readable description of an HTTP API. It can generate types and API code that match the specification.

In plain words
What is it for?
Use it to check prerequisites, compare the specification with cached state, review a change summary, confirm what to update, generate code using the project's patterns, and report changed files.
Why use it?
It keeps generated API code aligned with the current interface and shows specification changes before applying them, reducing manual mismatches.

Command for Claude Code

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

Part of the oas plugin — 6 skills, 6 commands shipped together

Good fit Use it to check prerequisites, compare the specification with cached state, review a change summary, confirm what to update, generate code using the project's patterns, and report changed files.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/jhlee0409/claude-plugins/sync
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.

Clone the repo
git clone --depth 1 https://github.com/jhlee0409/claude-plugins

Made for: Claude Code.

Or install oas, the plugin that ships this one along with the rest of its 6 skills, 6 commands.

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 sync

README.md
[![agentmods](https://agentmods.dev/badge/commands/jhlee0409/claude-plugins/sync/github.svg)](https://agentmods.dev/commands/jhlee0409/claude-plugins/sync)
Your own site
<a href="https://agentmods.dev/commands/jhlee0409/claude-plugins/sync"><img src="https://agentmods.dev/badge/commands/jhlee0409/claude-plugins/sync/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 sync

Your own site · 80×15
<a href="https://agentmods.dev/commands/jhlee0409/claude-plugins/sync"><img src="https://agentmods.dev/badge/commands/jhlee0409/claude-plugins/sync.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 20 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 3,667 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 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.00020 $0.03667
Opus 5.5 $0.00008 $0.01467
Sonnet 5.5 $0.00004 $0.00733
Haiku 4.5 $0.00002 $0.00367

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

Security

Grade A, and why

sync 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 1mo 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.

const response = await fetch(USER_API_PATHS.detail(id))
plugins/oas/commands/sync.md · 580 lines

How it starts

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

OpenAPI Sync

Generate or update API code based on OpenAPI spec and detected project patterns.


EXECUTION INSTRUCTIONS

When /oas:sync is invoked, Claude MUST perform these steps in order:

Step 0: MCP Dependency Check

Invoke skill: mcp-dependency

  • Verify OpenAPI Sync MCP server is installed
  • If not available, offer to install via npm install -g @jhlee0409/openapi-sync-mcp
  • Only proceed after MCP is confirmed available
  1. Check prerequisites - Verify .openapi-sync.json exists (run /oas:init if not)
  2. Use skill: cache-manager - Check cache, fetch spec if needed
  3. Use skill: openapi-parser - Parse spec, compute diff with cache
  4. Show diff summary - Display changes to user
  5. Get user confirmation - Proceed or select specific items
  6. Use skill: code-generator - Generate code matching project patterns
  7. Update cache - Save new state to cache files
  8. Report results - Show generated/updated files

Prerequisites

  1. Check .openapi-sync.json exists - if not, run /oas:init
  2. Load config and detected patterns

Sync Process (Smart Caching - Default)

Step 0: Smart Cache Check

Use skill: cache-manager

Smart caching: Fast when unchanged, accurate when changed.

1. Check cache exists
   - .openapi-sync.cache.json (spec cache)
   - .openapi-sync.state.json (implementation state)

2. Smart validation (not full fetch!)
   - Remote URL → HEAD request (check ETag/Last-Modified)
   - Local file → Check file mtime

3. Decision
   - Unchanged → Use cached spec (fast ⚡)
   - Changed → Full fetch, update cache
   - --force → Always full fetch
   - --offline → Use cache only

Output (cache hit):

/oas:sync

✅ Using cached spec (ETag unchanged)
   Last sync: 2 hours ago

   Checking 150 endpoints against codebase...
   ✅ All endpoints up to date

No changes needed.

Output (cache miss):

/oas:sync

🔄 Spec changed, fetching updates...
   ETag: "abc123" → "def456"

   Fetching spec...
   📥 Downloaded 150 endpoints

   Checking against codebase...

Read the full file on GitHub · 580 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. 1mo ago First seen · 580 lines · 20 tokens per session scan A 64a405cbfcbb

Subscribe to this mod's changes

sync is a command published in the GitHub repository jhlee0409/claude-plugins (4 stars, last pushed 9mo ago), licensed MIT. It adds 20 tokens to every session and 3,667 once invoked, about $0.0001 per session on Opus 5.5. 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-31.