sync

sync is a command for Claude Code from claude-market/marketplace. It costs 15 tokens per session (3,163 once invoked), scanned A, original, MIT.

A command for bringing application code up to date after changes to an OpenAPI file or database schema. OpenAPI describes an application's web interface, while a database schema describes how its stored data is organised.

In plain words
What is it for?
Use it after editing an OpenAPI specification, adding database migrations, pulling schema changes, or resolving related merge conflicts.
Why use it?
It reduces the manual work of finding affected code and regenerating types or handlers after specification changes.

Command for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: mentions CLAUDE.md; names the AskUserQuestion tool.

Part of the specforge plugin — 5 commands, 3 agents shipped together

Good fit Use it after editing an OpenAPI specification, adding database migrations, pulling schema…

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/claude-market/marketplace/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/claude-market/marketplace

Made for: Claude Code.

Or install specforge, the plugin that ships this one along with the rest of its 5 commands, 3 agents.

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/claude-market/marketplace/sync.svg)](https://agentmods.dev/commands/claude-market/marketplace/sync)
Your own site
<a href="https://agentmods.dev/commands/claude-market/marketplace/sync"><img src="https://agentmods.dev/badge/commands/claude-market/marketplace/sync.svg" alt="Measured on agentmods" height="20"></a>
Per session 15 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,163 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.00015 $0.03163
Opus 5 $0.00008 $0.01581
Sonnet 5 $0.00003 $0.00633
Haiku 4.5 $0.00002 $0.00316

Measured 6d ago against content hash 2cfe4ee1982b, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

sync 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 6d 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.

specforge/commands/sync.md · 581 lines

How it starts

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

SpecForge Sync Command

Synchronize your codebase after manual changes to OpenAPI spec or database schema. This command detects changes and regenerates code to keep everything in sync.

Overview

The sync command is useful when:

  1. You've manually edited spec/openapi.yaml
  2. You've added/modified database migrations
  3. You've pulled changes from version control that include spec updates
  4. You need to regenerate code after resolving merge conflicts

Sync orchestrates:

  • Detecting spec changes since last sync
  • Validating updated specifications
  • Regenerating type-safe code from schemas
  • Identifying affected handlers that need updates
  • Running tests to verify everything still works

Sync Process

Step 1: Detect Changes

Identify what has changed since the last successful build:

# Check for OpenAPI spec changes
if [ -f spec/openapi.yaml ]; then
    echo "Checking OpenAPI spec for changes..."
    # Compare with last known state (stored in .specforge/last-sync.json)
fi

# Check for new database migrations
echo "Checking for new migrations..."
ls -t migrations/*.sql | head -5

# Check for schema changes in existing migrations
git diff HEAD~1 migrations/ 2>/dev/null || echo "Not a git repository or no previous commits"

Categorize changes:

  • OpenAPI only: New/modified endpoints, schemas, examples
  • Database only: New migrations, schema alterations
  • Both: Coordinated changes to API and database

Step 2: Validate Updated Specifications

Validate OpenAPI Spec

Use the openapi-expert skill:

Invoke openapi-expert skill with:
- action: "validate-spec"
- spec_path: "spec/openapi.yaml"

Validation checks:

  • Valid OpenAPI 3.x syntax
  • All $ref references resolve
  • Request/response schemas are valid
  • Examples match schemas
  • No duplicate operation IDs
  • Descriptions include business logic details
Validate Database Schema

Read SpecForge configuration to identify database plugin:

grep "database:" CLAUDE.md | cut -d: -f2 | tr -d ' '

Read the full file on GitHub · 581 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. 6d ago First seen · 581 lines · 15 tokens per session scan A 2cfe4ee1982b

Subscribe to this mod's changes

sync is a command published in the GitHub repository claude-market/marketplace (22 stars, last pushed 10mo ago), licensed MIT. It adds 15 tokens to every session and 3,163 once invoked, about $0.0001 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.