.ai/skills/port-imageeditor/SKILL.md
Use the local ShareX checkout as the source of truth for ShareX.ImageEditor, find the latest upstream commit that touches it, and port or sync the matching changes into the XerahS ShareX.ImageEditor submodule with path-aware diffing and build gates.
npx skillsauth add sharex/xerahs port-imageeditorInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Use this workflow whenever XerahS needs to catch up with the current ShareX.ImageEditor
state from the local ShareX repo.
Do not clone ShareX again. The local ShareX checkout is the upstream reference:
| Role | Path |
|------|------|
| Upstream ShareX repo | C:\Users\liveu\source\repos\ShareX Team\ShareX |
| Upstream source tree | C:\Users\liveu\source\repos\ShareX Team\ShareX\ShareX.ImageEditor |
| XerahS root | C:\Users\liveu\source\repos\ShareX Team\XerahS |
| XerahS ImageEditor repo | C:\Users\liveu\source\repos\ShareX Team\XerahS\ShareX.ImageEditor |
| XerahS ImageEditor code root | C:\Users\liveu\source\repos\ShareX Team\XerahS\ShareX.ImageEditor\src\ShareX.ImageEditor |
Hardcoded local paths are intentional here. They make this workflow faster and more reliable.
ShareX\ShareX.ImageEditor\...; the target code lives at XerahS\ShareX.ImageEditor\src\ShareX.ImageEditor\....src/ layout, multi-targeting, and any confirmed host integration changes.git -C "C:\Users\liveu\source\repos\ShareX Team\ShareX" status --short
git -C "C:\Users\liveu\source\repos\ShareX Team\ShareX" branch --show-current
git -C "C:\Users\liveu\source\repos\ShareX Team\ShareX" rev-parse HEAD
The repo is expected to already be pulled locally. Use the checked-out branch as the default upstream branch unless the user requests a different ref.
ShareX.ImageEditorgit -C "C:\Users\liveu\source\repos\ShareX Team\ShareX" `
log -1 --format="%H %cs %s" -- ShareX.ImageEditor
This is the latest relevant upstream commit. Record it.
Read C:\Users\liveu\source\repos\ShareX Team\XerahS\ShareX.ImageEditor\PORT_STATUS.md.
Expected fields:
ShareX.ImageEditor commit: <hash>XerahS submodule last synced to: <hash>If the file is missing or stale, derive the baseline from repo history and note the assumption in the final update.
git -C "C:\Users\liveu\source\repos\ShareX Team\ShareX" `
log --reverse --oneline <last_synced_sharex_hash>..HEAD -- ShareX.ImageEditor
Use this list to decide whether the catch-up is:
Do not treat this commit list as a queue for blind cherry-picks. Use it as a review list for semantic porting. Read the whole queue from oldest to newest so you understand how fixes and features build on each other.
The ShareX tree and XerahS submodule do not have the same repository layout.
| Upstream path | Target path |
|---------------|-------------|
| ShareX.ImageEditor\Assets\... | ShareX.ImageEditor\src\ShareX.ImageEditor\Assets\... |
| ShareX.ImageEditor\Core\... | ShareX.ImageEditor\src\ShareX.ImageEditor\Core\... |
| ShareX.ImageEditor\Hosting\... | ShareX.ImageEditor\src\ShareX.ImageEditor\Hosting\... |
| ShareX.ImageEditor\Presentation\... | ShareX.ImageEditor\src\ShareX.ImageEditor\Presentation\... |
| ShareX.ImageEditor\ShareX.ImageEditor.csproj | ShareX.ImageEditor\src\ShareX.ImageEditor\ShareX.ImageEditor.csproj |
Do not diff the upstream folder against the submodule repo root. Always diff it against
src\ShareX.ImageEditor.
git -C "C:\Users\liveu\source\repos\ShareX Team\ShareX" `
diff --name-only <last_synced_sharex_hash>..HEAD -- ShareX.ImageEditor
git -C "C:\Users\liveu\source\repos\ShareX Team\ShareX" `
show --stat --summary --oneline <sharex_commit>
Also inspect the actual patch for behavior-critical commits:
git -C "C:\Users\liveu\source\repos\ShareX Team\ShareX" `
show <sharex_commit> -- ShareX.ImageEditor
For a real catch-up, do this for every commit in the pending range from the last synced hash to the newest relevant hash. Summarize for yourself:
If the commit message or patch alone is not enough, read the upstream implementation files and the current XerahS counterparts before editing.
Typical files to inspect:
.csproj for new files or assetsFor each changed upstream file ShareX.ImageEditor\<relative_path> compare it to:
C:\Users\liveu\source\repos\ShareX Team\XerahS\ShareX.ImageEditor\src\ShareX.ImageEditor\<relative_path>.
If the target file does not exist, it is a net-new addition and therefore high risk.
You may replace the target file with the upstream version when all of these are true:
Core/, Presentation/, Hosting/, or Assets/ and maps cleanly into src/ShareX.ImageEditorPort the intent instead of copying the whole file when any of these are true:
Manual porting usually means:
Keep these unless the user explicitly asks to change them:
src/ShareX.ImageEditor repository layoutFor each new upstream file:
src/ShareX.ImageEditor..csproj only if the new file requires an explicit item entry.cd "C:\Users\liveu\source\repos\ShareX Team\XerahS"
dotnet build "ShareX.ImageEditor\src\ShareX.ImageEditor\ShareX.ImageEditor.csproj" -m:1
If it stalls, stop it before 5 minutes and clear the lock before retrying.
cd "C:\Users\liveu\source\repos\ShareX Team\XerahS"
dotnet build "src\desktop\XerahS.sln" -m:1
This must finish with 0 errors before any push.
After the catch-up:
C:\Users\liveu\source\repos\ShareX Team\XerahS\ShareX.ImageEditor\PORT_STATUS.mdSuggested status block:
## Port Activity (2026-04-09)
- Previous recorded ShareX sync: `<old_hash>`
- Latest upstream ShareX commit touching ShareX.ImageEditor: `<new_hash>`
- Result: `Caught up through <new_hash>`
- Notes: `<manual adaptations or intentional skips>`
The submodule is a shared library repo, so submodule commits do not use the XerahS version prefix.
Use:
[ShareX.ImageEditor] [Port] <description> from ShareX@<hash>
Then update the XerahS root repo to point to the new submodule commit.
After verification succeeds:
ShareX.ImageEditor submodule changes.XerahS.Do not stop after a local commit unless the user explicitly asks to pause before push.
For the common "catch up XerahS to the latest local ShareX state" task:
PORT_STATUS.md to get the last synced ShareX hash.git -C <sharex_repo> log -1 --format="%H %cs %s" -- ShareX.ImageEditor.git -C <sharex_repo> diff --name-only <last_sync>..HEAD -- ShareX.ImageEditor.XerahS\ShareX.ImageEditor\src\ShareX.ImageEditor.PORT_STATUS.md, then commit and push the submodule and root pointer separately.testing
Reference for writing effective XerahS Improvement Proposals (XIPs), including structure, templates, review checks, and implementation patterns. Use sync-xips for creating, editing, and syncing XIP GitHub issues and local backups.
documentation
Rules and workflows for updating docs/CHANGELOG.md, including version grouping, consolidation, and commit-entry attribution.
testing
Create and maintain XerahS Improvement Proposals (XIPs) with GitHub as source of truth and docs/proposals/xip folder as backup. Use when creating or editing XIPs, syncing XIPs between GitHub issues and the docs/proposals/xip folder, or when the user mentions XIP, GitHub issues for XIP, or local XIP files.
documentation
Repository maintenance preparation for XerahS. Use before release or changelog work to sync repositories, inspect submodule state, identify version/changelog needs, and hand off commit/push/version rules to git-workflow.