You can use unique gems and emeralds in order to learn spells in the ancient totem.
Each spell is useful for thieves. There are two types of spells - temporary and permanent. Temporary spells can be learned once, and they will be active within a certain time. After time is up, you can purchase a temporary spell again. The effect of a permanent spell does not disappear, and it increases when you upgrade it.
Tap on the exclamation mark next to the name of the spell, and you'll be able to read the description of the spell: what type it is (permanent or temporary), and the maximum number of levels for permanent spells.
You get extra experience points when you learn new spells or upgrade them.

Temporary spells:

1. Unstoppable thief: let you skip a dungeon for free when attacking other players.

2. Proficient thief: gives an extra chance to steal a gem from other player.

3. Skilled defender: gives an extra chance to defend your gem from other players' attacks.

4. Rescuer: gives an extra chance to retrieve gems automatically.

Permanent spells:

1. Trap engineer: decreases trap upgrade time.

2. Generous totem: gives an extra chance to get bonus magic item.

3. Seeker: gives additional tears in the maze chest.

4. Totem revival: gives a chance to restore a broken totem for free.

5. Wise builder: decreases skill upgrade time.

6. Best friend: gives an extra chance to retrieve a gem to your friends or guildmates.

7. Justice: gives an extra chance to retrieve your own gem.

8. Precious treasure: when you save a gen in the Treasure Hall, it gives you a chance the rating of your saved gem will be increased.

9. Insatiable: gives an extra chance to add more bonus rating to stolen gems.

10. Lucky Thief: gives an extra chance to find an additional reward after attacking other players.

11. Quickie: gives an extra chance to save your trap layout in just one try.