agentleFS
mmungdongmmungdong/skills/.agents/skills/skill-sync/SKILL.md

skill-sync

Skill1 starsChanged 2 months agoApache-2.0View on GitHub

检查本项目中外部 skill 引用是否为最新。扫描所有 install_reference.md 文件,从 GitHub 获取最新状态,与本地记录对比,并可选地更新本地记录。适用于检查 skill 更新、查看外部 skill 仓库的变化,或同步本地引用。

  • Deletes or force-pushes

13 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use brainstorming.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • OpenAISkill

    brainstorming

    You MUST use this before any creative work - creating features, building components, adding functionality, or modifying behavior. Explores user intent, requirements and design before implementation.

    Also in 3 projects that use this

The file

We split this skill into the rules it gives an agent

8 rules. 0 are common, 7 are distinctive, and 1 is very specific to this project.

  • 0

    Common

    Most of the 10 edited versions we read keep these.

  • 7

    Distinctive

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    If gh CLI is not available or returns an error, automatically fall back to shallow clone.

    line 68
  2. Distinctive:

    Keep the existing Chinese text when the upstream meaning has not changed

    line 86
  3. Distinctive:

    Write new or meaningfully changed descriptions in Simplified Chinese

    line 87
  4. Distinctive:

    Never replace a localized Chinese description with raw upstream English

    line 88
  5. Distinctive:

    If no diffs found, report: "All skill references are up-to-date."

    line 109
  6. Distinctive:

    If diffs exist, ask:

    line 113
  7. Distinctive:

    If shallow clone was used, ensure temp directory is removed:

    line 134
  8. Distinctive:

    Always preserve the "已集成" (❌/✅) status when updating — this is manually maintained by the user

    line 142

“Common” is measured: kept by at least 6 in 10 of the 10 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Skill Sync

Overview

Scan all referenced skill repositories in this project, check for updates on GitHub, show diffs, and optionally update local install_reference.md files.

Trigger

"检查 skill 更新", "看看外部 skill 有没有变化", "sync skills", "check skill updates"

Process

1. Scan All install_reference.md Files

Find every install_reference.md in the project:

find ./github ./skills -name "install_reference.md" -type f

This covers both:

  • github/<user>/<repo>/install_reference.md — external repos not yet integrated into workspace
  • skills/<category>/<skill>/install_reference.md — referenced skills already under management

2. Parse Source Repo URL

For each install_reference.md, extract the source repo URL from the **来源** or **Source** line:

grep -E '\*\*来源\*\*|\*\*Source\*\*' install_reference.md

Example output: https://github.com/mattpocock/skills

Convert to owner/repo format: mattpocock/skills

3. Fetch Latest State from GitHub

Primary method: gh CLI

# Get repo default branch
gh repo view <owner/repo> --json defaultBranchRef -q '.defaultBranchRef.name'

# Get directory listing of skills folder
gh api repos/<owner/repo>/contents/skills --jq '.[].name'

# Get each skill's SKILL.md frontmatter for name and description
gh api repos/<owner/repo>/contents/skills/<skill-name>/SKILL.md --jq '.content' | base64 -d | head -10

Fallback: shallow clone

TMPDIR="/tmp/skill-sync-$(date +%s)"
git clone --depth 1 https://github.com/<owner/repo>.git "$TMPDIR"
# Read skill directories and SKILL.md files from $TMPDIR
rm -rf "$TMPDIR"

If gh CLI is not available or returns an error, automatically fall back to shallow clone.

4. Compare Local vs Remote

Parse the local install_reference.md skill list (the tables under each category heading).

For each remote skill, compare against local records:

  • 🆕 New: Skill exists in remote but not in local install_reference.md
  • 📝 Changed: Skill exists in both but description differs
  • ❌ Removed: Skill exists in local but not in remote
  • ✅ Unchanged: Skill exists in both and description matches

Description Localization

Preserve the language already used by each local skill table. For a table whose descriptions are in Simplified Chinese, such as github/mattpocock/skills/install_reference.md:

  • Translate upstream descriptions into Simplified Chinese before comparison
  • Compare the translated description with the local Chinese description; do not flag a change solely because the upstream source is English
  • Keep the existing Chinese text when the upstream meaning has not changed
  • Write new or meaningfully changed descriptions in Simplified Chinese
  • Never replace a localized Chinese description with raw upstream English

5. Display Diff

Show results grouped by source repo:

## github/mattpocock/skills

🆕 New skills:
  - new-skill: Description of the new skill

📝 Changed:
  - tdd: "old desc" → "new desc"

❌ Removed:
  - deprecated-skill

✅ 15 skills unchanged

If no diffs found, report: "All skill references are up-to-date."

6. Ask User Whether to Update

If diffs exist, ask:

发现以上差异,是否更新本地的 install_reference.md?

  1. 全部更新
  2. 选择性更新
  3. 跳过

For selective update, let user pick which changes to apply.

7. Update install_reference.md

Rewrite the install_reference.md file with updated skill list, preserving the "已集成" column status (❌/✅ values must not change for existing skills). New skills default to ❌.

Preserve the table's existing description language. Translate new or changed upstream descriptions into that language before writing them.

Maintain the original format:

  • Category headings (### engineering, etc.)
  • Tables with columns: Skill | Description | 已集成

8. Cleanup

If shallow clone was used, ensure temp directory is removed:

rm -rf /tmp/skill-sync-*

Important Notes

  • Always preserve the "已集成" (❌/✅) status when updating — this is manually maintained by the user
  • New skills added from remote default to ❌ (not integrated)
  • For collection repos (like mattpocock/skills with sub-categories), maintain the same category structure as the remote repo
  • Handle rate limiting: if gh CLI returns 403/429, fall back to shallow clone

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.