I got to the point when wishing to build and organize a decent library of smart materials for Blender (something like you can have in 3D Coat or Substance Painter if you don't mind using proprietary software). I got really tempted to start making such library when Blender 2.79 officially included the material library addon called MatLib VX.
But alas, even this useful addon MatLib VX doesn't bring any significantly new functionality to Blender. It just uses the existing append/link feature which enables you to include various datablocks from external Blender files. And here comes the problematic aspect of appending materials from external files. Imagine your materials use custom node groups (like shader setups, etc). Then every time you append a material, Blender automatically creates numbered duplicates for all node groups with the same name, even when the groups are supposed to be exactly the same! And this means huge mess in your node groups. A similar problem occurs when you are appending mesh assets containing the same materials.
So, to fix this bug/feature, I have created a simple script that eliminates all these duplicates after you append materials from your external files. It searches all existing node groups, materials, worlds and if finds any duplicates (ending with .001, .002, etc), it replaces them with the original group or material if it is found.
After running the script the eliminated node groups and materials will have zero 0 users, so after you save and reopen your file, they should disappear and your group list should be clean and tidy :)
Now, I'm thinking I will include this code in my another addon Extra Material List, which displays materials in a more comfy way than the default short pop-up list.