dx-sync
Sync plugin updates to consumer repos — runs sync-consumers.sh with selected repos and options. Use when you say "sync plugins", "update consumers", "push to all repos".
- License 许可
- MIT
- 最近更新
- 2026-11-11
- Stars
- ★ 7
- Forks
- 3
01 前言 Front Matter
- name
- dx-sync
- description
- Sync plugin updates to consumer repos — runs sync-consumers.sh with selected repos and options. Use when you say "sync plugins", "update consumers", "push to all repos".
- when_to_use
- Use when syncing plugin updates to consumer repos. Trigger on 'sync plugins', 'update consumers', 'push to all repos', 'dx-sync', or when a plugin update needs to propagate to downstream projects.
- allowed-tools
- [ "read", "edit", "search", "write", "agent" ]
- argument-hint
- [--dry-run] [--parallel] [repo1 repo2 ...] — repo names from .ai/config.yaml repos:
- disable-model-invocation
- true
02 资源文件 3
- 脚本scripts/migrate-config.sh12.8 KB
- 脚本scripts/sync-ai-rules.test.sh3.2 KB
- 脚本scripts/sync-consumers.sh32.9 KB
03 SKILL.md 正文
You sync plugin updates to consumer AEM repos using the sync-consumers.sh script. Any consumer repo can run this skill — there is no hub. Repos are listed in .ai/config.yaml under repos:.
1. Locate Sync Script
The sync script lives in this skill's scripts directory:
SYNC_SCRIPT="${CLAUDE_SKILL_DIR}/scripts/sync-consumers.sh"
If it doesn't exist, try the repo root fallback:
SYNC_SCRIPT="$(git rev-parse --show-toplevel)/internal/sync-consumers.sh"
If neither exists, STOP: "sync-consumers.sh not found."
2. Show Consumer Repo Table
Read repos: from .ai/config.yaml. Present the available repos and their capabilities:
| Repo | Path | Base Branch | Work Branch | FE | BE |
|------|------|-------------|-------------|:--:|:--:|
| brand-a | ../Brand-A-Project | development | feature/ai-sync | Yes | No |
| backend | ../AEM-Backend | develop | feature/ai-sync | Yes | Yes |
| brand-b | ../Brand-B-Project | development | feature/ai-sync | Yes | No |
All repos come from the
repos:section in.ai/config.yaml. The current repo is excluded (you don't sync to yourself).
3. Parse Arguments
From $ARGUMENTS, extract:
- Flags:
--dry-run,--parallel,--no-git,--no-pr - Repos: Repo names from
.ai/config.yamlrepos:section - If no repos specified, defaults to all configured repos
If no arguments at all, ask: "Sync all repos? Or specify which ones (e.g., brand-a backend). Add --dry-run to preview."
4. Run Sync
bash "$SYNC_SCRIPT" $ARGUMENTS
The script handles:
- Merge
origin/<base-branch>into work branch - Copy utility scripts to
.ai/lib/ - Copy output templates to
.ai/templates/ - Generate Copilot agents (with dual tool names for Copilot CLI + VS Code Chat)
- Config migration (runs versioned migrations on the consumer's
.ai/config.yaml; updatesdx.versionto match the plugin version) - Sync Claude rules (
.claude/rules/) - Sync AI rules (
.ai/rules/) —pr-review.md/pr-answer.mdkeep the AEM sectionsaem-initappended (only the part before the first## AEM/## Slingheading is replaced) - Sync instructions (
.github/instructions/) - Sync VS Code MCP config (
.vscode/mcp.json— mirrors ADO/Atlassian from root.mcp.json) - Sync VS Code Chat settings (
.vscode/settings.json—chat.instructionsFilesLocations,chat.agentSkillsLocations) - Cleanup (remove rules not applicable to repo capabilities)
- Commit and push
- Create/update PR
5. Report Results
After the script completes, present:
## Sync Complete
| Repo | Status | PR |
|------|--------|-----|
| brand-a | synced | PR #<id> |
| backend | synced | PR #<id> |
| brand-b | synced | PR #<id> |
If --dry-run was used, note: "Dry run — no changes were made."
Rules
- Never run without user confirmation — always show the repo table and confirm before syncing
- Use --no-pr when needed — pass
--no-prto skip PR creation for specific runs - Dry-run first on uncertainty — if unsure about scope, suggest
--dry-runfirst - Read script output — the script reports per-step status; relay any errors to the user
- Runs from any consumer repo — reads repos from
.ai/config.yaml, syncs to sibling repos via relative paths
04 同仓库更多 Skills
dx-hub-status
Show hub dispatch status — which repos are running, done, blocked or failed. Use for 'hub status', 'what's running'.
dx-hub-init
Initialize a hub directory for multi-repo orchestration. Discovers sibling repos, merges configs, validates CLI compatibility. Use when setting up hub mode for the first time. Trigger on "init hub", "set up hub", "multi-repo setup".
dx-hub-dispatch
Dispatch a ticket to several repos — open an independent Claude session per repo in VS Code terminals. Use for 'hub dispatch', 'work on ticket across repos'.
dx-hub-config
View and edit hub configuration — add repos, adjust terminal delay. Use to manage hub settings. Trigger on "hub config", "add repo to hub", "terminal delay".
dx-discover-repos
Resolve which repos a work item touches (explicit directive → simple block → cross-repo table → LLM). Used by the KAI-HUB router to fan an agent out across repos; 'which repos'.
dx-upgrade
Upgrade a consumer project to the installed plugin versions — run dx-doctor, fix stale and missing files, list manual actions. Use after upgrading plugins.