This AddOn allows you to use /click PetSpecialAttackButton in macros to use your current pet's special ability. It will probably work with Stampede.
It can also update a macro's icon to show your current pet's special ability, just set your macro's name at the top of core.lua. The icon doesn't always update properly when you summon a pet for the first time, so you can use /psab_update or /psabu to manually trigger an icon update.
It works in all locales except Korean, because Wowhead isn't available in Korean. The pet family names may be incorrect for Traditional Chinese (Taiwan) because Wowhead is only available in Simplified Chinese (China).
You can view the source code of this AddOn on GitHub.
Thanks to Tybudd for posting this thread on the official UI and Macro forum, which inspired me to write this AddOn.
Restructure repository for p3lim's AddOn Packager Proxy
Change generate script to generate abilities for all available locales
-- Add strict and PrettyPrint depenencies for generate script
-- Add all generated abilities files
-- Move generate script and depenencies to subdirectory
Add Stone Scale override for Basilisk
Add German (deDE) abilities
Contributed by Baine of WoWI
Add override abilities for Nether Ray and Rylak
Fix typo in generate script
Update generate script to use new BNet API
Update overrides and abilities_enUS.lua with current (6.0) data
Bump TOC Interface number
Add missing comma to abilities_enUS.lua
Change generate script to add a trailing comma to the abilities table
Add option to update a macro's icon with the current pet's special ability
Add slash command (/psab_update, /psabu) to manually trigger an icon update
Change EXCEPTIONS table to OVERRIDES in generate script
Change output for each family to show whether the selected ability is an override
Add overrides for Cat, Shale Spider and Silithid as per Tybudd's recommendations
Re-generate abilities_enUS.lua with these overrides
Add manual ability exceptions to generate script
Default exception list is Surface Trot for Water Strider
Re-generate abilities_enUS.lua with this exception list and sort entries into alphabetical order
Fix macro not being initialised properly at login
See my post at http://us.battle.net/wow/en/forum/to...4980?page=2#23 for an explanation of the issue and the solution.
Add option in generate script to use exotic abilities where possible.
Re-generate abilities_enUS.lua with this option enabled.
Fix "Attempt to index global 'ns' (a nil value)"
Add .pkgmeta for CurseForge packager
Change TOC to use CurseForge's version
Update README.md with information about availability from Curse/WoWI