Audit existing Makefiles against conventions for self-documentation, PHONY declarations, variable usage, and role separation.
Audits Makefiles for best practices in structure, documentation, and variable usage.
npx claudepluginhub jugrajsingh/skillgardenThis skill is limited to using the following tools:
references/nodejs.mdreferences/python.mdAnalyze Makefiles against conventions and best practices.
| Check | Pass Criteria |
|---|---|
| .DEFAULT_GOAL set | .DEFAULT_GOAL := help present |
| help target exists | help: target with grep/awk pattern |
| Self-documenting | All public targets have ## description comment |
| .PHONY declarations | All non-file targets listed in .PHONY |
| Private target convention | Internal targets use underscore prefix (_target) or define macros |
| Section separators | Comment blocks separating logical sections |
| Check | Pass Criteria |
|---|---|
| No hardcoded paths | Registry URLs, namespaces in variables |
| No hardcoded versions | VERSION derived from git or variable |
| Consistent naming | SCREAMING_SNAKE for variables |
| Overridable where needed | ?= for KUBE_CONTEXT, NAMESPACE |
| Check | Pass Criteria |
|---|---|
| Role separation | Dev targets in Makefile.local, deploy in Makefile.deploy |
| No mixed concerns | Build/push/deploy not mixed with test/lint/format |
| DRY compliance | Repeated docker/helm commands use private targets or define macros |
| Tag-on-push pattern | build-image tags locally, push-image tags for registry |
| Root delegates | Root Makefile delegates to Makefile.local/deploy, no inline commands |
| Check | Pass Criteria |
|---|---|
| Tab indentation | Recipes use tabs, not spaces |
| No shell assignment in recipe | Use $(shell ...) in variables, not in recipes |
| Quiet prefix usage | @ prefix on echo, not on commands that might fail |
| Error handling | || true only on intentional ignore |
Glob: Makefile, Makefile.*, */Makefile
Glob: pyproject.toml, requirements.txt, uv.lock, package.json, package-lock.json, yarn.lock, pnpm-lock.yaml, go.mod, Cargo.toml
Based on detection, load the appropriate language-specific reference:
| Files Found | Reference |
|---|---|
pyproject.toml, uv.lock, requirements.txt | references/python.md |
package.json, package-lock.json, yarn.lock | references/nodejs.md |
Read the matching reference file for language-specific audit checks. If multiple languages detected, read all matching references.
For each Makefile:
^[a-zA-Z_-]+:)^[A-Z_]+ := or ^[A-Z_]+ \?=)uv run, npm, etc.)Use the audit-report.md template. Fill in:
After presenting the report, ask via AskUserQuestion:
| Priority | Criteria |
|---|---|
| High | Missing help target, no .PHONY, hardcoded secrets, bare python/node bypassing package manager |
| Medium | Missing self-documentation, no section separators, DRY violations, missing required targets |
| Low | Naming inconsistencies, missing private prefix on internal targets |
Activates when the user asks about AI prompts, needs prompt templates, wants to search for prompts, or mentions prompts.chat. Use for discovering, retrieving, and improving prompts.