Wouldn't it be nice to have a programming-by-demonstration system that lets you interactively develop a filter on one image, then apply it to many images?
You can select a group of operations you did in your editing history and turn them into an Action, with parametrization support.
You can then batch apply an Action to a bunch of files.