git-sync: Publishing Skills and Agents to Multiple Platforms at Once

Introduction

When maintaining Skills or Agents, a common practice is to push code to Gitee and GitHub separately, manually run publish commands for ClawHub, SkillHub, and PyPI, and filter out files that shouldn’t be uploaded or check for leaked tokens and local paths before release. As platforms increase, steps become fragmented, and version numbers easily become misaligned between _meta.json, SKILL.md, and the changelog.

Here we introduce git-sync on SkillHub (@user_800d68d6/git-sync, current page version 2.48.0). It consolidates multi-repo synchronization, market publishing, and Release creation into a single Agent Skill workflow, using LLMs to participate in file filtering and desensitization decisions.

What is this

Positioned on SkillHub, git-sync is a unified publishing tool for all platforms. It supports synchronizing skills and agents to Gitee / GitHub / ClawHub / SkillHub / PyPI, creating Releases, and provides LLM-driven file filtering and desensitization.

  • Coordinate: @user_800d68d6/git-sync
  • Source: community
  • Category: dev-programming
  • Publisher: user_800d68d6
  • Tags: requires_api_key=true (requires self-configuration for platform APIs and credentials)
  • Official Entry: SkillHub Skill Page, API Coordinate Page

The Skill itself follows the general SKILL.md format: SKILL.md is the entry point, while detailed instructions are split into references/*.md for on-demand loading.

Core Functions

The following capabilities are consistent with the public documentation of the same version (2.48.0) and description on ClawHub, and can be cross-verified with the SkillHub description.

Full-Platform Publishing and Type Identification

  • Normalizes and pushes skills or agents to Gitee and GitHub, and can further publish to ClawHub, SkillHub, and PyPI. Supports creating Releases (git tag + platform API).
  • Automatically distinguishes between skills (presence of _meta.json) and agents (identified by rules such as containing __version__ in __init__.py). Versions are read from _meta.json or __init__.py respectively.
  • git-sync all: Iterates through all configured skill/agent projects under the repos registry in config.json (distinguishes between skills and agents repos by default).

LLM-Handoff Filtering and Desensitization

  • File Filtering: Scans the source directory before synchronization. After listing files and rules, it exits with code 3 to hand off. The caller (AI Assistant) writes to file_filter_{name}.decisions.json, then re-runs the same command to resume from the breakpoint, copying only allowed files.
  • Sensitive Desensitization (Mandatory): Scans for emails, tokens, paths, etc., after synchronization. If sensitive items are found, it hands off similarly, writing to sensitive_scan_{name}.decisions.json for resumption. Decision files must be written via the path functions in _paths.py within the git-sync script environment. The handoff → write decision → re-run process should be completed in a single command (splitting into multiple commands may cause temp path inconsistencies and repeated exit 3).

Versioning, Standards, and Packaging

  • Three-way Version Comparison: _meta.json, SKILL.md frontmatter, and changelog (only handles x.y.z format).
  • SKILL.md Standard Review: Inline checks for version consistency and script references.
  • ZIP Packaging + HTML Index: Can generate installation packages and index pages for skills; ZIP packaging behavior for agents is skipped according to skill documentation conventions.

Platform Publishing Differences (Summary)

Platform Version Source Key Points
Gitee / GitHub _meta.json (skill) or __init__.py (agent) git push; SSH/HTTPS credential resolution; conflicts not auto-merged
ClawHub slug/version/tags from _meta.json npx clawhub publish <absolute_path>
SkillHub Requires explicit --version skills_store_cli.py publish; do not rely solely on SKILL.md frontmatter
PyPI __version__ from __init__.py twine upload --disable-progress after isolated build
Release Current version after sync Tag: {name}-v{ver} for skills, v{ver} for agents

Network operation timeout is generally 60 seconds; single repo scale is documented as 1–50 projects, each ≤ 500MB. Status is recorded in manifest.json under the data directory.

Installation and Enablement

1. Install SkillHub CLI (if not installed)

First, check if the CLI is available:

command -v skillhub && skillhub --version

If not installed, follow the SkillHub Installation Documentation for a full installation:

curl -fsSL https://skillhub-1388575217.cos.ap-guangzhou.myqcloud.com/install/install.sh | bash

2. Install git-sync to the current Agent’s skills directory

When installing, you must use --dir to point to the skills directory recognized by the current client. Otherwise, the default installation to ./skills/ might not be loaded by the Agent.

The common path for Cursor is ~/.cursor/skills/:

skillhub install user_800d68d6/git-sync --dir ~/.cursor/skills/

You can also ask the AI to install it via official prompts (consistent with the SkillHub page):

Please install `@user_800d68d6/git-sync` based on https://skillhub.cn/install/skillhub.md.

Paths differ for Claude Code and Codex. Examples listed in the installation docs include ~/.claude/skills/, ~/.codex/skills/, or .agents/skills/ under the project. Simply change --dir to the corresponding directory; the command format remains the same.

3. Data and Configuration Directory

Runtime data for the skill (based on the installed $SKILLS_DIR) is roughly as follows:

$SKILLS_DIR/.standardization/git-sync/
├── data/
│   ├── config.json     # repos registry, platform usernames, gitee_token, etc.
│   └── manifest.json   # sync status list
└── backup/

Configure target repos and platform credentials in config.json. If the SkillHub tag indicates an API Key is required, prepare it here or in environment variables. Do not commit keys into the synced repos.

Typical Usage

Python is recommended as the execution entry (equivalent to git-sync.sh; the script falls back to Python flow if rsync is unavailable). $SKILLS_DIR in paths refers to the skills root directory where git-sync resides.

Push a single skill to Gitee / GitHub

python "$SKILLS_DIR/git-sync/scripts/git-sync.py" novel-weaver

The flow passes through trigger judgment, security checks, manifest and version checks, (optional) LLM file filtering and desensitization, README updates, dual-platform push, and packaging/indexing steps. If exit 3 occurs, follow the skill’s references/guide.md to write the decision JSON and re-run in the same Bash command.

Pack only, do not push

python "$SKILLS_DIR/git-sync/scripts/git-sync.py" git-sync --pack-only

Push only, do not package

python "$SKILLS_DIR/git-sync/scripts/git-sync.py" workday-calendar --push-only

Batch

python "$SKILLS_DIR/git-sync/scripts/git-sync.py" all

Trigger in Conversation

Suitable for when you clearly express publishing intent to the Agent, e.g., “Sync skill X to GitHub and Gitee”, “Publish to SkillHub / PyPI”, “Create Release”, “Full sync”. General git operations like “Help me check this file” or “Commit code with git” should not trigger this Skill.

Applicable Scenarios and Notes

Who it is for

  • Authors maintaining multiple Skills/Agents who need consistency across Gitee + GitHub dual remotes and occasionally publish to ClawHub, SkillHub, PyPI, or create Releases.
  • Those who want the workflow to enforce file whitelists and desensitization decisions before publishing instead of manual directory copying.

Limitations and Pitfalls

  • It is not a tool for daily feature branch merge/rebase synchronization with main. Other git-sync Skills with similar names have different responsibilities; verify the coordinate @user_800d68d6/git-sync when installing.
  • Git merge conflicts are not resolved automatically; manual intervention is required before re-running.
  • requires_api_key: Marketplace and Git hosting credentials must be configured manually, and ensure desensitization results meet compliance requirements.
  • The LLM handoff mechanism relies on a foreground session; decision file paths must use _paths.py to avoid infinite loops of repeated exit 3 caused by cross-command writing.
  • SkillHub page statistics (as of data capture): Rating 100000, Downloads ~3189; refer to the Skill Page for real-time data.

Conclusion

git-sync strings together “copy files → check version → desensitize → push to Git → publish to market → create Release” into a resumable chain, reducing repetitive labor across multiple platforms. For complete commands and subcommands, refer to the installed references/reference.md.

Official Address: https://www.skillhub.cn/skills/user_800d68d6/git-sync (API: https://api.skillhub.cn/user_800d68d6/git-sync).

羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye