
makefile-validator
Validate, lint, audit, or check Makefiles and .mk files for errors.
- Installs
- 628
- Last 24h
- —
- Trending rank
- —
- Security
- Not audited
Install
Works with every agent the skills CLI supports.
npx skills add https://github.com/akin-ozer/cc-devops-skills --skill makefile-validator- 01
Install
Run the command in your project. The CLI asks which agents to install for.
- 02
Describe the task
Ask your agent for something this skill covers. It loads makefile-validator automatically when relevant.
- 03
Review the result
The agent follows the SKILL.md steps, scripts and references bundled with the skill.
SKILL.md
The instructions your agent reads when the skill is triggered.
Makefile Validator
Overview
Use this skill to validate Makefiles with a local-first, deterministic flow.
Default validator entrypoint:
bash scripts/validate_makefile.sh <makefile-path>
Validation layers:
- Dependency preflight (
python3,pip3,make) - GNU make syntax check (
make -n --dry-run) whenmakeis available mbake validatembake format --check- Custom security, best-practice, and optimization checks
- Optional
checkmakeandunmakechecks when installed
Trigger Guidance
Use this skill when the request includes Makefile quality, linting, validation, hardening, or troubleshooting.
Trigger Phrases
- "Validate this Makefile"
- "Lint my
.mkfile" - "Find issues in this build Makefile"
- "Check Makefile security problems"
- "Review this Makefile before CI"
Non-Trigger Examples
- Creating a brand new Makefile from scratch (use
makefile-generator) - Running build targets as part of delivery
- General shell scripting work unrelated to Makefiles
Deterministic Execution Model
Run from this skill directory for shortest commands:
cd devops-skills-plugin/skills/makefile-validator
Step 1: Preflight
- Confirm target file exists and is readable.
- Confirm whether file edits are allowed (
writable) or only suggestions can be returned (read-only). - Prefer the default validator path first; use fallbacks only when blocked by environment constraints.
Step 2: Baseline Validation (Default Path)
# From skill directory
bash scripts/validate_makefile.sh <makefile-path>
# From repository root
bash devops-skills-plugin/skills/makefile-validator/scripts/validate_makefile.sh <makefile-path>
Always record:
- command executed
- exit code
- summary counts (
Errors,Warnings,Info) - issue locations reported by tools
Step 3: Interpret Output and Exit Code
| Exit code | Meaning | Expected summary line | Action |
|---|---|---|---|
0 | no blocking findings | Validation PASSED | optional improvements only |
1 | warning-only result | Validation PASSED with warnings | fix recommended; merge policy dependent |
2 | error result | Validation FAILED - errors must be fixed | fix required, then rerun |
Step 4: Progressive Reference Loading
Open only the docs required by the current findings.
| Finding type | Reference doc |
|---|---|
.PHONY, .DELETE_ON_ERROR, .ONESHELL, variable usage, performance structure | docs/best-practices.md |
| tabs vs spaces, dependency mistakes, credential patterns, anti-patterns | docs/common-mistakes.md |
mbake behavior, formatter flags, known mbake caveats | docs/bake-tool.md |
Step 5: Fix + Rerun Loop
After applying fixes, rerun:
bash scripts/validate_makefile.sh <makefile-path>
Loop rules:
- Stop only when no new errors are introduced.
- If warnings remain intentionally, document why they are accepted.
- Always report the latest rerun exit code.
How to Open Docs
Use explicit file-open commands so paths are unambiguous.
From repository root:
sed -n '1,220p' devops-skills-plugin/skills/makefile-validator/docs/best-practices.md
sed -n '1,220p' devops-skills-plugin/skills/makefile-validator/docs/common-mistakes.md
sed -n '1,220p' devops-skills-plugin/skills/makefile-validator/docs/bake-tool.md
rg -n "PHONY|DELETE_ON_ERROR|ONESHELL|tab|credential|mbake" devops-skills-plugin/skills/makefile-validator/docs/*.md
From devops-skills-plugin/skills/makefile-validator:
sed -n '1,220p' docs/best-practices.md
sed -n '1,220p' docs/common-mistakes.md
sed -n '1,220p' docs/bake-tool.md
rg -n "PHONY|DELETE_ON_ERROR|ONESHELL|tab|credential|mbake" docs/*.md
If shell commands are unavailable, use the environment's file-open/read actions on the same paths.
Fallback Behavior
Use these only when the default validator path cannot run fully.
| Constraint | Fallback action | Reporting requirement |
|---|---|---|
python3 or pip3 unavailable | Run limited checks (make -f <file> -n --dry-run if make exists, plus focused grep checks) | State that mbake stages were skipped and coverage is reduced |
pip3 install mbake fails (offline/proxy/index issue) | Keep syntax/custom checks that still work; defer formatter/linter stages | Report install failure and request rerun in a network-enabled environment |
make unavailable | Continue with non-syntax stages; script already downgrades syntax stage | Explicitly note syntax coverage was skipped |
checkmake or unmake unavailable | Continue; these are optional stages | Note optional lint/portability coverage not executed |
| target file is read-only | Provide patch suggestions only | Mark response as advisory only |
| command execution unavailable | Provide static review from file contents and docs | Mark result as non-executed analysis |
Minimal fallback commands:
# Syntax only (when make exists)
make -f <makefile-path> -n --dry-run
# Focused quick checks
grep -n "^\\.DELETE_ON_ERROR:" <makefile-path>
grep -n "^\\.PHONY:" <makefile-path>
grep -nE "^( | | )[a-zA-Z@\\$\\(]" <makefile-path>
Example Outcomes Mapped to Exit Codes
Clean Result (exit 0)
Errors: 0
Warnings: 0
Info: 2
✓ Validation PASSED
Warning-Only Result (exit 1)
Errors: 0
Warnings: 3
Info: 1
⚠ Validation PASSED with warnings
Error Result (exit 2)
Errors: 2
Warnings: 1
Info: 0
⚠ Validation FAILED - errors must be fixed
Troubleshooting Quick Start
- Verify required tools:
command -v python3 pip3 make
- Isolate GNU make syntax failures:
make -f <makefile-path> -n --dry-run
- Check likely tab-indentation violations:
grep -nE "^( | | )[a-zA-Z@\\$\\(]" <makefile-path>
- Rerun validator with plain output and capture log:
NO_COLOR=1 bash scripts/validate_makefile.sh <makefile-path> > /tmp/makefile-validator.log 2>&1
echo "exit=$? log=/tmp/makefile-validator.log"
- If mbake install keeps failing, validate in a network-enabled shell or with an internal PyPI mirror, then rerun the full validator.
Skill Paths
makefile-validator/
├── SKILL.md
├── scripts/
│ └── validate_makefile.sh
├── docs/
│ ├── best-practices.md
│ ├── common-mistakes.md
│ └── bake-tool.md
└── examples/
├── good-makefile.mk
└── bad-makefile.mk
Done Criteria
This skill update is complete when all are true:
- Trigger guidance is explicit and easy to identify.
- Execution flow is deterministic (preflight -> run -> interpret -> docs -> rerun).
- "How to open docs" instructions include exact commands and paths.
- Example outcomes are explicitly tied to exit codes (
0,1,2). - Fallback behavior is documented for missing tools and constrained environments.
- Troubleshooting quick-start is concise and runnable.
- Frontmatter
nameanddescriptionremain unchanged.
FAQ
What does the makefile-validator skill do?
Validate, lint, audit, or check Makefiles and .mk files for errors.
How do I install makefile-validator?
Run npx skills add https://github.com/akin-ozer/cc-devops-skills --skill makefile-validator in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/makefile-validator/ (personal) or .claude/skills/makefile-validator/ (project).
Which AI agents can use makefile-validator?
Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.
Is makefile-validator safe to install?
No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.
Who maintains makefile-validator?
It is published by akin-ozer in akin-ozer/cc-devops-skills. It has 628 recorded installs.
More from akin-ozer/cc-devops-skills
ansible-validator
akin-ozer/cc-devops-skills
Validate, lint, audit, or debug Ansible playbooks, roles, inventories, FQCN, tasks.
terragrunt-generator
akin-ozer/cc-devops-skills
Generate/create/scaffold Terragrunt HCL files — root.hcl, terragrunt.hcl, child modules, stacks, multi-env layouts.
k8s-debug
akin-ozer/cc-devops-skills
Diagnose and fix Kubernetes pods, CrashLoopBackOff, Pending, DNS, networking, storage, and rollout failures with kubectl.
ansible-generator
akin-ozer/cc-devops-skills
Generate, create, or scaffold Ansible playbooks, roles, tasks, handlers, inventory, vars.
jenkinsfile-generator
akin-ozer/cc-devops-skills
Generate/create/scaffold Jenkinsfile — declarative, scripted, shared library, CI/CD pipelines.
dockerfile-validator
akin-ozer/cc-devops-skills
Validate, lint, audit, or scan a Dockerfile for security and best practices.
Popular devops & cloud skills
microsoft-foundry
microsoft/azure-skills
Build, deploy, evaluate, optimize, fine-tune, and manage Microsoft Foundry agents, models, and resources end to end. USE FOR: foundry, azd ai agent, azd provision/deploy, hosted agent scaffold/develop/run/deploy/troubleshoot, prompt agent create, managed harness agent create, GitHub Copilot harness agent, create agent, update agent, add tool to agent, invoke agent, agent insights, evaluate agent, batch eval, continuous eval, continuous monitoring, agent CI/CD, optimize prompt, improve prompt, optimize agent instructions, Agent Optimizer scaffold, dataset curation from traces, deploy model, model fine-tuning (SFT/DPO/RFT), Foundry project, RBAC, role assignment, permissions, quota, capacity, region, deployment failure, AI Services, create Foundry resource, knowledge index, customize deployment, onboard, availability, training-data, grader, distillation, large file upload. DO NOT USE FOR: Azure Functions, App Service, general Azure deploy (use azure-deploy), general Azure prep (use azure
azure-diagnostics
microsoft/azure-skills
Debug Azure production issues on Azure using AppLens, Azure Monitor, resource health, and safe triage. WHEN: debug production issues, troubleshoot app service, app service high CPU, app service deployment failure, troubleshoot container apps, container app 503 or target port mismatch, troubleshoot functions, function telemetry missing or stopped after a config/connection-string change, troubleshoot AKS, VM RDP, Linux SSH, VM black screen, can't connect to VM, reset VM password, NSG or firewall blocking, kubectl cannot connect, kube-system/CoreDNS failures, pod pending, crashloop, node not ready, upgrade failures, analyze logs, KQL, insights, image pull failures, cold start issues, health probe failures, resource health, root cause of errors, troubleshoot event hubs, troubleshoot service bus, messaging SDK error, AMQP connection failure, message lock lost, lock renewal during long-running processing, service bus dead letter.
azure-prepare
microsoft/azure-skills
Prepare azd-based Azure projects for deployment: generates azure.yaml, infrastructure (Bicep/Terraform), and Dockerfiles for the Azure Developer CLI (azd) workflow. USE ONLY when the user explicitly wants to use azd as the deployment tool, or the project already has an azure.yaml file. DO NOT USE FOR: non-azd deployments, Python App Service code-only deploys (use python-appservice-deploy), or cross-cloud migration (use azure-cloud-migrate). WHEN: prepare app for azd, create azure.yaml, set up azd infrastructure, modernize app for Azure with azd, deploy with azd, function app, timer trigger, service bus trigger, event-driven function, managed identity, generate Bicep, generate Terraform, create and deploy to Azure.
azure-ai
microsoft/azure-skills
Use for Azure AI: Search, Speech, OpenAI, Document Intelligence. Helps with search, vector/hybrid search, speech-to-text, text-to-speech, transcription, OCR. WHEN: AI Search, query search, vector search, hybrid search, semantic search, speech-to-text, text-to-speech, transcribe, OCR, convert text to speech.
azure-deploy
microsoft/azure-skills
Execute Azure deployments for ALREADY-PREPARED applications that have existing .azure/deployment-plan.md and infrastructure files. DO NOT use this skill when the user asks to CREATE a new application — use azure-prepare instead. This skill runs azd up, azd deploy, terraform apply, and az deployment commands with built-in error recovery. Requires .azure/deployment-plan.md from azure-prepare and validated status from azure-validate. WHEN: "run azd up", "run azd deploy", "execute deployment", "push to production", "push to cloud", "go live", "ship it", "bicep deploy", "terraform apply", "publish to Azure", "launch on Azure". DO NOT USE WHEN: "create and deploy", "build and deploy", "create a new app", "set up infrastructure", "create and deploy to Azure using Terraform" — use azure-prepare for these.
azure-validate
microsoft/azure-skills
Pre-deployment validation for Azure readiness. Run deep checks on configuration, infrastructure (Bicep or Terraform), RBAC role assignments, managed identity permissions, and prerequisites before deploying. WHEN: validate my app, check deployment readiness, run preflight checks, verify configuration, check if ready to deploy, validate azure.yaml, validate Bicep, test before deploying, troubleshoot deployment errors, validate Azure Functions, validate function app, validate serverless deployment, verify RBAC roles, check role assignments, review managed identity permissions, what-if analysis, validate Container Apps deployment.