AgentSkillsCN

inspiration-sync

从上游灵感来源同步内容。 更新已追踪的副本与提交哈希。

SKILL.md
--- frontmatter
name: inspiration-sync
version: 1.0.0
description: |
  Sync content from upstream inspiration sources.
  Updates the tracked copy and commit hash.
allowed-tools:
  - Shell
  - Read
  - Write
  - StrReplace

Inspiration Sync

Sync content from an upstream source in inspiration/.

Usage

Tell me which inspiration source to sync:

  • sync ghuntley-loom
  • sync cursor-scaling-agents
  • Or any other inspiration/{source}/ folder with a _SOURCE.md tracking file

Process

  1. Read the source tracking file at inspiration/{source}/_SOURCE.md to get:

    • Source URL (GitHub repo)
    • Branch
    • Current commit hash
    • File mapping (which upstream files map to which local files)
  2. Fetch the latest commit hash from the source repo:

    bash
    git ls-remote https://github.com/OWNER/REPO.git HEAD | cut -f1
    
  3. Compare hashes — If same and not forced, report "Already up to date."

  4. If different, fetch updated content:

    bash
    curl -s https://raw.githubusercontent.com/OWNER/REPO/BRANCH/path/to/file.md
    
  5. Preserve local headers — Each synced file may have local additions at the top (title, source link, tracking info). Preserve these and replace only the upstream content below.

  6. Update the commit hash in _SOURCE.md.

  7. Report what changed (new hash, which files updated).

Source Tracking File Format

Each inspiration source should have _SOURCE.md:

markdown
# Source Information

- **Source**: https://github.com/OWNER/REPO
- **Branch**: main
- **Commit**: abc123...
- **Synced at**: 2026-01-15T10:30:00Z

## File Mapping

| Local File | Upstream Path |
|------------|---------------|
| LOOM_CASE_STUDY.md | README.md |
| LOOM_SUMMARY.md | (local only) |

## Notes

Any special handling instructions.

Local Header Convention

Synced files preserve a local header (first ~7 lines):

markdown
# Title

Source: [Original Name](https://github.com/owner/repo)

Tracked copy of the original. Check the source for updates.

**Last synced from source:** `COMMIT_HASH`

Everything after the header comes from upstream.

Examples

Sync a specific source:

code
Sync the ghuntley-loom inspiration source

Force sync even if hashes match:

code
Force sync cursor-scaling-agents

Check all sources for updates:

code
Check which inspiration sources have upstream updates