Spell Gem

From Out of the Abyss, page 223.

Description
Wondrous item, varies (attunement optional)

A spell gem can contain one spell from any class's spell list. You become aware of the spell when you learn the gem's properties. While holding the gem, you can cast the spell from it as an action if you know the spell or if the spell is on your class's spell list. Doing so doesn't require any components, and doesn't require attunement. The spell then disappears from the gem.

If the spell is of a higher level than you can normally cast, you must make an ability check using your spellcasting ability to determine whether you cast it successfully. The DC equals 10 + the spell's level. On a failed check,the spell disappears from the gem with no other effect.

Each spell gem has a maximum level for the spell it can store. The spell level determines the gem's rarity and the stored spell's saving throw DC and attack bonus, as shown in the Spell Gem table.

You can imbue the gem with a spell if you're attuned to it and it's empty. To do so, you cast the spell while holding the gem. The spell is stored in the gem instead of having any effect. Casting the spell must require either 1 action or 1 minute or longer, and the spell's level must be no higher than the gem's maximum. If the spell belongs to the school of abjuration and requires material components that are consumed, you must provide them, but they can be worth half as much as normal.

Once imbued with a spell, the gem can't be imbued again until the next dawn.

Deep gnomes created these magic gemstones and keep the creation process a secret.