Shape Actions In Photoshop | How To | Recording Tools | Graphicxtras
Display the actions panel (this can be found in the window menu). Go to the right side menu. Select the 'allow tool recording'. Now use the custom shape tool (or another tool) and create. Once this is done, the everything is recorded though sadly not always in the way you would expect. It will store information such as the name and will expect / use that during playback.
Display the panel and then and select the tool. Select the layer option in the top left and select the required preset. Click the new action button in actions panel. Apply the tool as required and then Stop recording. The position, type, color, effects etc are all stored. You can place it in an existing set or create a new set as well as set up a function key as well as a color for this.
You can see the steps via the panel by expanding the entry. You will notice that the panel lists 'make fill layer' (that is the action of adding the shape). You can also expand that out as well and see all the information stored such as color, position, stroke details, name etc. There is a lot of fairly obscure information added as well such as stroke dash set, without stroke scale lock etc
It stores the name and if a path is called 'xyz' then it will use 'xyz' preset each and every time it is played back. Before you do any work, set the name of the preset to something and then store all the steps as described above. When you come to apply the playback, go to the preset and rename it to something else and then go to the another preset and rename that to 'xyz' and then use the playback button.
You can also use exactly the same as above but with brushes. Any brush strokes whether paint, clone, art history etc, all can be recorded. https://youtu.be/Tv5nCZWm-mg
You can create one with the current layer and the current layer can be triangles, rectangles etc but it has to be selected. Go to the panel and store the steps (bottom of the panel - second button) and you will see the current layer will be used in steps, say as you move and tweak it. Stop. On playback, if you run it without anything selected, an error message will pop saying that the step copy is not available (quite often you will see this panel). Run it with a layer etc and then it will apply all the steps such as duplicating the items etc https://youtu.be/yPIuq1u2hbA