$npx -y skills add kanyun-inc/reskill --skill skill-sync-checkerDetects content drift between skill files and their source documents. Helps maintain skills that are derived from other documentation by comparing content and flagging outdated sections.
| 1 | # Skill Sync Checker |
| 2 | |
| 3 | A utility skill that detects when skill content has drifted from its source documents. Any skill file that includes a `<!-- source: path/to/file -->` marker can be checked for freshness and updated accordingly. |
| 4 | |
| 5 | ## When to Use This Skill |
| 6 | |
| 7 | ### User-Initiated (Agent Requested) |
| 8 | |
| 9 | Use this skill when the user: |
| 10 | |
| 11 | - Asks to check if a skill's content is up to date |
| 12 | - Has modified source documentation and wants to sync derived skills |
| 13 | - Is preparing a skill for publishing and wants to verify freshness |
| 14 | - Asks "is this skill still accurate?" or "has the source changed?" |
| 15 | - Performs routine maintenance on skills |
| 16 | |
| 17 | ### Auto-Triggered (via Cursor globs) |
| 18 | |
| 19 | This skill is automatically injected into context when the user edits `README.md` (configurable via `.cursor/rules/skill-sync-checker.mdc` globs). |
| 20 | |
| 21 | When auto-triggered, follow this lightweight flow: |
| 22 | |
| 23 | 1. Scan `skills/**/SKILL.md` for `<!-- source: ... -->` markers referencing the file being edited |
| 24 | 2. If a match is found, **briefly remind** the user that a skill depends on this file and may need syncing |
| 25 | 3. Do **not** automatically run the full detection workflow or modify any files — just notify |
| 26 | |
| 27 | Example notification: |
| 28 | |
| 29 | ``` |
| 30 | Note: skills/reskill-usage/SKILL.md is derived from README.md (last synced: 2026-02-12). |
| 31 | If your changes affect CLI commands, options, or usage examples, the skill may need updating. |
| 32 | Run a sync check when you're done editing. |
| 33 | ``` |
| 34 | |
| 35 | ## Source Marker Convention |
| 36 | |
| 37 | Skill files that are derived from other documents should include source markers as HTML comments at the top of the file (before or after the YAML frontmatter): |
| 38 | |
| 39 | ```markdown |
| 40 | <!-- source: README.md --> |
| 41 | <!-- synced: 2026-02-11 --> |
| 42 | |
| 43 | --- |
| 44 | name: my-skill |
| 45 | description: ... |
| 46 | --- |
| 47 | |
| 48 | # My Skill |
| 49 | ... |
| 50 | ``` |
| 51 | |
| 52 | ### Marker Format |
| 53 | |
| 54 | | Marker | Required | Description | |
| 55 | | ------------------------- | -------- | ---------------------------------------------------- | |
| 56 | | `<!-- source: <path> -->` | Yes | Relative path to the source file (from project root) | |
| 57 | | `<!-- synced: <date> -->` | No | ISO date of last sync (YYYY-MM-DD) | |
| 58 | |
| 59 | A file can have **multiple source markers** if it derives from several documents: |
| 60 | |
| 61 | ```markdown |
| 62 | <!-- source: README.md --> |
| 63 | <!-- source: docs/cli-spec.md --> |
| 64 | <!-- synced: 2026-02-11 --> |
| 65 | ``` |
| 66 | |
| 67 | ### Where to Place Markers |
| 68 | |
| 69 | - Place source markers at the very top of the file |
| 70 | - If the file has YAML frontmatter (`---`), markers can go before or after it |
| 71 | - Markers are HTML comments and will not render in the skill content |
| 72 | |
| 73 | ## Detection Workflow |
| 74 | |
| 75 | When asked to check a skill for sync status, follow these steps: |
| 76 | |
| 77 | ### Step 1: Find Source Markers |
| 78 | |
| 79 | Scan all `.md` files in the target skill directory. For each file, look for `<!-- source: ... -->` comments. Files without source markers are original content and can be skipped. |
| 80 | |
| 81 | ### Step 2: Read Source Files |
| 82 | |
| 83 | For each source marker, read the referenced file. If the source file does not exist, report it as an error — the source may have been moved or deleted. |
| 84 | |
| 85 | ### Step 3: Compare Content |
| 86 | |
| 87 | Compare the skill file against its source document(s). Focus on **structural and factual differences**, not formatting: |
| 88 | |
| 89 | **Key things to check:** |
| 90 | - Commands, options, or features mentioned in the source but missing from the skill |
| 91 | - Commands, options, or features in the skill that no longer exist in the source |
| 92 | - Changed default values, paths, or configuration formats |
| 93 | - New sections in the source that should be reflected in the skill |
| 94 | - Deprecated or removed functionality still mentioned in the skill |
| 95 | |
| 96 | **Ignore:** |
| 97 | - Minor wording differences (the skill may rephrase for agent consumption) |
| 98 | - Formatting differences (tables vs lists, heading levels) |
| 99 | - Content the skill intentionally omits (internal details, development docs) |
| 100 | - Order of sections |
| 101 | |
| 102 | ### Step 4: Report Results |
| 103 | |
| 104 | Present findings in a clear summary: |
| 105 | |
| 106 | ``` |
| 107 | Sync Check: skills/reskill-usage/SKILL.md |
| 108 | Source: README.md |
| 109 | Last synced: 2026-02-11 |
| 110 | |
| 111 | Status: ⚠ Out of sync |
| 112 | |
| 113 | Differences found: |
| 114 | 1. New command `find` added in source (missing from skill) |
| 115 | 2. Option `--registry` added to `install` command |
| 116 | 3. New agent "Gemini" added to Multi-Agent Support table |
| 117 | |
| 118 | Recommendation: Update the skill to reflect these changes. |
| 119 | ``` |
| 120 | |
| 121 | If everything is in sync: |
| 122 | |
| 123 | ``` |
| 124 | Sync Check: skills/reskill-usage/SKILL.md |
| 125 | Source: README.md |
| 126 | Last synced: 2026-02-11 |
| 127 | |
| 128 | Status: ✓ In sync |
| 129 | |
| 130 | No significant differences found. |
| 131 | ``` |
| 132 | |
| 133 | If the `<!-- synced: ... -->` marker is absent, report "Last synced: unknown": |
| 134 | |
| 135 | ``` |
| 136 | Sync Check: skills/example/SKILL.md |
| 137 | Source: docs/example-spec.md |
| 138 | Last synced: unknown |
| 139 | |
| 140 | Status: ⚠ Out of sync |
| 141 | ... |
| 142 | ``` |
| 143 | |
| 144 | ## Upda |