When using the templates you will usually see a folder and many files that are named something like "x_YOUR_y_NAME"; you need to edit those.

1. File names
Essentially rename every file and the folder itself (I recommend using some program such as Bulk Rename Utility to do this faster) into the name of your addon weapon/mask/whatever.
Make sure you rename only the capitalized parts. For example, we have "wpn_fps_mel_YOUR_MELEE_NAME" and our melee is called "shovel_improved" we rename each YOUR_MELEE_NAME into that.
The result will be wpn_fps_mel_shovel_improved.

2. Inside the files
Now after our folder and all of our files are renamed, we need to update this data inside the following file types: unit, object, and material_config. Additionally, the main.xml file.
For this, I highly recommend using a text editor (not notepad). This can be either Notepad++, Visual Studio Code, etc.
After that, use the find tools there (Google it if you don't know how to use them) to find all cases of YOUR_MELEE_NAME and replace them with your addon name.
So in this case, "shovel_improved". 
You can set the search directory to the root of the mod to replace the data in main.xml too.