Command Palette

Search for a command to run...

Back to skills
skill № 56976

conventions-make

MANDATORY for any work on Makefiles (Makefile, *.mk). Load this before editing, reviewing, or creating any Makefile or *.mk file. House Makefile conventions…

FreeNo executable scripts
Integralistby Integralist★ 31 GitHub stars

Install conventions-make in Claude Code & Claude Desktop

Sign up to install this skill

Create a free account to reveal the install command and save the skill to your library.

  • Reveal the one-line install command
  • Save skills to your synced library
  • Get notified when skills update
Sign up freeI already have an account

About this skill

[!NOTE] If invoked directly with no specific task, load these conventions and stop. They are ready to apply when asked to write, edit, or review Makefiles.

House deltas for Makefile and *.mk files so every repo shares a predictable, self-documenting CLI. In an established repo, match its existing conventions where they differ.

When creating or overhauling a Go project's Makefile, read and adapt GO-TEMPLATE.md.

Layout and comments

  • Set SHELL := /usr/bin/env bash and .DEFAULT_GOAL := help near the top (override .DEFAULT_GOAL in service repos where run or test is better).
  • Load per-developer overrides with -include .env.mk and ensure .env.mk is in .gitignore.
  • Separate logical groups with 80-column section banners (# ─── Section Name ───…).
  • Start the file with a short header comment naming the core tools, linters, and formatters the file drives. Leave blank # lines between numbered items and nested bullet lists so the block stays easy to scan.

Naming and ordering

  • Noun-first target prefixes: Prefix related targets with a shared noun (go-*, ci-*, tools-*, deploy-*) so make help groups them alphabetically.
  • Sort A-Z: Sort overridable variables alphabetically (unless an evaluation dependency requires another order) and sort targets alphabetically inside each section.
  • Mode flags over duplicate targets: Use boolean variables (DIFF=true, FIX=true) with $(if $(filter true,$(VAR)),...) instead of adding separate *-diff or *-fix aliases.
  • Multi-language test aggregator: Keep test as the top-level target that runs every test suite in the repo (for example, test: go-test, adding python-test as another prerequisite when a second language is added). Keep language-scoped targets (go-test) focused on that language alone.
  • CI targets: Provide ci-lint (static analysis and vulnerability checks) and ci-check (ci-lint plus test) so CI workflows can fan out jobs while contributors have one local parity target.

Help and variables

  • Include a help target that parses ## doc comments on both targets and overridable variables (?= / :=), prints them sorted alphabetically, and displays .DEFAULT_GOAL. Document optional overrides in target descriptions as (opts: VAR1, VAR2=val).
  • Use the check_defined macro (see GO-TEMPLATE.md) to fail fast with a clear usage hint whenever a target requires a variable.
  • Keep test flags (GO_TEST_FLAGS ?= -race) separate from target packages (GO_PACKAGES ?= ./...) so callers can override either independently.
  • Wrap quoted variables that carry inline ## doc comments in $(strip $(VAR)) because GNU Make preserves trailing spaces before #.

Tool management

  • Group standalone Go tools (such as gohawk and govulncheck) in a GO_TOOLS variable and invoke them through GO_TOOL_PREFIX ?= go tool.
    • When GO_TOOL_PREFIX is non-empty, tools-install / tools-update run go get -tool <pkg>@latest so versions are pinned in go.mod and run via go tool <name>.
    • When GO_TOOL_PREFIX is cleared (GO_TOOL_PREFIX=), those targets fall back to go install <pkg>@latest so zero-dependency modules can keep go.mod clean and invoke binaries from PATH.
  • Install binary-distributed tools like golangci-lint through their official release installer in tools-install / tools-update—never via go get -tool or go install.
  • Gate lint/format targets on a tools-config prerequisite that checks golangci-lint config path and fetches the baseline .golangci.yml to ~/.golangci.yml only when no repo or global config exists (no separate revive.toml is needed; all revive rules live inside .golangci.yml). For shared or CI repos, commit a repo-local .golangci.yml or pin GOLANGCI_LINT_CONFIG_REF to a commit SHA.

Linting

  • Check Makefiles with checkmake --config ~/.config/checkmake.ini Makefile when checkmake is installed.
  • Declare .PHONY on every non-file target, include the standard all, clean, and test phony targets, and keep recipe bodies at or under 15 lines (move longer logic into a script under scripts/ or bin/).
Full SKILL.md on GitHub

Allowed tools

Tools this skill is permitted to call.

No restriction — this skill can use any tool.

Bundled files

  • references/GO-TEMPLATE.md

FAQ

What does the conventions-make skill do?

MANDATORY for any work on Makefiles (Makefile, *.mk). Load this before editing, reviewing, or creating any Makefile or *.mk file. House Makefile conventions covering structure, help targets, noun-first target grouping, variables, tool management, CI targets, and checkmake linting.

How do I install the conventions-make skill?

Copy the skill folder into ~/.claude/skills (the Claude Code tab above does this in one command), or install it as a plugin.

Does the conventions-make skill run scripts?

No, this skill is instructions only (SKILL.md) with no executable scripts.

Related skills

Compare conventions-make with