@Fuzzy, it's in a template because the template does more that just this, but thanks for the tip about Alternative Racial Traits, that's how I made it work.
For future explorers, here are the steps I had to take. In this specific instance, I was replacing any racial poison attacks with a pair of new racial poison attacks that are specific to the template.
I created an Alt Racial Trait as a container, and added to it the poison special abilities I wanted, using the Universal Poison Ability, applied twice, once for each attack.
To the trait I added RaReplace.raDarPoiso tag to make it replace the poison ability of my test creature (in this case, a Dark Naga). Adding the tag manually was easier than hunting through the list of replaceable abilities to find the one I needed.
I deliberately did not add any races to the "Available to Races" section, as I didn't want this trait to be a pick for any race, but be only available via the template.
In the template, there isn't any regular way I could find to include an Alt Racial Trait in a template, but I could add the trait's id directly to the Bootstraps, and it applied it to the base creature just fine.
Having validated that it works with a specific poison attack, I wanted to make it work for (as much as possible) *any* poision attack. I removed the hard coded RaReplace tag, and added an eval script to search the base class for bootstraps with "HasAbility.raPoison", which appeared to be a common tag for racial poison attacks.
Code:
~set our focus to the hero's race
perform hero.findchild[BaseRace].setfocus
doneif (state.isfocus = 0)
foreach bootstrap in focus where "HasAbility.raPoison"
perform this.assignstr["RaReplace." & eachthing.idstring]
nexteach
This works just as I wanted. Two final cleanup steps remained. The Alt Racial Trait was showing up in the Special tab, but its abilities were covered by the poison abilities included in the trait. So I checked the "Upgrade - hide from list?" checkbox, and that went away.
Finally, the monster was showing a validation error because the monster race wasn't included in the list of "allowed" races. Since my template is covering the necessary restrictions there, and I didn't want this trait to be generally usable, I simply added more code to the eval script to add a tag for the current race to satisfy the validation.
Code:
perform this.assignstr["AllowRCust." & focus.idstring]
This would have been much easier if adding the "RaReplace." tag to the template functioned to replace the ability, but it appears Hero Lab only looks for replacement in the Alt Racial Traits group. But in the end I have everything working just as I hoped.
Thanks all for the tips!