I prioritize based on what's available. Usually I'll get a skillbook or two first, but there might be equipment that is worth getting first.
Slightly unrelated, but jeez, I wish you could swap items between characters on the trade screen
I wish you could just access your entire inventory right there, removing the need to swap items around. Since Bartering doesn't affect the entire party, just the character actively trading, it makes trading kind of a pain since you have to shuffle your inventory around. Would be better if we didn't need to shuffle items around at all.