Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
athola avatar

Makefile Review

  • 93 installs
  • 325 repo stars
  • Updated August 2, 2026
  • athola/claude-night-market

Review and refactor Makefiles so variables, PHONY targets, help, and pattern rules stay maintainable for repos.

About

Makefile-review is a best-practices module from the Claude Night Market stack that teaches agents how to structure, document, and extend GNU Make build files without common footguns. Solo and indie builders rely on Make when they want one command surface for build, test, and clean across polyglot monorepos or small services. The skill surfaces a canonical file order—project variables first, help as the default goal, explicit .PHONY declarations, and targets annotated with ## so help stays self-updating. It also catalogs pattern rules for format conversion, compiled artifacts, templated JSON configs, and parameterized pytest entry points, plus define blocks for repeating test workflows. Agents use it during review passes when a Makefile grows organically or when onboarding contributors who need predictable targets instead of tribal knowledge. It is guidance and examples, not a linter replacement, so human judgment still applies for platform-specific edge cases.

  • Recommended top-to-bottom layout: variables, DEFAULT_GOAL, PHONY, help, then documented main targets
  • Self-documenting help target using grep and awk over ## inline comments
  • Pattern-rule examples for %.html, object builds, envsubst config templates, and test-% pytest splits
  • define/run_tests macro pattern for reusable multi-directory test sequences

Makefile Review by the numbers

  • 93 all-time installs (skills.sh)
  • Ranked #459 of 1,352 Code Review & Quality skills by installs in the Skillselion catalog
  • Security screen: MEDIUM risk (skills.sh audit)
  • Data as of Aug 5, 2026 (Skillselion catalog sync)
npx skills add https://github.com/athola/claude-night-market --skill makefile-review

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs93
repo stars325
Security audit2 / 3 scanners passed
Last updatedAugust 2, 2026
Repositoryathola/claude-night-market

What it does

Review and refactor Makefiles so variables, PHONY targets, help, and pattern rules stay maintainable for repos.

Files

SKILL.mdMarkdownGitHub ↗

Table of Contents

Testing

Run pytest plugins/pensive/tests/skills/test_makefile_review.py to verify review logic.

Makefile Review Workflow

Audit Makefiles for best practices, deduplication, and portability.

Quick Start

/makefile-review

When To Use

  • Makefile changes or additions
  • Build system optimization
  • Portability improvements
  • CI/CD pipeline updates
  • Developer experience improvements

When NOT To Use

  • Creating new Makefiles - use abstract:make-dogfood
  • Architecture review - use architecture-review

Required TodoWrite Items

1. makefile-review:context-mapped 2. makefile-review:dependency-graph 3. makefile-review:dedup-candidates 4. makefile-review:tooling-alignment 5. makefile-review:evidence-logged 6. makefile-review:findings-verified

Workflow

Step 1: Map Context (makefile-review:context-mapped)

Confirm baseline:

pwd && git status -sb && git diff --stat

Verification: Run git status to confirm working tree state.

Find Make-related files:

rg -n "^include" -g'Makefile*'
rg --files -g '*.mk'

Document changed targets, project goals, and tooling requirements.

Step 2: Dependency Graph (makefile-review:dependency-graph)

@include modules/dependency-graph.md

Step 3: Deduplication Audit (makefile-review:dedup-candidates)

@include modules/deduplication-patterns.md

Step 4: Portability Check (makefile-review:tooling-alignment)

@include modules/portability-checks.md

Step 5: Evidence Log (makefile-review:evidence-logged)

Use imbue:proof-of-work to record command outputs with file:line references.

Summarize findings:

  • Severity (critical, major, minor)
  • Expected impact
  • Suggested refactors
  • Owners and dates for follow-ups

Progressive Loading

Load additional context as needed:

Best Practices & Examples: @include modules/best-practices.md

Plugin Dogfood Checks: @include modules/plugin-dogfood-checks.md - Makefile completeness analysis, target generation, and dogfooding validation.

Output Format

## Summary
Makefile review findings

## Context
- Files reviewed: [list]
- Targets changed: [list]

## Dependency Analysis
[graph and issues]

## Duplication Candidates
### [D1] Repeated command
- Locations: [list]
- Anchor: `verbatim source text at file:line`
- Recommendation: [pattern rule]

## Portability Issues
[cross-platform concerns]

## Missing Targets
- [ ] help
- [ ] format
- [ ] lint

## Recommendation
Approve / Approve with actions / Block

Verify Findings Are Grounded (makefile-review:findings-verified)

Every finding must cite a real location and a verbatim anchor. Write findings to .review/findings.json and confirm each citation resolves:

python plugins/imbue/scripts/citation_verifier.py \
  --findings .review/findings.json --repo-root .

Drop or label UNVERIFIED any finding the verifier fails (exit 1); only verified findings enter the report. See Skill(imbue:review-core) Step 5 and Skill(imbue:structured-output) for the schema.

Exit Criteria

  • Context mapped
  • Dependencies analyzed
  • Deduplication reviewed
  • Portability checked
  • Evidence logged
  • Every reported finding carries a Location + verbatim Anchor confirmed

by citation_verifier.py (exit 0), or unverified findings were dropped or labeled UNVERIFIED

Troubleshooting

Common Issues

No Makefile found Ensure Makefile or *.mk files exist in the project root or specify paths explicitly.

Include directives not resolved Run rg -n "^include" -g'Makefile*' to trace include chains manually.

Related skills

FAQ

Is Makefile Review safe to install?

skills.sh reports 2 of 3 security scanners passed. Review the Security Audits panel on this page before installing in production.

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.