find-repeated-work-within-one-build
Installation
SKILL.md
Find Repeated Work Within One Build
MSBuild runs targets once per project instance. Work that does not depend on the project, but sits in Directory.Build.targets or a shared target, therefore runs once per project: a git rev-parse in 40 projects is 40 process launches. A project built with different global properties is a different instance, so a shared library can compile several times in one build. The binlog's N calls column shows both. This skill finds the repeats, separates them from work that is legitimately per project, and removes only what is safe to remove.
When to Use
- The same
Execor task (version stamping, tool probes, file generation) runs in every project - Target or Task Performance Summary shows a call count far above the number of projects that need the work
- The same project executes its build targets repeatedly under global-property sets that do not change its outputs
- An
Execspawns one process per item in a list - A "run once per build" guard (
Existscheck, flag property) still runs repeatedly or fails with file-in-use errors under-m