Skip to content
Back to skills

Makefile Pro

ASecurity

Generate, scaffold, validate and lint Makefiles and .mk files: .PHONY targets, build automation, common mistakes. Use for any Makefile work.

  • 6 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added November 9, 2026
toolspythongojavac++bashdockergitsecuritydocumentation

Security analysis

A100/100

Pro scans all 20 files and shows the line behind each finding

Scanned November 9, 2026

npx -y skills add hybridlabor-api/aos --skill makefile-pro --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Makefile Pro?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Makefile Pro
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/hybridlabor-api-makefile-pro/badge)](https://www.skillsdirectory.com/skills/hybridlabor-api-makefile-pro)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: makefile-pro
description: "Generate, scaffold, validate and lint Makefiles and .mk files: .PHONY targets, build automation, common mistakes. Use for any Makefile work."
category: engineering-method
---

# Makefile Pro

One entry point for Makefile work, covering two phases: generating a new
production-ready Makefile and validating or linting an existing one. Covers
C/C++, Python, Go, Java and generic projects, GNU Coding Standards targets,
security hardening and CI integration.

Generation is requirements-first (language, structure, targets, install
layout) with validation as a mandatory final step; validation is a
local-first, deterministic pipeline whose exit codes decide whether fixes are
optional, recommended, or required. Pick the section below by the request:
"create/generate/write a Makefile" → Generate; "validate/lint/check/review a
Makefile" → Validate.

## Generate

- Use when a Makefile is created from scratch or manual build steps are converted to targets; do not use it for validating existing files or running builds.
- Gather requirements first: language (C/C++, Python, Go, Java), project structure (single/multi-directory), build artifacts, install layout (default `PREFIX=/usr/local`), and which standard targets (all, install, clean, test, dist, help) are needed.
- Ask the user only when information is missing or ambiguous (language, structure, registry, single vs. multiple binaries, cross-compilation); otherwise proceed with standard defaults.
- Perform a documentation lookup for unfamiliar territory: Docker/container targets, CI platform integration (GitHub Actions, GitLab CI, Jenkins), cross-compilation, package managers (Conan, vcpkg, Homebrew), multi-binary projects, or version embedding via ldflags.
- Built-in quality bar: GNU Coding Standards compliance, security hardening, dependency tracking, and automatic validation as the final step of every generation.
- Always run validation on the generated file before handing it back (see Validate).
- Full guide: generator/GUIDE.md
- Helper scripts live in generator/scripts/.

## Validate

- Use when checking an existing Makefile or `.mk` file: quality, linting, hardening, security or troubleshooting before CI.
- Default entrypoint, run for every check:

```bash
bash scripts/validate_makefile.sh <makefile-path>
```

- Layers run in order: dependency preflight (`python3`, `pip3`, `make`), GNU make syntax check (`make -n --dry-run`), `mbake validate`, `mbake format --check`, custom security/best-practice/optimization checks, plus optional `checkmake` and `unmake` when installed.
- Exit codes: `0` = passed, `1` = passed with warnings (fix recommended, merge-policy dependent), `2` = failed — errors must be fixed and the run repeated.
- Record the command, exit code, and error/warning/info counts from every run; open reference docs only for the finding types actually reported.
- Fix, rerun, and stop when no new errors appear; document any warnings accepted intentionally and always report the latest exit code.
- Full guide: validator/GUIDE.md

Files in this skill

  • SKILL.md3 KB
  • generator/GUIDE.md21.2 KB
  • generator/assets/templates/.gitkeep43 B
  • generator/docs/makefile-structure.md10.9 KB
  • generator/docs/optimization-guide.md15.9 KB
  • generator/docs/patterns-guide.md12.3 KB
  • generator/docs/security-guide.md8 KB
  • generator/docs/targets-guide.md12.9 KB
  • generator/docs/variables-guide.md12.5 KB
  • generator/scripts/add_standard_targets.sh13.9 KB
  • generator/scripts/generate_makefile_template.sh15 KB
  • generator/test/test_helper_scripts.sh8.9 KB
  • validator/GUIDE.md6.8 KB
  • validator/docs/bake-tool.md20.6 KB
  • validator/docs/best-practices.md17.8 KB
  • validator/docs/common-mistakes.md18.7 KB
  • validator/examples/bad-makefile.mk1.6 KB
  • validator/examples/good-makefile.mk2.6 KB
  • validator/scripts/test_validate.sh16.3 KB
  • validator/scripts/validate_makefile.sh27.3 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in tools →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.