Agent skill

Sync Public Docs

by Caldis in Caldis/react-zmage

A skill your agent uses when modifying public API in packages/core (types/global.ts, types/default.ts, index.ts, or package.json exports field), adding/renaming/removing props, changing default…

MITAuto-check passedAgent Workflows

Install Sync Public Docs

skills CLI
$ npx skills add Caldis/react-zmage --skill sync-public-docs -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install Caldis/react-zmage sync-public-docs --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/Caldis/react-zmage.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/sync-public-docs .claude/skills/sync-public-docs && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
sync-public-docs
GitHub stars
946
Token cost
~3.3k tokens
SKILL.md length
1,544 words
Files
1
Skills in repo
3
Repo updated
First seen
Licence
MIT

At a glance

A skill your agent uses when modifying public API in packages/core (types/global.ts, types/default.ts, index.ts, or package.json exports field), adding/renaming/removing props, changing default…

  • Works in 6 steps: Diagnose what changed → Enumerate sync destinations → Draft the patches → …
  • Modifying public API in packages/core (types/global.ts
  • SKILL.md covers Why this skill exists, When to invoke, The 6-step flow and Final checklist, plus 1 more section
  • Calls pnpm, git and node

What it does

Sync Public Docs is an agent skill from Caldis/react-zmage. Use when modifying public API in packages/core (types/global.ts, types/default.ts, index.ts, or package.json exports field), adding/renaming/removing props, changing default values, before publishing a new react-zmage version, or when the user says "sync docs" / "update public docs" / "propagate this change" / "同步文档" / "更新对外文档" / "准备发版". This skill coordinates four documentation destinations that drift independently — packages/core types & defaults, packages/home docs sections + schema, docs/llms.txt, and…

Its SKILL.md is about 3.3k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Agent Workflows, covering AI search optimization, Technical documentation and Agent instruction files. It works with React, npm and JavaScript. The repository describes itself as: Turn any <img into an origin-expand fullscreen React image viewer. The licence is MIT.

When your agent uses it

  • Modifying public API in packages/core (types/global.ts
  • Types/default.ts
  • Package.json exports field)
  • Adding/renaming/removing props

Example prompts

  • “sync docs”
  • “update public docs”
  • “propagate this change”
  • “/sync-public-docs”

Workflow steps

6 steps, taken from the step headings in SKILL.md.

  1. Diagnose what changed
  2. Enumerate sync destinations
  3. Draft the patches
  4. Dispatch parallel write subagents
  5. Re-eval the result
  6. Main-agent synthesis

What it can do on your machine

Read from SKILL.md and the folder at commit bd9b97d. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • pnpm
    • git
    • node

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use pnpm and git, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Sync Public Docs loads about 3.3k tokens when it runs. Until then it costs about 228 tokens; SKILL.md has 1,544 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~228
When it runs · the whole SKILL.md, loaded when a task matches
~3.3k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from Caldis/react-zmage at commit bd9b97d, republished under its MIT licence (© Caldis). 1,544 words, ~3,284 tokens.

Download SKILL.mdSave it as .claude/skills/sync-public-docs/SKILL.md (or your agent's skills folder).
name
sync-public-docs
description
Use when modifying public API in packages/core (types/global.ts, types/default.ts, index.ts, or package.json `exports` field), adding/renaming/removing props, changing default values, before publishing a new react-zmage version, or when the user says "sync docs" / "update public docs" / "propagate this change" / "同步文档" / "更新对外文档" / "准备发版". This skill coordinates four documentation destinations that drift independently — packages/core types & defaults, packages/home docs sections + schema, docs/llms.txt, and README.md / AGENTS.md. The repo has TS-level guards on type imports, but defaults values, natural-language docs, README/AGENTS prose, llms.txt, and playground snippets have NO automatic guards — this skill IS the documented process that closes that gap. Trigger it aggressively whenever core's public surface changes; over-triggering is cheap, missed sync causes shipped doc drift.

Sync public docs (react-zmage)

Why this skill exists

The repo has four "outward-facing" documentation surfaces and only two of them are guarded automatically:

DestinationSource of truthAuto-guard?
packages/core/src/types/itself— (this IS the source)
packages/home/src/schema/param-schema.tsimports BaseType from react-zmage (typed) but defaults are hand-copied✅ types only; ❌ default values
packages/home/src/docs/sections/*.tsx + i18n keyshand-written prose❌
packages/home/src/playground/* + routes/playground/*hand-written examples❌
docs/llms.txtchecked-in file served as /llms.txt✅ static contract tests, ❌ content is still hand-written
packages/llms-eval/eval.test.mjs (11-item contract)llms.txt ↔ core✅ but manual run only
README.md / AGENTS.mdhand-written❌

When core's public API changes, drift across these surfaces is silent — TS will flag a renamed type symbol but won't flag a stale default value, an outdated prop description in Props.tsx, or a removed prop still mentioned in README.md.

The cost of drift is real: README is what npm shows; llms.txt is what AI agents read; home/docs is what the live site renders. They can each go wrong independently.

When to invoke

Strong triggers (just do it):

  • Any change to packages/core/src/types/global.ts, types/default.ts, or index.ts
  • Any change to packages/core/package.json exports field, peerDependencies, or version
  • Adding, renaming, or removing a prop on <Zmage>
  • Changing a default value in defProp or defPreset
  • Changing the static method surface of Zmage (e.g. adding a new Zmage.X)
  • Changing what react-zmage/ssr exports
  • The user says "sync docs", "propagate this", "update public docs", "同步文档", "准备发版"

Weak triggers (consider, then judge):

  • Pure internal refactors that don't change public types or defaults — usually skip
  • Documentation-only PRs that already touch one destination — still run steps 5–6 to verify the others didn't drift
  • Tooling/build config changes — only if they alter exports, peerDeps, or what consumers see

The 6-step flow

These steps are deliberately separated so each one can be paused for human review. The reason for splitting "draft" from "write" is that drafts are cheap to throw away; writes touch many files and are expensive to revert.

Step 1 — Diagnose what changed

Read the diff. List every change to public API surface, grouped by category:

  • Type symbols added/removed/renamed in packages/core/src/types/global.ts
  • Default values changed in packages/core/src/types/default.ts (defProp, defPreset.desktop, defPreset.mobile)
  • Runtime exports changed in packages/core/src/index.ts (default export, static methods, named exports)
  • exports field / subpaths / peerDeps in packages/core/package.json

Use git diff against master (the default branch is master, not main). If the user is mid-refactor and the change is uncommitted, use the working tree.

If nothing on this list moved, stop here. Tell the user the change doesn't affect public surface, no sync needed.

Step 2 — Enumerate sync destinations

For each change, identify which destinations need updating. Use this map. Each cell = "yes" unless marked –.

Change categoryhome/schema (ParamDef + i18n)home/docs/sectionshome/playgrounddocs/llms.txtREADME.mdAGENTS.mdllms-eval/eval.test.mjs
Add prop✓ ParamDef + i18n keys in all 7 home/src/i18n/*.ts✓ Props.tsx table row + Examples.tsx if non-trivial usage✓ ParamPanel.tsx + new control under playground/controls/ if user-tunable✓ API table✓ "API > 基础/功能/界面 Props" section + 示例✓ if it changes the public-API contract✓ add an assertion proving the prop is documented
Rename prop✓ ParamDef name + all i18n key referrers✓ all sections (Props, Examples, Theming, Migration, FAQ) — grep the old name✓ all playground/** and routes/playground/** — grep the old name✓✓ grep the old name everywhere✓✓
Remove prop✓ delete ParamDef + i18n keys✓ delete from Props.tsx; add entry to Migration.tsx✓ delete control; remove from ParamPanel.tsx✓✓ delete + Migration note if breaking✓✓ delete the assertion
Default value changed✓ defProp (or defPreset) hand-copy — see comment at top of param-schema.ts✓ Props.tsx "默认" column; Theming.tsx if it's backdrop-class; FAQ.tsx if a common-pitfall default flips✓ initial state in playground/seed/* (the WYSIWYG seed reflects defaults)✓ API table Default column✓ "默认" column in API tables– usually✓ if there's a default-value assertion (e.g. backdrop hex)
Add static method on Zmage–✓ ThreeModes.tsx if it's a new mode; otherwise the most relevant section✓ if it can be exercised from playground UI✓ Quick start + Choosing a usage mode✓ Quick Contract table + 使用 section✓✓ runtime assertion that the static exists
Add subpath in exports–✓ Installation.tsx and/or TypeScript.tsx–✓✓ Quick Contract– usually✓ VALID_SUBPATHS set
peerDep range change–––✓ "Supports React X through Y" line✓ "React 版本兼容" table + badge–✓ peer-range assertion bounds
Behavior/visual change (no API change)–✓ Theming.tsx / FAQ.tsx if user-visible; Migration.tsx if behaviorally breaking✓ playground hint copy if behavior was demoed there– usually– usually––
Multi-language parity (hard rule, not optional)

Any prose change in home/src/docs/sections/*.tsx or any user-visible label in home/src/playground/ MUST land in all 7 home/src/i18n/*.ts files: en, de, es, fr, ja, ko, zh-CN. Divergent key sets break useT() lookups silently — there is no compiler error for a missing key. Untranslated entries may use the English source verbatim as a placeholder (better) or omit the value (worse, but acceptable temporarily) — but the key itself must exist in every file.

Verify before committing:

bash
for lang in en de es fr ja ko zh-CN; do
  count=$(grep -cE "^[[:space:]]+'[^']+':" "packages/home/src/i18n/$lang.ts")
  echo "$lang: $count keys"
done

All 7 numbers must match. If they diverge, find the missing key with diff <(grep ... en.ts) <(grep ... <other>.ts) and add the placeholder.

Other edge cases
  • llms-eval: if the change adds new public API, also add a contract assertion in packages/llms-eval/eval.test.mjs so future drift is caught.
  • alias members on Zmage: source defines both Zmage.wrapper / Zmage.Wrapper and Zmage.browsing / Zmage.Browsing. Pick one casing per document and stay consistent within that document — mixed casing in the same file confuses readers. Cross-document, the recommended convention is PascalCase for the component-shaped wrapper (<Zmage.Wrapper>, since JSX wants PascalCase for components) and camelCase for the imperative method (Zmage.browsing()).
Step 3 — Draft the patches

Write out — in your reply, not yet on disk — the exact intended diff for each destination. This is the human review checkpoint: it's much cheaper to revise prose at this stage than to revise after files are written.

Keep drafts terse: file path + before/after snippet, not full file content. The user should be able to skim and approve in one read.

If a destination needs more than ~30 lines of prose, flag it as "needs careful writing" rather than rushing through it.

Show full SKILL.md (598 more words)Show less
Step 4 — Dispatch parallel write subagents

Once drafts are approved, write the changes. Prefer parallelism — most destinations are independent.

Group rules:

  • Group A (parallel-safe): home/schema/param-schema.ts, home/docs/sections/*.tsx, home/src/i18n/*.ts, README.md, AGENTS.md, packages/llms-eval/eval.test.mjs — these don't conflict.
  • Group B (sequential, single-writer): docs/llms.txt is one file; one writer.

Dispatch one Agent per destination in Group A in a single tool-call message; do docs/llms.txt separately. Each subagent's prompt should include:

  • The exact draft from Step 3 for that destination
  • An instruction to NOT modify any file outside its assigned destination
  • A reminder that docs/llms.txt is the single source of truth served as /llms.txt
Step 5 — Re-eval the result

Two evaluation layers, both in packages/llms-eval/:

Static contract (always run after docs/llms.txt changes):

bash
pnpm --filter llms-eval run test

This is the 11-item check that llms.txt's factual claims match core's reality. If any assertion fails, the sync is incomplete — go back to Step 3 for the affected destination.

Behavioral eval (run when public surface changed materially — new modes, props, subpaths, or anything an AI integrator would notice):

  1. Delete packages/llms-eval/agent-onboarding/output/ and report.json from the previous run.
  2. Dispatch a fresh subagent with the brief at packages/llms-eval/agent-onboarding/prompt.md. The subagent must obey the META section's information-source constraints (only the deployed llms.txt URL, fall back to local docs/llms.txt if WebFetch fails, no other repo files, no GitHub).
  3. Run node packages/llms-eval/agent-onboarding/rubric.mjs to score the output (target ≥ 90/100).
  4. Read packages/llms-eval/agent-onboarding/output/SELF_CRITIQUE.md — this is the qualitative signal (rubric-100 doesn't mean docs are good; SELF_CRITIQUE shows what the integrator had to guess).

Skip the behavioral eval for tiny changes (e.g., a typo fix, a peerDep bump from <20 to <21); the static contract suffices.

Step 6 — Main-agent synthesis

Compile a final report for the user with:

  • What was synced (destinations touched, in a table)
  • Static contract result (X/11 passed)
  • Behavioral eval result (rubric score / 100, top 1–2 SELF_CRITIQUE concerns if any)
  • Anything still flagged (failed assertions, SELF_CRITIQUE gaps, deferred items)
  • Whether ready to publish (yes / no, with reasons)

If anything is red, recommend a specific next action — don't just list problems.

Final checklist

Before claiming sync is done:

  • git diff shows changes only in destinations from the Step 2 map
  • pnpm --filter llms-eval run test passes 11/11
  • If behavioral eval was run: rubric ≥ 90 and SELF_CRITIQUE has no "had to guess core API" complaints
  • If docs/llms.txt changed: pnpm --filter llms-eval run test passes and the file is committed (GitHub Pages serves this file directly)
  • If new public API surface was added: a corresponding contract assertion was added to packages/llms-eval/eval.test.mjs
  • If new i18n prose: keys exist in all 7 language files
  • If home/schema/param-schema.ts defProp was edited: the hand-copy comment at the top of that file is still accurate (or removed if values now match core via a real import)

Anti-patterns

  • Don't reintroduce a repo-root llms.txt. GitHub Pages serves docs/llms.txt as /llms.txt, and packages/llms-eval reads that same file.
  • Don't dispatch one mega-agent for "update everything". Per-destination subagents stay focused and parallelize. The dispatcher is also the reviewer — one giant write makes review impossible.
  • Don't skip Step 3 (drafts). Going straight from diagnosis to writing means review happens after files change, when reverts are expensive.
  • Don't trust rubric 100/100 alone. It's a static check. SELF_CRITIQUE is where you find out the docs technically match the code but force the reader to guess. Both signals matter.
  • Don't add a default value to home/schema/param-schema.ts without checking the comment at the top. That file deliberately re-declares defProp because core doesn't export it; if you can fix that root cause (export defProp from core) instead of re-syncing the copy, that's the better long-term fix — but it's a public-API addition, so it itself triggers this skill.

© Caldis, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .agents/skills/sync-public-docs of Caldis/react-zmage.

Open the folder on GitHubat commit bd9b97d

Compare with similar skills

Sync Public Docs next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Sync Public Docs compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Sync Public Docs this skillCaldis/react-zmage946—~3.3kAutomated safety check: PassMIT
Release Managerukorvl/lightweight-charts-react-components136—~1.7kAutomated safety check: PassCustom licence
Writing Documentationhoneybadger-io/honeybadger-js116—~389Automated safety check: PassMIT
Dev Serverlablup/backend.ai-webui133—~6.9kAutomated safety check: NotesLGPL-3.0
Eslintmanagedcode/dotnet-skills486—~1.5kAutomated safety check: PassMIT
Neat-Freak Knowledge CloseoutKKKKhazix/khazix-skills21k—~1.9kAutomated safety check: PassMIT

Similar skills

  • Release Manager

    ukorvl/lightweight-charts-react-components

    Prepare or finalize semver releases for this repository. An agent skill from ukorvl/lightweight-charts-react-components.

    136 GitHub stars~1.7k tokensUpdated today
    DevelopmentAuto-check passed
  • Writing Documentation

    honeybadger-io/honeybadger-js

    Guides documentation changes for honeybadger-js. An agent skill from honeybadger-io/honeybadger-js.

    116 GitHub stars~389 tokensUpdated today
    DevelopmentAuto-check passed
  • Dev Server

    lablup/backend.ai-webui

    Start the project's development server (pnpm dev for backend.ai-webui; discovered from README/package.json elsewhere), deriving the header color, app name, default backend endpoint and login…

    133 GitHub stars~6.9k tokensUpdated today
    DevelopmentAuto-check: notes
  • Eslint

    managedcode/dotnet-skills

    Use ESLint in .NET repositories that ship JavaScript, TypeScript, React, or other Node-based frontend assets.

    486 GitHub stars~1.5k tokensUpdated today
    DevelopmentAuto-check passed
  • Neat-Freak Knowledge Closeout

    KKKKhazix/khazix-skills

    Brings project docs, agent rule files, authorized memory and leftover workspace files back in line with what the code and runtime actually do at the end of a work session.

    21k GitHub stars~1.9k tokensUpdated 6 days ago
    Agent WorkflowsAuto-check passed
  • Dsh Web Documentation

    zhu1090093659/dsh-web

    A skill your agent uses when adding or editing dsh-web README files, docs, AGENTS.md instructions, user-facing configuration text, or bilingual documentation pairs.

    8.5k GitHub stars~479 tokensUpdated today
    Agent WorkflowsAuto-check passed

More from Caldis/react-zmage

  • React Zmage Integration

    Caldis/react-zmage

    A skill your agent uses when adding the react-zmage React image viewer to an existing React, Next.js, MDX, CMS, markdown, or rich text image surface.

    946 GitHub stars~370 tokensUpdated 4 mo ago
    Auto-check passed
  • Release Workflow

    Caldis/react-zmage

    A skill your agent uses when the user wants to ship a new version of react-zmage to npm.

    946 GitHub stars~3.6k tokensUpdated 4 mo ago
    Auto-check: notes

Questions about Sync Public Docs

What does Sync Public Docs do?

A skill your agent uses when modifying public API in packages/core (types/global.ts, types/default.ts, index.ts, or package.json exports field), adding/renaming/removing props, changing default…. Sync Public Docs is an agent skill from Caldis/react-zmage.json exports field), adding/renaming/removing props, changing default values, before publishing a new react-zmage version, or when the user says "sync docs" / "update public docs" / "propagate this change" / "同步文档" / "更新对外文档" / "准备发版".

When should I use Sync Public Docs?

Sync Public Docs fits situations like: modifying public API in packages/core (types/global.ts; types/default.ts; package.json exports field); adding/renaming/removing props.

How do I install Sync Public Docs in Claude Code?

Run `npx skills add Caldis/react-zmage --skill sync-public-docs -a claude-code`. Or copy the skill folder (.agents/skills/sync-public-docs in Caldis/react-zmage) into .claude/skills/sync-public-docs in your project. Claude Code loads it when a task matches its description.

How do I install Sync Public Docs in Codex?

Run `npx skills add Caldis/react-zmage --skill sync-public-docs -a codex`. Or copy the skill folder (.agents/skills/sync-public-docs in Caldis/react-zmage) into .agents/skills/sync-public-docs in your project. Codex loads it when a task matches its description.

Can I use Sync Public Docs in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add Caldis/react-zmage --skill sync-public-docs -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/sync-public-docs, .gemini/skills/sync-public-docs, .github/skills/sync-public-docs and .opencode/skills/sync-public-docs in your project.

What does Sync Public Docs need to run?

Going by SKILL.md and its folder, Sync Public Docs needs the command-line tools its instructions call (pnpm, git and node).

Does Sync Public Docs access the network?

SKILL.md contains no URLs. Its commands use git, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Sync Public Docs safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Sync Public Docs use?

Sync Public Docs is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Sync Public Docs use?

About 3.3k tokens (SKILL.md is roughly 13k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Sync Public Docs?

Skills that share tags, products or a category with Sync Public Docs: Release Manager (ukorvl/lightweight-charts-react-components, 136 stars), Writing Documentation (honeybadger-io/honeybadger-js, 116 stars), Dev Server (lablup/backend.ai-webui, 133 stars) and Eslint (managedcode/dotnet-skills, 486 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Sync Public Docs?

Caldis (a GitHub user) maintains it in Caldis/react-zmage, which has 946 GitHub stars. The repository holds 3 skills in this directory. The repository was last updated on May 18, 2026.

Source: Caldis/react-zmage on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.