I did something similar - in fact looking at the add filter, very similar, where I add a label to certain mails by query and then delete - but the weirdest part was i could not auto-create one new filter - i have to re-create them all (so if I want to add a 21st filter with 20 still there my create filter routine needs to apply 21 filters. I just have it trying to reduce the spam and should spend some time trying to add new filters - one day.
But this is cool and love to know if there is a "add one" feature i missed.