makefile-review
Audits Makefiles for build correctness, portability, and recipe duplication. Use when reviewing a Makefile or before committing Makefile changes.
它会碰到什么
逐条看命中(1 条严重或高危)
- 高
modules/best-practices.md:133fs-destructiverm -rf /home/user/project/build
这一栏是扫描器报的事实,不是结论。命中多不等于有毒(安全工具、规则库、示例脚本本来就会包含危险写法),命中少也不等于干净。它和你手上的凭据、文件、网络有什么关系,需要你自己看。
技能内容
Table of Contents
- [Quick Start](#quick-start)
- [When to Use](#when-to-use)
- [Required TodoWrite Items](#required-todowrite-items)
- [Workflow](#workflow)
- [Step 1: Map Context (
makefile-review:context-mapped)](#step-1:-map-context-(makefile-review:context-mapped)) - [Step 2: Dependency Graph (
makefile-review:dependency-graph)](#step-2:-dependency-graph-(makefile-review:dependency-graph)) - [Step 3: Deduplication Audit (
makefile-review:dedup-candidates)](#step-3:-deduplication-audit-(makefile-review:dedup-candidates)) - [Step 4: Portability Check (
makefile-review:tooling-alignment)](#step-4:-portability-check-(makefile-review:tooling-alignment)) - [Step 5: Evidence Log (
makefile-review:evidence-logged)](#step-5:-evidence-log-(makefile-review:evidence-logged)) - [Progressive Loading](#progressive-loading)
- [Output Format](#output-format)
- [Summary](#summary)
- [Testing](#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-loggedmakefile-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+ verbatimAnchorconfirmed
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.
想直接用这个技能?
本站把开放许可(MIT / Apache 等)的技能按仓库打包整理到网盘,点一下转存到你自己的网盘,不用一个个从 GitHub 拉。许可未声明的技能只给原始仓库链接,不打包。
它属于哪个仓库
plugins/pensive/skills/makefile-review/SKILL.md同一个仓库里的其他技能
- claude-code-plugin-reference
- night-market-architecture-contract
- night-market-build-and-env
- night-market-change-control
- night-market-collective-memory
- night-market-completion-integrity-campaign
- night-market-config-catalog
- night-market-debugging-playbook
- night-market-diagnostics-toolkit
- night-market-docs-and-writing
- night-market-failure-archaeology
- night-market-model-and-harness-updates