Useful macros for priests

Resurrection Announcer
/stopmacro [stance:1][combat] /cast Resurrection /stopmacro [nohelp][nodead] /ra Resurrecting %t.
 * Verified: 4.0.3a
 * Use: Casts Resurrection and announces it to the raid if your target is friendly and dead. Does not execute if you're in combat or in Shadowform.

Shadowfiend/Mindbender target switch
/startattack /cast Shadowfiend /targetlasttarget
 * 1) showtooltip Shadowfiend
 * Verified: 5.0.5
 * Use: Allows the priest to cast Shadowfiend or Mindbender with a friendly target. /startattack automatically selects the nearest hostile target. Shadowfiend/Mindbender is cast on that target, and the previous target is then re-selected, all taking place within a fraction of a second, allowing the priest to continue healing without interruption. NB: This talent works without modification for priests with the Mindbender talent; the Mindbender is automatically substituted for the Shadowfiend when this macro is used (including the tooltip).
 * Benefits: Saves healing priests from having to manually select a hostile target to cast Shadowfiend on, saving time and minimising interruption. This is mainly useful when the Shadowfiend is being used for mana restoration, making its damage contribution relatively insignificant.
 * Drawbacks: The use of /startattack does not allow the priest to specifically choose the target for the Shadowfiend. Since some targets (such as kiting classes) are far worse targets for this purpose, priests may prefer to select their target manually. If used when a hostile target is already selected, /targetlasttarget will cause you to switch to your previous target.

Power Word: Solace smart targeting
/cast [harm][targettarget,harm][focus,harm][focustarget,harm] Power Word: Solace
 * 1) showtooltip
 * Verified 5.0.4
 * Use: If your current target is hostile, it casts Power Word: Solace normally. If your target is friendly and targeting an enemy, it casts Solace on your target's target. If neither of these conditions are met and your focus is hostile (for example, if you are focusing a boss), it casts Power Word: Solace on your focus, while if your focus is friendly (for example, if you are focusing the tank) and your focus is targeting an enemy, it casts Power Word: Solace on your focus's target.
 * Benefits: Allows you to cast Power Word: Solace for mana without needing to change your target or interrupt healing.
 * Can also be used for other damaging spells such as Holy Fire or Smite, and for Shadowfiend.

Heal smart targeting
/cast [help][targettarget,help][focus,help][focustarget,help] Heal
 * 1) showtooltip
 * Use: If your target is friendly, it casts Heal on your target. If your target is hostile and targeting an ally (such as a boss attacking the tank), it heals your target's current target. If neither of these conditions are met and your focus is friendly (for example, if you are focusing the tank), it casts Heal on your focus, while if your focus is hostile (for example, if you are focusing the boss), it heals your focus's target.
 * Benefits: Allows you to auto-target the current tank in fights with tank switching.
 * Can be used with other healing spells and defensive buffs such as Power Word: Shield.

Lightwell
/p Welcome to Lightwell. Please click Lightwell from up to 20 yards away for a HoT. Lightwell is usable while casting or stunned. Lightwell has limited charges, so do not click Lightwell unless healing is needed. /cast Lightwell
 * 1) showtooltip Lightwell
 * Verified: 4.2.2
 * Use: Automatically announces your Lightwell to the party and explains its use. There are a range of Lightwell macros available online, mostly due to the lack of awareness found to exist within the community (especially pugs). Many priests find that without explaining or at least announcing the placement of their Lightwells, little or no benefit is gained from placing them.
 * Note you can replace '/p' with '/ra' for use in Raids, or '/bg' for Battlegrounds.
 * The message itself can of course be changed as desired.

Divine Hymn
/use 13 /use 14 /cast Divine Hymn
 * 1) showtooltip Divine Hymn
 * Validated: 4.2.2
 * Use: Maximizes healing effect of Divine Hymn by combining it with the use of both trinkets.
 * Note: If one of the trinkets is on cooldown, it will still use the other. If you don't want to use your first and/or second trinket in this macro, omit the 2nd or 3rd line.
 * Note: Other haste-increasing cooldowns (such as Lifeblood (herbalism ability) or Berserking) can also be added to the macro, maximising the healing gained from Divine Hymn. As haste stacks multiplicatively, maximum benefit is often gained from using all haste cooldowns at once.

Atonement
/castsequence [@targettarget, harm] reset=10 Holy Fire, Smite, Smite, Smite, Smite, Archangel /castsequence reset=10 Holy Fire, Smite, Smite, Smite, Smite, Archangel
 * 1) showtooltip

This macro will cast Holy Fire, then Smite four times, on your target if it's an enemy, or on your target's target (e.g, the tank) if your target is friendly. Archangel is included at the end for convenience; you can choose to delete Archangel from the end of both sequences and activate it manually if you wish.

While this macro is convenient, it does have some drawbacks. If any ability in this sequence is on cooldown, the macro will continue trying to cast that spell until it is available, preventing the priest from dealing further damage/healing. It may therefore be preferable to omit Archangel, due to its 30-second cooldown. In addition, when not chain-casting, Holy Fire will usually become available before the end of the sequence. The macro will not cast it until the sequence is complete, potentially wasting damage, healing and efficiency, albeit in exchange for convenience.


 * Validated: 4.2.2

/cast [harm] Smite; [@targettarget] Smite
 * 1) showtooltip

This macro causes the priest to Smite the target, or if the target is friendly, the target's target. This is very useful when tank healing, as it allows the priest to continue targeting the tank while healing via Atonement. It also ensures that the target hit by Smite is the tank's current target, which should minimise the significance of the aggro this generates for the priest. Priests may also wish to use the same macro design for Holy Fire:

/cast [harm] Holy Fire; [@targettarget] Holy Fire
 * 1) showtooltip


 * Validated: 5.0.5

Clip-prevention Mind Flay
/stopmacro [channeling] /cast Mind Flay
 * 1) showtooltip
 * Validated: 4.3.4
 * Use: Casts Mind Flay, providing you are not currently channeling a spell. This can be used to prevent clipping Mind Flay before it is fully cast.
 * Drawbacks: Without this macro, casting Mind Flay with a single tick remaining will cause that tick to be added to the new cast. This makes it easier to channel Mind Flay continuously without interruption. Using this macro requires the priest to use far more precise timing when chain-casting Mind Flay.