In a comment on the post about Level Zero scholars creating scrolls, Andy Bartlett and I started discussing applying this to priests and miracles as well. I've written before about using the reaction roll/turn undead mechanic for working miracles through faith, but I'm not sure I mentioned that I like leaving NPC priests at Level 0. Instead of them having spells, it's the temple or shrine that has one or more spells. Different places have a reputation as a healing shrine, or an oracle (casting Commune,) or hallowed grounds safe from supernatural attack.
It works a bit more like spell research than creating scrolls.
The saint who establishes a shrine invests in it. Tithes and donations from the faithful pay for religious icons, altar decorations, stained glass, or whatever local custom sees as glorifying the divine. The miracle asked for, usually just a blessing at first, is assigned a spell level, and the value invested in the shrine is used to figure out the chances.
Example: Bless is a 1st level. Spell research for a 1st level spell costs a base 500 gp for a 1 in 20 chance of success, plus 1 in 20 for each additional 500 gp, up to 10,000 gp for automatic success. The GM rolls to see if the shrine is Blessed. Only the GM will know for certain until the shrine actually Blesses someone.
When one of the faithful prays for a blessing, roll a 2d6 reaction roll. A Good result means the worshipper is blessed. A Neutral result means the worshipper is blessed only if no Bad result has been rolled for that shrine. A Bad result means no effect, and a Very Bad result means that worshipper can never receive an answer to their prayers until they've made atonement of some kind. Either a Bad or Very Bad result means the shrine is less generous with its blessings, as already noted.
Until a shrine actually grants a blessing, a player has no idea if their prayers at a shrine are being ignored, or the shrine just isn't truly sanctified. Players could always try donating to the shrine. When they pray and have their prayers answered, not only does the player benefit, but so does the shrine; it is now officially sanctified.
Whatever spell effect a shrine has also establishes the shrine's Level. A basic shrine that provides blessings is a 1st level shrine. One that is known for raising the dead is a 5th level shrine. If the faithful pray for a new kind of miracle -- in other words, "research a new spell" for the shrine -- the minimum target number equals the shrine's current level, so a 5th level shrine always has at least a 5 in 20 chance of adding another miracle to its roster as long as someone invests a minimum of 500 gp. Famous shrines thus have a tendency to collect more miracles.