.ai/skills/architecture-guidelines/SKILL.md
Platform abstraction rules, porting guidelines, and architecture standards for XerahS
npx skillsauth add sharex/xerahs ShareX Architecture and PortingInstall 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.
All platform specific functionality must be isolated behind platform abstraction interfaces.
No code outside XerahS.Platform.* projects may reference:
Direct calls to Windows APIs are forbidden in Common, Core, Uploaders, Media, or other backend projects.
Define platform neutral interfaces in XerahS.Platform.Abstractions.
Implement Windows functionality in XerahS.Platform.Windows.
Create stub implementations for future platforms:
If a capability is Windows only:
UI and workflows must detect capability availability and disable or hide unsupported features.
A file may only be ported directly if it contains zero references to:
If a file mixes logic and native calls:
Native method names and signatures should remain Windows specific and must not leak into shared layers.
When porting ShareX.HelpersLib, files that reference:
must be treated as platform code and cannot be copied wholesale.
C:\Users\liveu\source\repos\ShareX Team\ShareX to understand existing non-UI logic and reuse it by copying into this repo after the Avalonia solution and projects are drafted.XerahS.Common: shared helpers, serialization, utilities.XerahS.Core: task settings, workflows, application-level services.XerahS.Uploaders: uploaders, config, OAuth, HTTP helpers.XerahS.History: history models and persistence.XerahS.Indexer: file indexing and search.XerahS.ImageEffects: filters/effects pipeline.XerahS.Media: encoding, thumbnails, FFmpeg integration.XerahS.ScreenCapture: capture engines and platform abstractions.XerahS.Platform.*: OS-specific implementations (Windows first, others later).XerahS.App and XerahS.UI: Avalonia UI and view models (defer until backend is ready).When asked to ensure feature parity with a specific historical commit or "make it identical to commit X":
ref directory: Create a temporary folder (e.g., src/XerahS/ref).git show <commit_hash>:<file_path> > src/XerahS/ref/<commit_short>_<filename> to verify the state of relevant files at that commit.ref directory once the task is complete and verified, unless instructed otherwise.This reduces git command overhead and provides a stable reference point for parity checks.
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.