This skill helps you automate Go project tasks with Mage by creating magefiles, defining targets, and managing dependencies.
npx playbooks add skill way-platform/skills --skill way-magefile
Mage is a make-like build tool using Go. You write plain-old go functions, and Mage automatically uses them as Makefile-like runnable targets.
//go:build mage (or +build mage for older Go).magefile.go or placed in magefiles/ directory.package main.func Target()func Target() errorfunc Target(ctx context.Context) errormage -l).mg.Deps(Func) to declare dependencies.mg.Deps runs in parallel; mg.SerialDeps runs serially.To create a new magefile:mage -init
Running Commands:
Use github.com/magefile/mage/sh for shell execution.
import "github.com/magefile/mage/sh"
// ...
err := sh.Run("go", "build", "./...")
Clean Up:
import "github.com/magefile/mage/sh"
// ...
sh.Rm("bin")
mg, sh, and target package details.Weekly roundup of top Claude Code skills, MCP servers, and AI coding tips.