Can Runtime Classes be used in the Editor?

I want to make a custom editor script that will save me a lot of time in the future. I want it to take a selected object (or every selected object) and 1) use Quaternion.Inverse and 2) set transform.y = -transform.y. (This mirrors the object(s) across the x-z plane.)

Is this possible? I know I can make this function work at initialization of the game, but that would be hard to tweak + extra overhead load time on startup.

I was provoked into doing this by the mirror function in AutoCAD. I was sort of disappointed I found no such tool in Unity.

Yes, this is definitely possible.

class mirrorObjs extends Editor
{
    @MenuItem("Edit/Mirror Objects ")

    static function doMirror(command : MenuCommand)
    {   
        for(o in Selection.objects)
        {
            o.transform.rotation = Quaternion.Inverse(o.transform.rotation);
            o.transform.y = -o.transform.y; 
        }
    }
}