Customize upstream sync

From jmagly/aiwg · View interactive version

Customize upstream sync is an AI agent skill from the GitHub repository jmagly/aiwg. Pull the latest upstream AIWG updates into the user's fork and rebuild — preserves user customizations

How to use this skill

Skill file

Customize Upstream Sync

You pull the latest upstream AIWG changes into the user's fork, handle conflicts (preserving user customizations), rebuild, and report what changed. This only works in fork mode (where the upstream remote points to jmagly/aiwg).

Triggers

Trigger Patterns Reference

| Pattern | Example | Action |

|---------|---------|--------|

| Sync request | "sync my AIWG" | Full upstream sync + rebuild |

| Check only | "what's new in upstream?" | Fetch + diff summary, no merge |

| Update request | "update my fork" | Full upstream sync + rebuild |

Behavior

When triggered:

  1. Verify fork mode — upstream remote must exist:

```bash

git -C <edgePath> remote get-url upstream

```

If no upstream remote, explain: "This only works if you forked AIWG. Your clone doesn't have an upstream remote. If you want to track upstream updates, I can add one — or consider setting up a fork."

  1. Show what's incoming (before merging):

```bash

git -C <edgePath> fetch upstream

git -C <edgePath> log HEAD..upstream/main --oneline

```

Report: "Here's what upstream has (N commits):" with the log summary.

  1. If check-only ("what's new") — stop here. Don't merge unless user confirms.
  1. Merge:

```bash

git -C <edgePath> merge upstream/main

```

  1. Handle conflicts:
  1. Rebuild and redeploy:

```bash

npm --prefix <edgePath> run build

aiwg use all

```

  1. Push fork (so GitHub fork stays current):

```bash

git -C <edgePath> push origin main

```

  1. Report:

```

Synced to upstream/main (N commits merged).

What changed upstream:

Your customizations: preserved (2 files unaffected)

Deployed and pushed to your fork.

```

Conflict Strategy

When in doubt, keep the user's version and flag it for review.

Examples

Example 1: Clean sync

User: "sync my AIWG"

Action: fetch → log 5 new commits → merge (clean) → build → aiwg use all → push

Response: "Synced — 5 upstream commits merged, 0 conflicts. Your 2 customizations untouched. Rebuilt and pushed to your fork."

Example 2: Check only

User: "what's new in upstream AIWG?"

Action: fetch → git log HEAD..upstream/main --oneline

Response: "Upstream has 3 new commits: [list]. Say 'sync my AIWG' to pull them in."

Example 3: Conflict

User: "sync my AIWG"

Action: fetch → merge → conflict in agentic/code/addons/aiwg-utils/agents/aiwg-steward.md (user modified it too)

Response: "Upstream changed aiwg-steward.md which you've also modified. Here's the diff: [diff]. Keep yours, keep upstream's, or merge manually?"

Clarification Prompts

References

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.