xmake-dlang

xmake-dlang is a skill for Claude Code from xmake-io/xmake-skills. It costs 50 tokens per session (732 once invoked), scanned A, original, Apache-2.0.

A build setup for D projects using Xmake, a Lua-based tool that compiles code and links it into programs or libraries. It supports the DMD, LDC and GDC D compilers and packages from DUB, D’s package manager.

In plain words
What is it for?
Use it to create D executables, static libraries or shared libraries, add DUB packages, choose a D compiler and set compiler options.
Why use it?
It gives D projects one build configuration instead of requiring separate commands for each compiler or dependency. Dependencies that are brought in indirectly still need to be listed manually.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the xmake-skills plugin — 58 skills shipped together

Good fit Use it to create D executables, static libraries or shared libraries, add DUB packages, choose a D compiler and set compiler options.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/xmake-io/xmake-skills/xmake-dlang
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add xmake-io/xmake-skills --skill xmake-dlang
Clone the repo
git clone --depth 1 https://github.com/xmake-io/xmake-skills

Made for: Claude Code.

Or install xmake-skills, the plugin that ships this one along with the rest of its 58 skills.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for xmake-dlang

README.md
[![agentmods](https://agentmods.dev/badge/skills/xmake-io/xmake-skills/xmake-dlang/github.svg)](https://agentmods.dev/skills/xmake-io/xmake-skills/xmake-dlang)
Your own site
<a href="https://agentmods.dev/skills/xmake-io/xmake-skills/xmake-dlang"><img src="https://agentmods.dev/badge/skills/xmake-io/xmake-skills/xmake-dlang/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for xmake-dlang

Your own site · 80×15
<a href="https://agentmods.dev/skills/xmake-io/xmake-skills/xmake-dlang"><img src="https://agentmods.dev/badge/skills/xmake-io/xmake-skills/xmake-dlang.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 50 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 732 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00050 $0.00732
Opus 5 $0.00025 $0.00366
Sonnet 5 $0.00010 $0.00146
Haiku 4.5 $0.00005 $0.00073

Measured 10d ago against content hash 65f0a4445f8a, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

xmake-dlang scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 10d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/languages/xmake-dlang/SKILL.md · 97 lines

How it starts

The opening of the file, as written. The whole thing — 97 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Building D (dlang) with Xmake

D has three main compilers (DMD, LDC, GDC); xmake drives all of them through a unified target() API and supports DUB for package dependencies.

1. Minimal project

xmake create -l dlang -t console hello
cd hello
xmake run
add_rules("mode.debug", "mode.release")

target("hello")
    set_kind("binary")
    add_files("src/*.d")

2. Target kinds

target("app")       set_kind("binary")
target("mylib")     set_kind("static")
target("mydyn")     set_kind("shared")

3. DUB dependencies (v2.3.6+)

add_requires("dub::vibe-d ~>0.9.5")
add_requires("dub::libasync")

target("app")
    set_kind("binary")
    add_files("src/*.d")
    add_packages("dub::vibe-d", "dub::libasync")

Known limitation: cascading transitive deps must be declared manually for now. Add every dep in the tree explicitly.

4. Compiler selection

xmake f --toolchain=dlang                    # DMD (default)
xmake f --toolchain=ldc
xmake f --toolchain=gdc

Or pin paths:

xmake f --toolchain=ldc --sdk=/opt/ldc-1.30

LDC is usually the best choice for release builds (LLVM backend, best optimization). DMD is fastest to compile with.

5. Flags

target("app")
    add_files("src/*.d")
    add_dcflags("-O", "-release")          -- passed to the D compiler
    add_ldflags("-Wl,--as-needed")

add_dcflags = D compiler flags. Each compiler has its own flag dialect — prefer portable ones or gate with if is_toolchain("ldc") then ... end.

6. Mixing D with C

target("app")
    set_kind("binary")
    add_files("src/main.d", "src/extern.c")    -- mix C and D in one target
    add_includedirs("include")

D can call C directly via extern (C) declarations on the D side. No bridging needed.

Pitfalls

  • Transitive DUB deps. You must add them manually until xmake's DUB integration is complete.
  • Compiler-specific flags leaking across toolchains. add_dcflags("-mattr=+avx2") works on LDC, fails on DMD. Gate with is_toolchain.
  • D shared libraries on Windows. DMD and LDC produce different import-library formats; stick to one per project on Windows.

Read the full file on GitHub · 97 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 10d ago First seen · 97 lines · 50 tokens per session scan A 65f0a4445f8a

Subscribe to this mod's changes

xmake-dlang is a skill published in the GitHub repository xmake-io/xmake-skills (24 stars, last pushed 18d ago), licensed Apache-2.0. It adds 50 tokens to every session and 732 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

matlab

Build, review, migrate, and safely plan MATLAB or GNU Octave numerical workflows, including arrays, tabular/time data, tests, projects, graphics, MAT files, and explicit Python interoperability.

K-Dense-AI/scientific-agent-skills · 42 tokens

ast-grep

Guide for writing ast-grep rules to perform structural code search and analysis. Use when users need to search codebases using Abstract Syntax Tree (AST) patterns, find specific code structures, or perform complex code queries that go beyond simple text search. This skill should be used when users ask to search for…

JanDeDobbeleer/oh-my-posh · 80 tokens

platform-detection

Identify a .NET project's test platform, framework, command mode, and SDK-style vs classic project system. Use only for "which test platform/framework?", "VSTest or MTP?", or "what runner does this project use?", including bridge settings, UseVSTest opt-outs, and incompatible or conflicting VSTest/MTP configuration.…

dotnet/skills · 146 tokens

unity-version-split

Split a C# file into Unity 6.5+ and pre-Unity 6.5 variants. Use when a file needs different implementations for different Unity versions due to API changes (e.g., EntityId vs int, GetEntityId vs GetInstanceID).

IvanMurzak/Unity-MCP · 59 tokens

omh-rust

This is a Hermes-native rust workflow skill.

rlaope/oh-my-hermes · 69 tokens

axiom-concurrency

Use when writing ANY async code, actors, threads, or seeing ANY concurrency error. Covers Swift 6 concurrency, @MainActor, Sendable, data races, async/await patterns.

CharlesWiltgen/Axiom · 43 tokens