assigning scripts to a rig via editor script tool

Hi,
Im very new to Editor scripting and getting stuck on selecting components by name.

I want to be able to run a tool thatll apply scripts to different bones, meshes etc of a rig. based on the naming conventions of that component.

I seem to be able to assign scripts to new gameobjects and selected gameobjects, but what I need is a tool that will look thru my character hierarchy and apply a scripts to named components. I assume this is possible(?)

this script is me trying to apply a single script to named components ‘thing’ (and failing)

using UnityEngine;
using UnityEditor;


public class CharFaceRig : ScriptableWizard
{
    [MenuItem("My Tools/Create FaceRig Wizard...")]
    
    static void CreateWizard()
    {
        ScriptableWizard.DisplayWizard<CharFaceRig>("Create Character", "Create new", "Update selected");
    }

    void OnWizardCreate()
    {
        string[] guids1 = AssetDatabase.FindAssets("name:thing");
        foreach (string guid1 in guids1)
        {
            GameObject obj = Selection.activeGameObject;
            Character characterComponent = obj.AddComponent<Character>();
        }
    }
}

thanks

1 days and a half later I worked it out.
Didnt realize you can still use Monodevelop for this

using UnityEngine;
using UnityEditor;

public class CFR : MonoBehaviour
{
    [MenuItem("Tools/Rig...")]
    static void assignScriptThing()
    {
        GameObject Thing = GameObject.Find("thing");
        if (Thing != null)
        {
            Thing.AddComponent<lookAt>();
        }
    }
}

What Im now trying to work out is how to apply this only to children of a selected asset.
I might have the same rig with the same naming convention and need control over which characters have the scripted applied.

Thanks