You can cast a spell into an object as a trap.
Prerequisite: Knowledge (dungeoneering) 1 rank.
Benefit: A trap spell may only be cast on an object that can be opened and closed and has one (and only one) closure. Rather than going off immediately, the trap spell is held in stasis until it is set off. When someone other than you opens the object, the trap spell goes off. If the trap spell targets an area, you select the center of that area when casting the spell (that point must be relative to the object—centered on the object, centered 10 feet in front of the object, etc.—rather than the location the spell is cast). If the trap spell targets one or more creatures, the creature opening the object becomes the target of the trap spell. The item into which a trap spell is cast is not harmed when the trap spell goes off.
You can use the trap spell‑infused object without discharging the trap spell. While casting a trap spell, you can also create a password that, if spoken aloud, will allow others to use the object without discharging the trap spell. A trap spell‑trapped item cannot have a second closure or warding spell placed on it. A knock spell does not bypass a trap spell. An unsuccessful dispel magic spell does not detonate the spell. Magic traps such as a trap spell are hard to detect and disable. A rogue (and only a rogue) can use the Perception skill to find a trap spell and use Disable Device to bypass it (though the trap spell will reactivate once the item is closed again). The DC in each case is 25 + the trap spell’s original spell level.
A trap spell uses up a spell slot three levels higher than the spell’s actual level.
The Genius Guide To: Feats of Metamagic