بنقرة واحدة
sync-template
Pull latest repo-of-repos template updates into this workspace
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
Pull latest repo-of-repos template updates into this workspace
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
Create an implementation plan in _plans/ with embedded repo context and step-by-step task lists
Execute a plan from _plans/, implementing steps, checking off tasks, running tests, and documenting fixes
Clone/pull git repos, verify local folders, auto-register orphans, and regenerate repos.md
Clone a git repo or register a local folder into repos/ and update repos.md with its description
Find and remove stale entries from repos.yaml whose directories no longer exist on disk
Iterate through all sub-repos in repos/ and stage/commit/push each one, then do the same for the master repo
| name | sync-template |
| description | Pull latest repo-of-repos template updates into this workspace |
| user-invocable | true |
| origin | template |
Pull the latest repo-of-repos template changes into this workspace without overwriting project-specific content.
This workspace was created from the repo-of-repos template. The template evolves — new skills, improved agents, better docs. This skill brings those updates into your workspace while preserving your project-specific configuration.
The user may optionally specify:
/sync-template — use default upstream (raffertyuy/repo-of-repos, branch main)/sync-template <github-org/repo> — use a custom upstream fork/sync-template --branch <branch> — use a specific branchTEMPLATE_VERSIONTEMPLATE_VERSION file at the project root. If it doesn't exist, assume 0.0.0 (pre-versioned workspace).TEMPLATE_VERSION file:
gh api repos/<upstream>/contents/TEMPLATE_VERSION --jq '.content' | base64 -d
Clone the upstream template to a temporary directory:
git clone --depth 1 --branch <branch> https://github.com/<upstream>.git /tmp/repo-of-repos-upstream
Clean up this directory when done (in the final step).
Read TEMPLATE_CHANGELOG.md from the upstream clone. Identify all versions between the local version and the upstream version. This tells you:
.gitignore strategy change)Present a summary to the user before proceeding: which versions will be applied and what the key changes are.
These are framework files with no project-specific content. Copy them directly from the upstream clone, overwriting local versions:
| Path | What |
|---|---|
.claude/skills/*/SKILL.md | All skill definitions |
.claude/agents/*.md | Agent definitions |
.claude/prompt-snippets/*.md | Shared prompt snippets |
.claude/rules/*.md | Auto-applied rules |
.github/agents/*.md | Copilot agent mirrors |
.github/instructions/*.instructions.md | Copilot instruction mirrors |
_plans/README.md | Plan system docs |
docs/*.md | Reference documentation |
New files: If the upstream has new skills, agents, rules, or prompt snippets that don't exist locally, create them (including any new directories). When creating skill or agent files, ensure the origin: template frontmatter field is present (copy it from upstream as-is).
Removed template files: Some skills or agents may have been removed from the template (e.g., /create-task and /list-tasks were removed in v0.5.0). To detect these:
.claude/skills/*/SKILL.md and .claude/agents/*.md for files that have origin: template in their frontmatterorigin: template file is NOT present in upstream → it was intentionally removed from the templateThe following template-owned skills/agents no longer exist in the upstream template:
- .claude/skills/create-task/SKILL.md
- .claude/skills/list-tasks/SKILL.md
Delete these? [y/N]
origin: template are project-custom — never touch themThese files contain both template content and project-specific content. You (the agent) are the merge tool. For each file:
CLAUDE.md is the most complex merge target. Live projects customize it heavily — different persona, project-specific architecture, custom coding standards, additional sections. The template evolves its framework sections independently.
Classify every section as one of:
| Classification | What it means | Merge strategy |
|---|---|---|
| Template-owned | Section exists in both template and local, content is purely framework | Replace with upstream version |
| Template-seeded, project-customized | Section originated from template but the project has modified it | Three-way merge (see below) |
| Project-only | Section exists only in the local file | Preserve as-is, keep in its current position |
Template-owned sections (replace with upstream):
CLAUDE.md / AGENTS.md / copilot-instructions.md)repos.yaml description paragraph)Template-seeded sections that projects commonly customize (three-way merge):
Do NOT rules) — append those to the local version.Three-way merge procedure:
<!-- sync-template: upstream also changed this section — review manually -->Project-only sections — Anything in the local CLAUDE.md that has no counterpart in the upstream template. Common examples:
These must be preserved in their current position in the file. If an upstream update adds a new template section, insert it in the correct position relative to other template sections, but never displace project-only sections.
Section ordering: Follow the upstream's section order for template sections. Project-only sections stay where the user placed them. If a project-only section is between two template sections, keep it between them (or at the end if the surrounding template sections were reordered).
First-line / title: The local CLAUDE.md may have a different title or opening line (e.g., # aws-mk0 instead of # CLAUDE.md). Preserve the local title.
README.md is the public face of the project. Live projects replace the template description, customize the project tree, add project-specific sections, and may remove template sections that don't apply.
Classify every section as one of:
| Classification | What it means | Merge strategy |
|---|---|---|
| Template-owned | Pure framework documentation | Replace with upstream version |
| Template-seeded, project-customized | Originated from template, modified by project | Three-way merge |
| Project-only | Exists only in the local file | Preserve as-is |
| Template-removed | Exists in template but project intentionally deleted it | Do NOT re-add |
Template-owned sections (replace with upstream):
Template-seeded sections that projects commonly customize (three-way merge):
.claude/, .github/, _plans/, docs/, etc.) if the upstream added new files or directories to those paths. Never remove project-specific tree entries.Detecting intentionally removed sections:
If a template section exists in the upstream but NOT in the local README, the project likely removed it intentionally. Do NOT re-add it. Instead, note it in the sync report:
| Further Reading | Skipped (not present locally — likely intentionally removed) |
If unsure whether removal was intentional, ask the user before re-adding.
Three-way merge procedure: Same as CLAUDE.md (see above).
Section ordering: Follow the local file's ordering. If upstream introduces a new section, insert it in a logical position relative to existing sections.
repos/*/ → per-repo entries), generate the correct entries based on the current repos/repos.yamlWrite the upstream version string to the local TEMPLATE_VERSION file.
rm -rf /tmp/repo-of-repos-upstream## Template Sync: v0.2.0 → v0.3.0
### Files updated
| File | Action |
|------|--------|
| `.claude/skills/pull-all-repos/SKILL.md` | Copied from upstream |
| `CLAUDE.md` | Merged (added "Git vs Local Entries" section) |
| `.gitignore` | Merged (switched to per-repo entries) |
| ... | ... |
### New files
- `.claude/skills/sync-template/SKILL.md`
### Removed files
- `.claude/skills/create-task/` *(template skill removed in v0.5.0)*
- `.claude/skills/list-tasks/` *(template skill removed in v0.5.0)*
### Key changes
- Local source folder support (see TEMPLATE_CHANGELOG.md for details)
### Next steps
- Review the changes with `git diff`
- Commit when satisfied: `/commit`
origin: template in frontmatter AND are absent from upstream (and even then, always confirm with user first)origin: template are project-custom — ignore them entirely during syncorigin: template frontmatter field (it will already be there — don't strip it)repos/repos.md, repos/*/, _plans/*.plan.md (user plans), .claude/settings*.json, .mcp.json, .vscode/mcp.json