/xmake-skills:xmake-fortranfrom xmake-skills
Builds Fortran projects with xmake: binary/library targets, Fortran source files, gfortran/Intel Fortran toolchains, and mixed Fortran-C compilation.
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 supports Fortran since v2.3.6 via gfortran, and Intel Fortran (ifort) since v2.3.8.
xmake create -l fortran -t console hello
cd hello
xmake run
add_rules("mode.debug", "mode.release")
target("hello")
set_kind("binary")
add_files("src/*.f90")
Recognized extensions: .f, .F, .f90, .F90, .f95, .F95, .f03, .F03, .f08, .F08, .for, .FOR. The uppercase variants get preprocessed.
target("app") set_kind("binary")
target("mylib") set_kind("static")
target("mydyn") set_kind("shared")
xmake f --toolchain=gfortran # default gfortran
xmake f --toolchain=ifort # Intel Fortran
xmake f --toolchain=ifx # Intel oneAPI LLVM-based Fortran
Pin a specific install with --sdk=/opt/intel/oneapi.
target("app")
add_files("src/*.f90")
add_fcflags("-O3", "-ffree-form") -- gfortran flags
add_ldflags("-lm")
add_fcflags = Fortran compiler flags.
target("solver")
set_kind("static")
add_files("src/*.f90", "src/*.c")
add_includedirs("include", {public = true})
target("app")
set_kind("binary")
add_files("src/main.cpp")
add_deps("solver")
set_languages("c++17")
Use iso_c_binding on the Fortran side and extern "C" on the C++ side. Xmake handles the link step — gfortran's runtime is added automatically when Fortran objects are present.
Fortran module/end module produces .mod files. Xmake tracks them automatically for dependency ordering — list source files in add_files in any order; xmake scans USE statements.
.f/.for default to fixed form (columns matter); .f90+ default to free form. Flag overrides work per-file if needed..mod leaking across targets. Each target has its own module cache. Share modules by linking the static/shared library and letting xmake propagate the -I path.ifort and ifx differ from gfortran in many flag names. Gate with is_toolchain.xmake-targetsxmake-cross-compilationxmake-targetsWhat SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
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