I want an efficient way to fetch the size of a file without having to launch any kind of shell, since I have to check file sizes VERY frequently. I see only one way to do this in KM, like this:

This will let me compare the size of a file to some number, but since I can't save the size of a file into a variable like this, it doesn't help me very much.
I think the reason that there is no KM function to let me fetch the size of a file is that "size" is just one of a couple of dozen attributes that would each require their own function, which is a lot of functions. (And most file attributes are probably strings, not numbers.)
Perhaps there is a better way for KM to support this. Perhaps there could be a new token called %FileAttribute% which returns the last attribute that was obtained by the "File Attribute condition." If this token was created, all I would have to do is follow the action above with this action:

And with this, I would be able to get the size of a specified file without having to launch a shell.
P.S. Another possible way to implement this is with the Filter action, but that action already looks overloaded. I.e., the number of filters is already too big to fit on a single screen. Perhaps for this reason it would merit its own action with a new name, perhaps "File Filter".