CropROI is a script for Adobe After Effects that crops a precomposition to its Region of Interest. The crop happens without shifting the layer's position, so the precomp stays put in your main composition.
The workflow is short. You open your pre-composition, add a Region of Interest, then switch back to your main composition. From there you select the precomp layer, click the CropROI button, and the precomp is cropped to that region.
CropROI runs on After Effects CS6 and later, covering CC through the 2025 release. Version 1.2, from September 2023, fixed bugs where the precomp would move to another location and where the children of the precomp layer would move after the crop. A demo video is available. The script comes from Aris Melachroinos and is listed here as free.