Your gateway to endless inspiration
I might have seen this said before, on a different post, but I couldn't find it, so I'm just gonna say a few words on this, partially because of that and partially because it's been ages since I've last read the series, despite it being ingrained into my head.
Almost all of the characters in TUC have moments where they are genuine assholes. Gregor has a few points where he says some genuinely disrespectful shit. Luxa, as well as most of the other humans (including Gregor, although arguably to a lesser extent), are deeply prejudiced against the gnawers. Ripred, is, well, Ripred (look, I love him, we all do, but he's a dick).
Even Vikus, arguably one of the nicest characters in the series, admires Sandwich (I think, been a while), a man who literally used poison to commit genocide in the name of stealing land that didn't belong to him.
The only characters I can think of in TUC that don't have flaws are the ones who also have the least lines: Aurora, Dulcet, Miravet. Oh, and all of those characters? Probably also prejudiced against gnawers, just never explicitly stated (to my knowledge), probably due to their obscene lack of lines. Of course there are characters like Lizzie and Hazard, who are literal fucking children so as nice as they are, I think it's safe to say they can't really be counted up here. (Should probably also mention that Gregor and Luxa are also children, just ones that were forced to grow up faster, sadly).
Then again, all of these characters have redeeming qualities. Gregor can be disrespectful at times, but that's mainly because of the stress placed upon him by the various bullshit situations he has to go through, and he usually apologizes after. Luxa and all the humans are deeply prejudiced (actually, I should probably add the fliers might be in that category too), but they are basically raised from birth to hate and kill gnawers, and vice versa. plus, it's shown that despite what is practically being brainwashed from birth, they can grow and change to overcome their own bigotry and accept gnawers as genuine people, as well as friends.
And yes, Ripred, the glorious bastard himself, is a dick. But he's also a war veteran who's lost his family, and most of the respect from his people, meaning he mainly works with humans, who tend to treat him with suspicion, if not outright hostility (until they get to know him). And he makes up for it by letting his guard down at times to be a father to the traumatized pups that dragged him into their pack.
Point is, flawed characters are one of the things that make TUC so great. They're not few and hid away either, they're everywhere, with visible flaws. If you want to make a good character, TUC is a great series to use as an example. Everything casts a shadow, just like every character has a flaw. If they don't, you probably just can't see them from your angle. And if they don't? Like, at all? Give them some, just make sure the shadow they cast matches up with the object itself.