I do what you mentioned all day, every day. I don't like the idea of "a more general product" because that's the power of the tools I use, they are small tools designed to do one or a few things only, but I can chain them together to do complex things. And if one of my small tools doesn't work for a particular task, I can swap it out with or write another small tool.
With your "CSV-like" example, I'd probably do something like grep with a regex to check a line and see if it has more than $x commas, and if it does process the line, if it doesn't ignore it and move on to the next.
I am about to head to a meeting, but something like this:
https://unix.stackexchange.com/questions/249071/check-if-a-s...