All Spells
Arcane | Divine | Elemental | Occult | Primal
Focus Spells | Rituals

There is a Legacy version here.

PFS StandardQuandarySpell 8

Concentrate Extradimensional Manipulate Teleportation 
Source Player Core pg. 351
Traditions arcane, occult
Deities Baphomet, Nethys
Cast [two-actions]
Range 30 feet; Targets 1 creature
Duration sustained
You transport the target into an extraplanar puzzle room of mysterious origin, locking them there. Once each turn as a single action, the target can attempt an Occultism check, Perception check, or Thievery check against your spell DC to solve the puzzle. Teleportation effects can't carry the target outside the puzzle room unless they can also traverse the planes, such as interplanar teleport. When the spell ends, the target returns to the space it occupied when it was banished, or to the nearest space if the original is now filled.

Critical Success The target solves the puzzle and escapes.
Success The target is on the right path to the solution. If it was already on the right path, it solves the puzzle and escapes.
Failure The target makes no progress toward a solution.
Critical Failure The target makes no progress and, if it was on the right path, it no longer is.