Spell Mastery

Type class
Name Spell Mastery
Class rogue
Brief Permanently learn spells you steal

Class Feat

Spell Mastery

Each time you steal a spell, you have a chance to master it by passing the appropriate spellcasting skill check (e.g. Arcana for Arcanist spells, Thaumaturgy for Thaumaturgist spells, etc), with a DC of 10 + 5 per rank. Failure has no ill effect. On success, if the spell is appropriate for your rank, you add it to your known repertoire.

This ability does not grant Mana or other resources. Spells that require such still require it, so you'd have to provide Mana somehow.