10 minutes (Material, Somatic, Verbal)
Range touch; Targets one container or 10-foot-by-10-foot area
Duration unlimited until dismissed
While Casting this spell, you also Cast a Spell of a lower spell level to stored in the glyph. The stored spell must take 3 actions or fewer to cast, have a hostile effect, and target one creature or have an area. You can set the glyph with a password, a trigger stimulus, or both. Any creature that opens the target container or enters the target area without speaking the password or matching the trigger stimulus activates the glyph, releasing the harmful spell within.
Once a spell is stored in the glyph, the glyph gains all the traits of that spell. If the spell targets one or more creatures, it targets the creature that set off the glyph. If the spell has an area, that area is centered on the creature that set off the glyph. Glyph of warding’s duration ends when the glyph is triggered. The glyph counts as a magical trap, using your spell DC for both the Perception check to notice it and the Thievery check to disable it; both checks require the creature attempting them to be trained in order to succeed.
You can dismiss glyph of warding with a Verbal Casting action.
The maximum number of glyphs of warding you can have active at a time is equal to your spellcasting ability modifier.