makefile-validator

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

290|32|Updated Dec 5, 2025
One-click install
npx skills add https://github.com/akin-ozer/cc-devops-skills --skill makefile-validator
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: makefile-validator
Source: https://github.com/akin-ozer/cc-devops-skills/tree/main/devops-skills-plugin/skills/makefile-validator
Command: npx skills add https://github.com/akin-ozer/cc-devops-skills --skill makefile-validator

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

The Makefile validator helps teams catch syntax errors, style issues, and security risks in their GNU Makefiles before they run builds, reducing failures and flaky CI.

Core Features & Use Cases

  • Syntax checks: detect missing colons, indentation issues, and syntax errors using a GNU Make dry-run and mbake-based checks.
  • Best-practices validation: ensure proper .PHONY declarations, safe variable usage, error handling, and formatting consistency.
  • Security checks: flag hard-coded credentials, unsafe variable usage, and risky commands to prevent credential leakage or accidental damage.
  • Use Case: When maintaining large Makefiles, run the validator as part of CI to enforce standards before approval.

Quick Start

Use the Makefile validator to check a Makefile:

  • bash scripts/validate_makefile.sh Makefile

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 security risks?

You can validate a Makefile by running a script that performs GNU make dry-run checks and mbake validation. This detects syntax errors, style violations, and hard-coded credentials to prevent CI failures and credential leakage.

What does mbake-based Makefile validation check for?

mbake-based Makefile validation checks for proper .PHONY declarations, safe variable usage, error handling, and formatting consistency to ensure best-practice conformance and safe, repeatable build results.

Can I use this Makefile linter in CI pipelines and pre-commit hooks?

Yes, this Makefile linter works in CI pipelines and pre-commit hooks. It implements venv isolation and dependency installation to ensure safe, repeatable validation results across automated code review workflows.

Do I need Python and pip installed to run Makefile validation?

Yes, you need python3, pip3, make, and mbake installed to run Makefile validation. The workflow uses venv isolation and these dependencies to execute dry-run checks and formatting validation safely.

How do I check my GNU Makefile for missing colons and indentation issues?

To check a GNU Makefile for missing colons and indentation issues, execute the validation script. It uses a GNU make dry-run combined with mbake checks to detect syntax correctness and formatting consistency problems.