makefile-review
npx machina-cli add skill athola/claude-night-market/makefile-review --openclawTable of Contents
- Quick Start
- When to Use
- Required TodoWrite Items
- Workflow
- Step 1: Map Context (
makefile-review:context-mapped) - Step 2: Dependency Graph (
makefile-review:dependency-graph) - Step 3: Deduplication Audit (
makefile-review:dedup-candidates) - Step 4: Portability Check (
makefile-review:tooling-alignment) - Step 5: Evidence Log (
makefile-review:evidence-logged) - Progressive Loading
- Output Format
- Summary
- Testing
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
makefile-review:context-mappedmakefile-review:dependency-graphmakefile-review:dedup-candidatesmakefile-review:tooling-alignmentmakefile-review:evidence-logged
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:evidence-logging 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]
- Recommendation: [pattern rule]
## Portability Issues
[cross-platform concerns]
## Missing Targets
- [ ] help
- [ ] format
- [ ] lint
## Recommendation
Approve / Approve with actions / Block
Exit Criteria
- Context mapped
- Dependencies analyzed
- Deduplication reviewed
- Portability checked
- Evidence logged
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.
Source
git clone https://github.com/athola/claude-night-market/blob/master/plugins/pensive/skills/makefile-review/SKILL.mdView on GitHub Overview
Makefile-review audits existing Makefiles to optimize builds, improve portability, and remove recipe duplication. It guides you through mapping context, generating a dependency graph, running deduplication checks, and validating portability so CI/CD pipelines and developer workflows stay efficient and maintainable.
How This Skill Works
You start by mapping the project context (baseline git status and Makefile discovery), then generate a dependency graph, run deduplication audits, and apply portability checks using the included modules. Evidence logging with imbue:evidence-logging captures command outputs with file:line references for auditing.
When to Use It
- Auditing and optimizing an existing Makefile
- Reviewing a build system for portability across environments
- Eliminating duplicated or repetitive recipe blocks
- Updating CI/CD pipelines that rely on Make-based workflows
- Standardizing Makefiles across a repository for consistency
Quick Start
- Step 1: Run /makefile-review to map context and identify files
- Step 2: Generate the dependency graph (makefile-review:dependency-graph) and inspect results
- Step 3: Run deduplication and portability checks, then log evidence with imbue:evidence-logging
Best Practices
- Start with git status and baseline diffs to scope changes
- Generate and inspect the dependency graph for target relationships
- Run deduplication audits to identify repeated commands and targets
- Run portability checks to ensure cross-platform compatibility
- Capture findings with imbue-evidence-logging and assign owners/dates
Example Use Cases
- Consolidated common recipe snippets into shared targets to reduce duplication
- Removed redundant recipe lines and simplified include patterns
- Updated portability checks to catch environment-specific flags across OSes
- Aligned Makefiles across modules to improve CI pipeline reliability
- Generated a traceable evidence log for an audit with file:line references
Frequently Asked Questions
Related Skills
image-management
chaterm/terminal-skills
Docker 镜像管理
dockerfile
chaterm/terminal-skills
Dockerfile 编写最佳实践
Cross-Platform Build Expert
martinholovsky/claude-skills-generator
Expert in building desktop applications for Windows, macOS, and Linux with focus on platform-specific configurations, code signing, and distribution requirements
shell-review
athola/claude-night-market
Audit shell scripts for correctness, portability, and common pitfalls.