sync-metadata for Openclaw

An automated project metadata synchronizer that uses package.json as the single source of truth to update Markdown documentation.

guoqw7
v1.0.0
Jun 3, 2026
1
561
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install sync-metadata

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install sync-metadata using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is sync-metadata?

The sync-metadata skill is designed to solve the common developer pain point of fragmented documentation. By declaring your package.json as the single source of truth, this Openclaw Skills extension automatically ensures that important project variables—such as version numbers, descriptions, licenses, and repository URLs—remain perfectly mirrored across all Markdown files like README.md and SPEC.md.

This utility eliminates manual copy-pasting and prevents outdated documentation. It scans project files for specialized HTML comment placeholders, matches them against your project configuration, and updates them safely after a differential review. It also comes complete with robust internationalization (i18n) capabilities to keep localized files up to date seamlessly.

sync-metadata Use Cases

  • Automatically updating version numbers across README.md and structural spec documents right after a new release.
  • Synchronizing project descriptions, display names, and licenses across multiple documentation files simultaneously.
  • Migrating repository URLs or author information without having to manually hunt down individual references across markdown content.
  • Running automated checks in CI pipelines to ensure localized documentation is completely synchronized with package configuration values.

How sync-metadata Works

  1. Read package.json: The skill accesses the root configuration file to extract top-level metadata values.
  2. Resolve i18n placeholders (Optional): If localized files like package.nls.json exist, it maps key strings wrapped in % tags to their localized equivalent.
  3. Scan Markdown Targets: It uses regex expressions to find comment boundaries matching ... across all .md files.
  4. Evaluate Differences: It compares the current contents inside the HTML comments against live values from the package configuration.
  5. Generate Summary Report: A visualization of matching status or proposed changes is outputted for user verification.
  6. User-Approved Write: After presenting the differential updates, it writes changes to the disk only upon direct user confirmation.

sync-metadata Setup

To use this capability within your Claude Code workspace using Openclaw Skills, run the built-in command shortcut or call it conversationally:

/sync-metadata

You can also trigger it by naturally asking the assistant to "sync metadata" or "update readme version".

sync-metadata Data Schema & Taxonomy

The skill targets placeholder tags within Markdown documentation. The following mappings show how package.json keys translate to the comment schema:

Tag Source Field Example Value
`` name ai-history-auto-record
`` displayName or localized nls AI History Auto Record
`` version 0.0.1
`` description or localized nls Automated AI history tracking...
`` license GPL-3.0
`` repository.url https://github.com/guoqw7/ai-history-auto-record
`` author guoqw7

Nested fields within the JSON structure can be seamlessly queried using standard dot notation (e.g., repository.url).

sync-metadata Advanced Features

  • Dry-Run Inspection: Run non-destructive compliance checks using the phrase "check metadata sync" to validate documentation accuracy without changing code files.
  • Native Internationalization (i18n): Automatically evaluates package.nls.json and language-specific pairs like package.nls.zh-CN.json when triggered with localized instructions like "sync Chinese metadata".
  • Interactive Diff Approvals: Provides a structured report detailing files modified and values changed before committing updates to the workspace disk.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*