Pretty much this, too, is always something in the back of my mind where Yukari's concerned. She really is completely self-interested, and has no compunction with tableflipping people's lives just for larfs. What kind of person does this? And, best part of all, everyone's stuck with her, forever apparently. As a character it makes her interesting to watch in action, and you could argue she gives many Gensokyans a purpose in life. But on the other hand, so does Vladimir Putin, so seriously, Yukari is definitely among the worst.
What's interesting, but maybe to be expected, in this thread is how people are describing character traits that I agree with, but have a completely different emotional response to. Like Critz's take on Cirno. I agree that that's Cirno's behavior. I think it's what makes her endearing. But at the same time, stuff like Yukari's gleeful sociopathy is pretty indisputably terrible.
Yukari sometimes steals Reimu's food. I'm not particularly aware of her playing any other pranks in the canon just for the sake of pranking.
She does, however, do a lot of plans and schemes for the good of Gensokyo or for the good of others that she disguises as pranks. Like attacking the three fairies and scaring the hell out of them when it was really a test to see if they could take care of a tree that was part of the border (IE, for the good of Gensokyo). Or taking Rinnosuke's IPod in an intrusive manner, but that IPod risked dragging Rinnosuke into the real world.
It's never even stated if she's doing it for shits and giggles, far as I recall. If anything, I'm inclined to think she's doing it for the same reason she did it in Silent Sinner in Blue. IE, she wants people to fear her because she's a youkai, and thus covers up her good deeds as pranks and such so that people will hate (and thus fear) her. If everyone knew she was actually benevolent and if she was nicer to everyone about all these things she did for their own good and the good of Gensokyo, people would stop fearing her and for a youkai, that's not just a matter of pride. That's a matter of EXISTANCE. Of course, that's just a theory I have based on all the work she went through just to play a prank massive enough to get even Eirin to fear her explicitly because humans were supposed to fear youkai as a matter of nature or whatever. It's not explicitly stated that's why she makes everyone else fear (through hate) her too but, far as I can tell, it's not explicitly stated that she inwardly sadistically cackles in glee whenever she pokes people in aggravating ways to get them to do things, either. And as mentioned, she did donate money to Reimu secretly (again, doing good deeds but not wanting anyone to know).
(of course, I'm in the camp that she lost the Lunar War on purpose so youkai would never again go too far, but doesn't want anyone to know, and caused the great hakurei barrier debate on purpose so humans would have some free room to flourish, but doesn't want anyone to know, made the spell card contract with Remilia to usher in Gensokyo's new golden age of paradise, but doesn't want anyone to know (so she arranged things so that Reimu got credit for drafting the spell card rules instead), and possibly even was the one that sealed away the ayukashi tree using Yuyuko's body because it was murdering too many people, but again, doesn't want anyone to know. Can't prove any of that, though beyond circumstantial evidence. But eh, at least there IS circumstantial evidence for it, IMHO)
Even her beating of Ran she claims is for Ran's own good (at least, as Yukari claims). I'm inclined to believe Yukari sincerely believes that claim, as we've seen Yukari's own perspective of Ran and she clearly really does think of Ran like that. Now, this isn't necessarily a good thing (if anything, it really does show that Yukari's a bit kooky in the head. Then again, her idea of reality possibly really is the reality of Gensokyo) but it does at least show she didn't particularly mean any malicenous out of it. It's a case of Blue and Orange morality, if anything (which again, is not necessarily a good thing but at least shows she's not outright trying to be evil or anything).
The stories that take place from her perspective weren't particularly smug in the narrative, IMHO. She's always outwardly smug when she's talking to people and her outside dialogue is really smug, but her own inner thoughts weren't as far as I could tell, at least in terms of her thinking things like "I'm the greatest and better than everyone else!". She mostly seems to spend her thinking time just puzzling things together to herself because she finds that sort of thing interesting. I guess she's sometimes dissappointed when other people don't even try to think about things (like when she goes from door to door in A Flower Blooming Violet and everyone just gives her really lazy answers when she asks if they know why the flowers are blooming) but that's more "sad" than "smug" (her own inner thoughts had her humbly thinking that she couldn't remember the reason, either). Like everything else, I suspect her smugness might actually just be an act to make sure people keep fearing her. Her true personality from her own inner thoughts seems to be a really geeky introverted scholar, really (kinda like, a lonely Maribel with no Renko to talk to, come to think about it. All Yukari's attempts to sincerely talk to anyone else about philosophy things in A Flower Blooming Violent really just resulted in them giving her the equivalent of blank stares and her attempts to discuss philosophy with Ran mentioned in CiLR apparently always gave equally dissappointing results).
TL;DR: Yukari has almost always done things for the good of Gensokyo or for the good of others but always does it in a way and with a smug "unnerving smile" (according to Rinnosuke and several others, IIRC) expression that gets people pissed off at her (and often without knowing she did it for the good of Gensokyo). Her interactions with Eirin shows that this might actually be on purpose in order to make sure people continue to fear her as a youkai, which is necessary (as far as we know) because youkai are supposed to be feared, and her own narrative perspective (from CiLR and A Flower Blooming Violet) might indicate that the smugness too is not her real personality (which is possibly actually just "philosophical nerd").
(My memory could be off on all of this. It's actually been years since I've last read those stories, come to think about it)
On a Different topic: Nitori and Kappa are pretty much confirmed to eat humans too. Or at least, their anus balls. It's mentioned before in spell card texts and SoPM, but if people weren't taking that seriously, chapter 22 of Wild and Horned Hermit has Nitori almost blurt it out but stopping herself mid-sentence because she was in the presence of humans at the time. Interestingly enough, it's in part because they need some salt intake because there are no seas in Gensokyo, which then makes me think of Chef's "Chocolate salty balls" song in South Park.