sync-template
/sync-template
Syncs the .claude/ directory from an upstream template repository, showing a diff and applying new or modified files without overwriting local customizations. Use when updating SDD template files or when the user mentions template sync or upstream update.
- Author
- tranhieutt ↗
- Repository
- software_development_department ↗
- Licence
- MIT
- Last repository change
- 15.05.2026
Assessment and security
- Files in this package
- 1
- Scripts
- 0
- HTML comments
- 0
- URLs in SKILL.md
- 1
No signals detected. Repository changed on 15.05.2026, without references to retired models or APIs.
MIT, open: use and modify while retaining author attribution.
What it does and when to use it
Syncs the .claude/ directory from an upstream template repository, showing a diff and applying new or modified files without overwriting local customizations. Use when updating SDD template files or when the user mentions template sync or upstream update.
Original author description
Syncs the .claude/ directory from an upstream template repository, showing a diff and applying new or modified files without overwriting local customizations. Use when updating SDD template files or when the user mentions template sync or upstream update.
How it works
- Determine the upstream URL
- Steps
- Important constraints
SKILL.md preview
--- name: sync-template type: workflow description: "Syncs the .claude/ directory from an upstream template repository, showing a diff and applying new or modified files without overwriting local customizations. Use when updating SDD template files or when the user mentions template sync or upstream update." argument-hint: "[upstream-repo-url]" user-invocable: true allowed-tools: Read, Bash, Glob effort: 3 when_to_use: "Use when updating the .claude/ directory from an upstream SDD template repository, or when the user mentions template sync or upstream update." --- Sync the `.claude/` directory from an upstream template repository into this project. ## Determine the upstream URL If `$ARGUMENTS` is provided, use it as the upstream repository URL. If `$ARGUMENTS` is empty, check `CLAUDE.md` for a line like: ```text **Template upstream**: <url> ``` If no URL is found in either place, ask the user: > "What is the upstream template repository URL to sync from? (e.g. https://github.com/owner/repo)" Do not proceed until a URL is confirmed. --- ## Steps ### 1. Fetch the upstream template Run: ```bash SYNC_TMP=$(mktemp -d /tmp/template-sync-XXXXXX) git clone --filter=blob:none --sparse "$UPSTREAM_URL" "$SYNC_TMP" 2>&1 cd "$SYNC_TMP" && git sparse-checkout set .claude ``` If the clone fails (no internet, repo moved, auth required, etc.) stop immediately and report the error clearly. Do not attempt fallbacks. ### 2. Show a diff summary Compare `$SYNC_TMP/.claude/` against the project's `.claude/` directory and report: - **New files** — present in upstream but not locally (will be added) - **Modified files** — present in both but with different content (will be overwritten) - **Local-only files** — present locally but not in upstream (will be **kept unchanged** — these are project-specific customizations) If there are no differences, say so and skip to clean-up. ### 3. Ask for confirmation Present the diff summary and ask: > "Apply these changes from `<upstream-url>`? Type **yes** to apply or **no** to cancel." Do not proceed until the user explicitly confirms with "yes". ### 4. Apply the changes From the project root, run: ```bash cp -r "$SYNC_TMP/.claude/." .claude/ ``` This will: - **Overwrite** files that exist in both upstream and locally - **Add** new files from upstream - **Preserve** all local-only files (project-specific agents, skills, rules, hooks) ### 5. Report List each file that was added or updated, grouped by type: - Added: `[file list]` - Updated: `[file list]` ### 6. Clean up ```bash rm -rf "$SYNC_TMP" ``` Confirm: "Sync complete. Temp directory removed." --- ## Important constraints - Never delete local files that don't exist in upstream — they may be project-specific customizations (agents, skills, rules, hooks added after the template was cloned) - Never modify `CLAUDE.md`, `PRD.md`, `TODO.md`, or any files outside `.claude/` — this skill only touches `.claude/` - If the user's `.claude/` has meaningful customizations to a file that upstream has also changed, flag it specifically: "Note: `[file]` was modified locally — upstream changes will overwrite. Review diff before confirming if you want to preserve local changes."
Versions
The database has no other skills named sync-template.
Database snapshot: 13.11.2026 · package version f9a8c6ad4dbe (SHA-256 digest of the entire package)
Downloads in the last 30 days: 0 · ranking
Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.
Similar skills
- 90update-rules
This skill should be used when the user asks to \"update rules\", \"sync rules\", \"update AGENTS.md\", \"update CLAUDE.md\", \"refresh rules\", \"update project config\", \"sync templates\", \"update vibe rules\", \"check for rule updates\", \"update user rules\", \"update… - 100aped-claude
Use when user says "update CLAUDE.md", "sync claude rules", "aped claude", or invokes aped-claude. Merges — never overwrites user customizations. - 90nf-core-template-sync-repair
Repair a broken or polluted nf-core TEMPLATE branch by resetting it to the initial template commit and re-syncing. Use when template syncs conflict with the whole pipeline, when pipeline code has leaked into TEMPLATE, or when a sync PR shows an implausible diff. - 100nav-sync-claude
Sync project CLAUDE.md to the installed Navigator version, preserving customizations. Use when user says "sync CLAUDE.md", "update CLAUDE.md", or when detecting outdated Navigator configuration. - 100nav-sync-claude
Sync project CLAUDE.md to the installed Navigator version, preserving customizations. Use when user says "sync CLAUDE.md", "update CLAUDE.md", or when detecting outdated Navigator configuration. - 100clean-code-update
Re-sync the clean-* skill family against its upstream source repository, reporting what changed upstream and merging it without losing the local adaptations. Use when asked to "update my clean code skill(s)", re-sync clean code rules, or check whether the upstream clean-code-skills repo has changed.