You will likely get a lot of errors if a class special isn't added to the character by a class or by a custom class special. They depend on those linkages to set many values, so if you make them bootstraps of a feat, you'll run into a lot of problems.
I'd suggest you look at the script on the Ranger's Master Hunter ability. It adds additional text to the description of things it finds - in that case to the favored enemy selections.
To figure out what you're looking for, add a finesse weapon (rapier) a non-finesse weapon (longsword), and a light weapon (dagger) to a blank character.
In the develop menu, make sure that the first option, "Enable Data File Debugging" is checked, then right-click on each of the weapons, selecting "Show Debug Tags for XXX" for each one. Compare those two lists, and you'll find that weapons like rapier, that are specifically noted as being finesse weapons, all have the Helper.Finesse tag. Light weapons, like a dagger, will all have wClass.Light.
You'll also look through all the weapons to find a component tag which seems specific to them - in this case, component.BaseWep.
Now, let's construct something to search for weapons:
and then make it more specific, so it's only finding finesse weapons or light weapons:
Code:
foreach thing in BaseWep where "wClass.Light | Helper.Finesse"
Once you're inside that foreach loop, modify the description text (this started out as the amendthing line from the Ranger's Master Hunter ability):
Code:
perform eachthing.amendthing[description,eachthing.field[descript].text & "{br}{br}{b}Addition from Find the Mark{/b}: Enter the description of what happens here"]
Assembling that, with the standard introductory check, and closing the foreach:
Timing: Post-Level/10000
Code:
~if we're not shown, just get out now
doneif (tagis[Helper.ShowSpec] = 0)
foreach thing in BaseWep where "wClass.Light | Helper.Finesse"
perform eachthing.amendthing[description,eachthing.field[descript].text & "{br}{br}{b}Addition from Find the Mark{/b}: Enter the description of what happens here"]
nexteach