As a followup to Riggy Bit #1, Here's a few of my rigging scripts:

#MIT License
#Copyright 2019 Joseph Brandenburg

#Permission is hereby granted, free of charge, to any person obtaining a copy 
#of this software and associated documentation files (the "Software"), to deal in
#the Software without restriction, including without limitation the rights to
#use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 
#the Software, and to permit persons to whom the Software is furnished to do so,
#subject to the following conditions:

#The above copyright notice and this permission notice shall be included in 
#all copies or substantial portions of the Software.

#THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
#IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 
#FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
#COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
#IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
#CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

#Some small scripts to copy into the console.
#Note: the scripts that deal with constraints use a try/except block
#   because some bones will not have constraints, some constraints
#   will not have the properties checked for. Solves two problems in one go.
#   This also leaves the rigger the option to add logic on exceptions.
#   finally, these scripts are not meant to be optimized for performance, but
#    rather, to be used while working. They don't need to be polished!


#I like to use this naming convention:
#    TYPE-BoneNameAndDescription.###.chirality
#    this is usually sufficient for my rigs, sometimes I add a second .###
#    especially with controls ("CTRL-Finger.2.000.L")
#    I still have the _ character to add additional info or use for chirality
#    if .l or .r causes a problem

#This script replaces ONE underscore with ONE dash
#EDIT MODE
for b in C.selected_bones:
    s = b.name
    s = s.replace('_','-', 1)
    b.name = s
#POSE MODE
for b in C.selected_pose_bones:
    s = b.name
    s = s.replace('_','-', 1)
    b.name = s

# This script removes a constraint by name
# TODO: modify to use a list of names, remove each
#POSE MODE ONLY
for b in C.selected_pose_bones:
    try:
        for c in b.constraints:
            if (c.name == "PrimaryRotation"):
                b.constraints.remove(c)
    except AttributeError:
        pass

#Find and replace in names
#EDIT MODE
for b in C.selected_bones:
    try:
        s = b.name.replace("ReverseSpineCenterParent", "SpineRotationBasis")
        b.name = s
    except AttributeError:
        pass
#POSE MODE
for b in C.selected_pose_bones:
    try:
        s = b.name.replace("Copy Rotation.001", "PrimaryRotation")
        b.name = s
    except AttributeError:
        pass

#Find and Replace Constraint Names:
#POSE MODE ONLY

#POSE MODE
for b in C.selected_pose_bones:
    for c in b.constraints:
        try:
            s = c.name.replace("Copy Rotation", "RotationHelper")
            c.name = s
        except AttributeError:
            pass

# This script changes the target/owner space in a script
#POSE MODE ONLY
for b in C.selected_pose_bones:
    for c in b.constraints:
        try:
            if (c.owner_space == 'LOCAL_WITH_PARENT'):
                c.owner_space = 'LOCAL'
                c.use_offset = False
            if (c.target_space == 'LOCAL_WITH_PARENT'):
                c.target_space = 'LOCAL'
                c.use_offset = False
        except:
            pass

# a few more scripts for editing properties of constraints
# These were written off the cuff, for the specific rig.
obArm = C.active_object
for b in C.selected_pose_bones:
    n = b.name.split("MECH-ReverseSpineParent")
    nTar = "MECH-SpineRotationHelper" + n[-1]
    # this line uses the number from one bone to get the corresponding bones
    # in a different chain.
    for c in b.constraints:
        try:
            c.subtarget = nTar
        except:
            pass

# this script creates a new constraint on many bones, targeted to the current
# selection.
a = C.active_pose_bone
for b in C.selected_pose_bones:
    c = b.constraints.new('COPY_SCALE')
    c.target = C.active_object
    C.subtarget = a.name

And last, a sneak peek at one of my in-progress scripts. It's fully functional, but a little less than perfect. This script creates a constraint between a named and numbered bone in one chain targeted to a corresponding numbered bone on a different chain. To use it, simply write the name stubs of your bones in the bOwnNamePrefix and bTarNamePrefix, then select a bone with one constraint (which is used as a template- all its properties are copied, except the target/subtarget)

#MIT License
#Copyright 2019 Joseph Brandenburg

#Permission is hereby granted, free of charge, to any person obtaining a copy 
#of this software and associated documentation files (the "Software"), to deal in
#the Software without restriction, including without limitation the rights to
#use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 
#the Software, and to permit persons to whom the Software is furnished to do so,
#subject to the following conditions:

#The above copyright notice and this permission notice shall be included in 
#all copies or substantial portions of the Software.

#THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
#IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 
#FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
#COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
#IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
#CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.



# addConstraintsOnLikeNamedBones
#TODO: 
    #improve constraint copying using JSON to save constraint descriptions?
    # drivers should be copied with constraints. It SUCKS to do that manually

    #IMPORTANT: manage bone chirality before calling FindBonesByName by
    # splitting left and right bones into dictionaries or lists

    # copy the full constraint stack from cSource to bOwn

    # Is this case sensitive? It should be.


import bpy

def FindBonesByNamePrefix(bNamePrefix, obArm):
    bList = {}
    for b in obArm.pose.bones:
        bName = b.name
        if (bName.startswith(bNamePrefix, 0, len(bNamePrefix)) == True):
            # this only checks the beginning
            bNum = bName
            spl = bNum.split(bNamePrefix + '.')
            # spl == bName if anything is between bNamePrefix and the number
            # so that way checking for bone would work for bone and not boneAlso 
            if (spl[0] != bName):
                bList[spl[-1]] = b
                # a little ugly, I don't like to check !=

            # -1 to take the last item if bones have nested numbers
            #    i.e. --- "bone.000.000"
            #    haven't checked if it works, though
            #    THIS WILL MESS UP SYMMETRY IF .L/.R IS USED
            #    will need a function to strip chiral
            #    and then add it back in later
            # I'm saving the bone itself, Pose Bones should remain in context
            #    because thy belong to the object, not its data
    return bList



bOwnNamePrefix = "MECH-ReverseSpineParent"
bTarNamePrefix = "MECH-SpineRotationHelper"

cSourceBone = bpy.context.active_pose_bone
cSource =cSourceBone.constraints[0] #use the first constraint
#cName = "Rotation Helper" just give the source constraint the right name


obArm = bpy.context.active_object
bOwnList = FindBonesByNamePrefix(bOwnNamePrefix, obArm)
bTarList = FindBonesByNamePrefix(bTarNamePrefix, obArm)
sharedKeys = []
for k1 in (bOwnList.keys()):
    for k2 in (bTarList.keys()):
        if (k1 == k2):
            sharedKeys.append(k1)
print (sorted(sharedKeys))

for key in (sharedKeys):
    bOwnName = bOwnNamePrefix + "." + key
    bTarName = bTarNamePrefix + "." + key
    bOwn = obArm.pose.bones[bOwnName]
    bTar = obArm.pose.bones[bTarName]
    cOwn = bOwn.constraints.new(cSource.type)

    #stolen from TLousky https://blender.stackexchange.com/questions/41709/how-to-copy-constraints-from-one-bone-to-another
    for prop in dir( cSource):
            # This is fairly ugly and dirty, but quick and does the trick...
            try:

                setattr( cOwn, prop, getattr( cSource, prop ) )
            except:
                pass
    # end stolen
    #NOTE: this isn't actually stolen, just more fun than saying "source"
    # The whole point of stack exchange is to share code snippets.

    #
    #here the logic to find drivers, 
    # which are stored in obAr.data.animation_data.drivers
    #

    cOwn.target = obArm
    cOwn.subtarget = bTarName
    #cOwn.name = cName just give cSource the right name


    #pose.bones["Bone"].constraints["RotationHelperInverse.001"].influence