You should be able to access the current user object and that will show you what groups the user knows that they are a member of. It’s already loaded for every user, so you’ll access the plugin api like any other theme that looks at the current user. There are examples of your go through Theme Developer Quick Reference Guide and look around.
This topic that is a recommended topic for this one has an example: currentUser.groups doesn't match group_users table