1) It needs a deity source, which requires a valid deity sphere, a book file for names given to books that contain the secret, a histfig text which is what shows up in legends mode as "urist mcnecromancer learned the secrets of life and death" or whatever.
2) it needs the secret goal to be immortality or nobody will pursue it,
3) The target has to be valid, like targetting any mortal creature with blood and intelligence or a creature class like "general_poison" or "mammal"
4) the effect, linked to the target, should reference a syndrome which gives the properties you want the secret to offer.
It can accept multiple targets, like one that explicitly targets creature_class "male" and excludes "female" (the creatures have to have the [creature_class:male/female] added to the appropriate caste, then) and the other applies to both females and any that are not male (class wise, the game cant look for the actual male/female flag) or one which explicitly works for mammals (again a creature class) and one works for everything else. You can then apply unique syndromes to each class.
If they cant build a tower, and they live in either a human or dwarven site, then they should store the slab at the mead hall/castle, hillocks civic mound or fortresses temple/throne room. I have no idea where they store slabs in forest retreats or dark pits, or even caves; ive never found one stored in any of those sites. But dwarves can recover them from raids, sometimes.