| name | ShareX Core Standards |
| description | License headers, build configuration rules, dependency version guidance, and general coding standards for XerahS |
License Header Requirement
When creating or editing C# files (.cs) in this repository, include the following license header at the top of the file (tailored for the Avalonia implementation):
#region License Information (GPL v3)
#endregion License Information (GPL v3)
Build Configuration Rules
Windows Target Framework Moniker (TFM)
CRITICAL: When configuring projects to target Windows, use the explicit TFM format that includes the platform version:
net10.0-windows10.0.26100.0
Do NOT use:
<TargetFramework>net10.0-windows</TargetFramework> with a separate <TargetPlatformVersion>... property.
This is required to avoid "Windows Metadata not provided" errors during full solution builds with CsWinRT.
SkiaSharp Version Guidance
IMPORTANT: SkiaSharp is centrally managed in the root Directory.Packages.props and is currently on 3.119.3-preview.1.1 for the Avalonia 12 upgrade line.
- When adding SkiaSharp to a new project, prefer the shared central package version instead of introducing an inline project-local version.
- If you encounter version conflicts, align with the root central package management entry rather than reintroducing the legacy
2.88.9 pin.
- This guidance applies to all projects including
XerahS.* and ShareX.ImageEditor.
General Coding Rules
Code and Config Changes
- Follow existing patterns in each project area.
- Keep changes minimal and targeted.
- Add small comments only when necessary to explain non-obvious logic.
- CRITICAL: After modifying code, always run
dotnet build and fix all build errors before finishing.
- For Git workflow, commit format, and version bump behavior, follow
.ai/skills/git-workflow/SKILL.md.
- Ensure you can compile, and if not, fix the issues. This is a mandatory check before finishing any coding task.
Change Safety
- Do not remove or rewrite unrelated content.
- Apply version changes only via the workflow defined in
.ai/skills/git-workflow/SKILL.md.
- Flag assumptions clearly when requirements are ambiguous.
Testing
- If you modify executable code, suggest relevant tests.
- If tests are added, align them with current test conventions.
Documentation
- Update or add docs when behavior or usage changes.
- Keep filenames and headings descriptive and stable.
- Technical Documentation Location: Automatically save all technical
.md files that do not properly belong to other specific docs/ subfolders in docs/technical. Do not save them in the root folder.
- Commit expectations for documentation follow
.ai/skills/git-workflow/SKILL.md.
Security
- Do not include secrets or tokens.
- Avoid logging sensitive data in examples.
Output Format
- For changes, summarize what changed and where.
- Provide next steps only when they are natural and actionable.