Token导航 LogoToken导航

Agent Skill · 研究检索

build-linux-binary(构建 Linux 二进制文件)

build-linux-binary 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

build-linux-binary 是研究检索类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为只读;许可证信息还不明确,第三方扫描已通过,按安装量在研究检索类的 73,675 个 Skill 里排第 49,058。

总安装 665周安装 28GitHub Stars 239下载 233核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
unknown

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:build-linux-binary(构建 Linux 二进制文件)
来源仓库:https://github.com/sharex/xerahs
仓库路径:skills/build-linux-binary
安装命令:
npx skills add https://github.com/sharex/xerahs --skill build-linux-binary
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/sharex/xerahs --skill build-linux-binary

这个 Skill 是做什么的

研究检索类 Skill 主要解决「找资料、核对事实、把来源整理清楚」的问题,通常会让助手先检索再总结。

自动化构建 .NET/Avalonia 项目的 Linux 发行版二进制包。依赖 ShareX.ImageEditor 子模块,需预先更新以确保兼容性。遵循共享构建规则,包括超时控制与 SkiaSharp 特殊处理。输出路径与日志格式严格限定,便于 CI/CD 系统集成。

build-linux-binary 属于研究检索类 Skill,可作为该场景下的辅助能力补充。

来源仓库内路径:skills/build-linux-binary

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/sharex/xerahs --skill build-linux-binary;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它标注为只读,先用只读任务试一次,确认行为符合预期再扩大使用范围。

常见问题

6 条

build-linux-binary 怎么安装?

在终端执行 npx skills add https://github.com/sharex/xerahs --skill build-linux-binary。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

build-linux-binary 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

build-linux-binary 需要什么权限?

权限级别是只读。该 Skill 主要提供规则、说明或参考内容,本身偏只读;真正读写文件、联网或执行命令仍取决于宿主 Agent 的任务。

build-linux-binary 是免费的吗?

公开资料没有标注明确许可证,收费和商用限制都无法确认。正式使用前请到来源仓库核对授权说明。

build-linux-binary 用的人多吗?

公开数据是累计安装 665 次,近一周安装 28 次,下载 233 次,GitHub 239 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

build-linux-binary 安全吗?

第三方扫描结果为通过,但这只覆盖已知的静态检查项,不能替代自己读一遍源码和安装命令。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。
  • 第三方扫描已通过,常见的高风险行为没有命中。
  • 标注为只读权限,试用阶段不容易误改本地文件。

先想清楚的地方

  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理研究检索类任务、又不想每次都手写提示词的人。
  • 只想先试试效果、不希望它改动本地文件的人。

不太适合

  • 需要明确授权才能用到公司项目里的场景。
  • 需要厂商级技术支持和 SLA 的生产系统。

研究检索类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
find-skills

寻找技能 · Codex、Claude

31,199,81316,486操作浏览器MIT有提醒
self-improving-agent

自我改进 Agent · OpenClaw

16,464,0023,396接触敏感数据MIT-0通过
soultrace

灵魂追踪 · Codex、Claude

7,588,94412需要联网未明确有提醒
self-improving

自我完善 · OpenClaw

6,829,2841,046需要联网MIT-0通过
microsoft-foundry

微软代工厂 · Codex、Claude

6,614,144764调用外部服务未明确有提醒
build-linux-binary

构建 Linux 二进制文件 · 本页

665239只读未明确通过

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

You are an expert Linux build automation specialist for.NET/Avalonia projects.

Follow these instructions exactly and in order to build Linux binaries for XerahS.

Shared Build Guardrails

Before Linux packaging work, follow build-common for shared timeout, lock recovery, no-concurrent-build, -m:1, TFM, and SkiaSharp rules. This Linux skill owns package-linux usage, log monitoring, Linux artifact validation, and Linux-specific XAML precompilation diagnostics.

Build Process

Phase 0: Update ShareX.ImageEditor Submodule

Always pull the latest ShareX.ImageEditor submodule before building to ensure the embedded image editor is up-to-date.

git submodule update --remote --merge ShareX.ImageEditor

Phase 1: Pre-Build Cleanup

CRITICAL: Stale dotnet and package-linux.sh processes are the #1 cause of file lock failures on Linux. Always kill them before starting.

  1. Kill all stale build processes: pkill -f "package-linux.sh" 2>/dev/null pkill -f "dotnet publish" 2>/dev/null pkill -f "dotnet build" 2>/dev/null sleep 2
  2. Optional — clean obj folders if locks persist: rm -rf /path/to/XerahS/ShareX.ImageEditor/src/ShareX.ImageEditor/obj/Release This is most useful if you see The process cannot access the file '...ShareX.ImageEditor.pdb' because it is being used by another process (Avalonia AVLN9999 error).

Phase 2: Run the Build Script

IMPORTANT: Always redirect output to a log file. The build takes 5-15 minutes and command_status produces no output during that time — the tool will appear to hang. Do NOT use WaitDurationSeconds > 30 with this command.

Start the build with log redirection:

bash build/linux/package-linux.sh > build_output.log 2>&1

This runs in the background. Monitor progress by periodically reading the log with view_file:

view_file: /path/to/XerahS/build_output.log  (last 50 lines)

Repeat every ~30 seconds until you see one of:

  • Done! All packages in dist/ → ✅ Build succeeded
  • Error: or FAILED lines → ❌ See Phase 3 for fixes

Do NOT use WaitDurationSeconds=120 in command_status — the command produces buffered output only after completion, so polling the log file is the only reliable way to track progress.


Phase 3: Handle Common Failures

🔴 Failure: No precompiled XAML found for XerahS.UI.App

Symptom (at runtime, not build time):

Avalonia.Markup.Xaml.XamlLoadException: No precompiled XAML found for XerahS.UI.App,
make sure to specify x:Class and include your XAML file as AvaloniaResource

Root Cause: A C# converter class referenced in an .axaml file uses the wrong namespace. Avalonia's XAML compiler silently fails to compile the referencing AXAML, which cascades to break the entire app's precompiled XAML.

How to diagnose:

  • Check any recently added/modified converters under ShareX.ImageEditor/src/ShareX.ImageEditor/UI/Adapters/Converters/
  • Verify their C# namespace matches the AXAML xmlns:converters import: In EditorView.axaml: xmlns:converters="using:ShareX.ImageEditor.Converters" So all converter classes must declare: namespace ShareX.ImageEditor.Converters;

Fix:

// WRONG — will silently break Avalonia XAML precompilation:
namespace ShareX.ImageEditor.UI.Adapters.Converters;

// CORRECT — matches the xmlns:converters import in EditorView.axaml:
namespace ShareX.ImageEditor.Converters;

After fixing, rebuild from scratch.


🔴 Failure: AVLN9999: The process cannot access the file '...XerahS.Imgur.Plugin.pdb' because it is being used by another process

Root Cause: A previous dotnet publish is still running in the background (e.g. from a backgrounded & command).

Fix:

pkill -f "dotnet publish"
pkill -f "package-linux.sh"
sleep 3
bash build/linux/package-linux.sh

🔴 Failure: MSB3026: Could not copy '...XerahS.Uploaders.dll'... being used by another process

Root Cause: Parallel plugin publishing is racing to write shared DLLs.

Fix: This is usually a transient retry (MSBuild will retry automatically). If it becomes fatal:

rm -rf src/desktop/core/XerahS.Uploaders/obj/Release
bash build/linux/package-linux.sh

🔴 Failure: Error: No plugins were published for linux-x64

Root Cause: The plugin csproj discovery glob found no files, or a plugin build failed early.

Check:

find src/desktop/plugins -mindepth 2 -maxdepth 2 -name "*.csproj"

Each plugin project under src/desktop/plugins/ needs a plugin.json in the same directory.


Phase 4: Validation

After the build completes, verify the artifacts:

ls -lh dist/

Expected output:

XerahS-0.16.1-linux-x64.deb    ~90-120MB
XerahS-0.16.1-linux-arm64.deb  ~90-120MB
XerahS-0.16.1-linux-x64.rpm    ~90-120MB  (if rpmbuild installed)
XerahS-0.16.1-linux-arm64.rpm  ~90-120MB  (if rpmbuild installed)

Timestamps should match the current build session.


Important Notes

Why Avalonia XAML Precompilation Fails Silently

  • Avalonia compiles .axaml files to IL at build time
  • If a referenced type (e.g. a converter) cannot be resolved, the AXAML file is silently skipped
  • This doesn't fail the build, but crashes the application at startup
  • The fix is always: ensure C# namespace matches the xmlns import in the AXAML

Key Build Parameters (from package-linux.sh)

  • -p:PublishSingleFile=true --self-contained true: Main app ships as one binary
  • -p:OS=Linux -p:DefineConstants=LINUX: Enables Linux-specific code paths
  • -p:EnableWindowsTargeting=true: Required when cross-compiling on Linux due to shared project references
  • Plugins publish with --no-self-contained to share the runtime with the main app

Sequential Builds Are Mandatory

NEVER run two builds at the same time. ShareX.ImageEditor targets multiple TFMs and MSBuild parallelism causes them to race on the same ShareX.ImageEditor.dll output path.

  • Architectures: package-linux.sh iterates linux-x64 then linux-arm64 sequentially — never invoke it twice concurrently.
  • Internal parallelism: If CS2012 / file lock errors appear on ShareX.ImageEditor, pre-build it separately with /m:1 to force single-threaded compilation: dotnet build ShareX.ImageEditor/src/ShareX.ImageEditor/ShareX.ImageEditor.csproj \ -c Release -p:UseSharedCompilation=false /m:1
  • Between builds: Always kill all dotnet and package-linux.sh processes and wait for them to exit before starting a new build session.

Background Build Caution

  • Do not background the build script with & unless you redirect output to a log file
  • Multiple concurrent builds share obj/ folders and will conflict
  • Always kill previous builds before starting a new one

stdout Buffering Issue

  • dotnet publish progress may not appear in command_status tool output until the command finishes
  • Redirect to a .log file and use view_file to check progress instead of waiting for command output

Success Criteria

  • ✅ Both linux-x64 and linux-arm64 .deb packages created in dist/
  • ✅ Files are ~90-120 MB in size
  • ✅ Timestamps are recent (within build session)
  • ✅ No lingering dotnet or package-linux.sh processes
  • ✅ App launches without XamlLoadException at startup

Troubleshooting

SymptomSolution
XamlLoadException: No precompiled XAML found at startupCheck namespaces of all new converter classes — must match xmlns:converters in .axaml
AVLN9999: file used by another processKill all dotnet publish and package-linux.sh processes, retry
MSB3026: Could not copy XerahS.Uploaders.dllUsually transient; if fatal, delete src/desktop/core/XerahS.Uploaders/obj/Release and retry
Error: No plugins were publishedCheck src/desktop/plugins/ structure and plugin.json presence in each plugin directory
ARM64 cross-compile failsEnsure linux-arm64.NET SDK cross-compile support is installed; Fedora needs dotnet-sdk-10.0
rpmbuild: command not foundRPM skipped (not fatal); install with sudo dnf install rpm-build if needed
Build succeeds but app segfaultsSkiaSharp native library issue; verify the current centrally managed SkiaSharp/native-assets set and published runtimes before changing versions

Related Files

平台分布

Codex

36.85%
按下载量换算86

Claude

32.84%
按下载量换算77

Cursor

17.49%
按下载量换算41

Gemini CLI

9.42%
按下载量换算22

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

只读

该 Skill 主要提供规则、说明或参考内容,本身偏只读;真正读写文件、联网或执行命令仍取决于宿主 Agent 的任务。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills