Trim Layer to Work Area will do exactly that, trim your currently selected layer to the work area, with just a simple keyboard shortcut!
I often found myself wasting a lot of time trimming layers, when I had to create new solids or adjustment layers in complicated project, so I made this little script to fix that
Installation
To install this script, move it into your Scripts folder (\Adobe\Adobe After Effects CC 2018\Support Files\Scripts\), then open After Effects, go to Edit->Keyboard Shortcuts and assign the script to a key, happy editing!