/xmake-skills:xmake-csharpfrom xmake-skills
Builds C# .cs projects with xmake using Mono mcs or .NET dotnet toolchains. Handles binary/library output, references, and P/Invoke interop with native code.
Ships in xmake-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Xmake drives the C# compiler (Mono mcs or modern .NET csc/dotnet) through a target model similar to C++.
add_rules("mode.debug", "mode.release")
target("hello")
set_kind("binary")
add_files("src/*.cs")
target("app") set_kind("binary") -- .exe
target("mylib") set_kind("shared") -- .dll (class library)
xmake f --toolchain=mcs -- Mono compiler
xmake f --toolchain=dotnet -- .NET SDK (csc)
Pin a specific install with --sdk:
xmake f --toolchain=dotnet --sdk=/usr/share/dotnet/sdk/8.0.100
target("app")
add_files("src/*.cs")
add_csflags("/reference:System.dll", "/reference:System.Core.dll")
-- Or the modern, portable form:
add_values("cs.references", "System.dll", "System.Core.dll")
For NuGet / .NET SDK projects, prefer a real .csproj consumed via dotnet build — xmake's direct C# support is best for small / standalone tools.
target("nativelib")
set_kind("shared")
add_files("native/*.c")
target("app")
set_kind("binary")
add_files("src/*.cs")
add_deps("nativelib")
In Program.cs:
using System.Runtime.InteropServices;
class Program {
[DllImport("nativelib")]
static extern int hello(int x);
}
Xmake places nativelib.dylib/.so/.dll next to the managed binary so the runtime loader finds it.
target("app")
add_files("src/*.cs")
add_csflags("-unsafe", "-nowarn:1591")
add_csflags maps to C# compiler flags.
xmake is not dotnet build. Complex .csproj projects (NuGet, SDK-style projects, Razor, WPF designers) should go through dotnet build inside a task(...) instead of xmake's native C# support.System.dll references. Modern .NET Core doesn't need them (implicit); Mono does. Test with the toolchain you'll ship on.PATH or next to the .exe. Xmake's default placement handles the common case.xmake-targetsxmake-xpackWhat SKILL.md sets; muted values are Claude Code's defaults
58 skills in this plugin
/xmake-addon-developmentUse when writing an Xmake addon — the `addon.lua` manifest, the payload layout (plugins/rules/toolchains/modules/includes/templates), `@self` references, shipping package definitions with an addon, `add_globalmodules`, testing it locally, and publishing it to xmake-repo as an `addon` kind package./xmake-addonsUse when installing or using an Xmake addon — `xmake addon --install/--list/--remove/--upgrade/--search`, declaring `add_addons(...)` in a project, and referencing addon payloads with `@addon/<name>/<rule>`, `@addon.<name>.<module>` or `@self`. For writing and publishing one, see xmake-addon-development./xmake-async-jobsUse when running parallel / async work inside xmake scripts — `async.runjobs` for parallel job execution, `async.jobgraph` (DAG) for dependency-ordered jobs, `async.jobpool` (tree structure), `core.base.scheduler` coroutine scheduling, semaphores, and `on_build_files(..., {jobgraph = true})` in rules. For running external compile jobs faster, see `xmake-build-optimization`.npx claudepluginhub xmake-io/xmake-skills --plugin xmake-skillsOther plugins' skills for the same job