makefile-validator

Validate Makefiles for syntax errors, best practices, and security.

1|Updated Mar 27, 2026
One-click install
npx skills add https://github.com/devkeni/Skills --skill makefile-validator-devkeni
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: makefile-validator
Source: https://github.com/devkeni/Skills/tree/main/backend-devops/makefile-validator
Command: npx skills add https://github.com/devkeni/Skills --skill makefile-validator-devkeni

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires mbake, python3, pip3, make, and includes scripts (resource) components.

What problem does it solve?

Validate and harden Makefiles to prevent broken builds by catching syntax errors, anti-patterns, and unsafe practices in local and CI workflows.

Core Features & Use Cases

  • Local-first validation of Makefiles and .mk files using GNU Make dry-run checks and mbake-based rules.
  • Preflight and layered checks including syntax, best practices, and optional portability checks (checkmake, unmake).
  • Suitable for CI pipelines, code reviews, and developer tooling to enforce consistent Makefile quality.

Quick Start

Run the validator against a Makefile with the default entrypoint: bash scripts/validate_makefile.sh <makefile-path>.

Frequently Asked Questions about makefile-validator

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I validate a Makefile for syntax errors and best practices?

To validate a Makefile, run the validator script with your file path to perform GNU Make dry-run checks and mbake-based rules. This catches syntax errors, anti-patterns, and unsafe practices to prevent broken builds in local development and CI workflows.

What is the best way to lint Makefiles in a CI pipeline?

Linting Makefiles in a CI pipeline is best handled by running deterministic validation checks against your build scripts. This validator applies layered preflight checks, including syntax, best practices, and optional portability checks, to enforce consistent Makefile quality.

Do I need Python and GNU Make installed to check Makefile syntax?

Yes, you need Python 3.9 or higher and GNU Make installed to check Makefile syntax. Python is required for the mbake dependency, while GNU Make handles the dry-run syntax checks, and optional tools like checkmake and unmake offer extended portability validation.

Can I use checkmake and unmake for extended Makefile portability checks?

Yes, you can use checkmake and unmake for extended Makefile portability checks. These optional tools integrate with the validator's layered checking approach to apply deeper preflight analysis beyond the standard GNU Make syntax and mbake best practice rules.

Why does my Makefile validation fail during local preflight checks?

Makefile validation fails during local preflight checks when the validator detects syntax errors, anti-patterns, or unsafe practices using GNU Make and mbake. Running the validation script directly against your Makefile path identifies the specific build issues causing the failure.