Auto crop is a AE plugin that allows you to quickly crop a composition using one of three different methods: auto crop, auto crop duration, and crop to mask. Regardless of the type of layer in the composition, it can work quickly and accurately. Auto Crop 3.0.0 is compatible with A.er Effects CS6 and newer.
Copy Auto_Crop.aex to Plugins in the AE installation directory
Copy AutoCrop.jsxbin and executeAutoCrop.jsxbin to Adobe After Effects CC xxx\Support Files\Scripts\ScriptUI Panels