You can save those scripts to code snippets to reuse them. There should a "Code sample" button on the top-right corner of the code editor.
You can edit or duplicate your previous snippets should they need to be updated. And you can use tags to organize numerous snippets.
For more custom recipes that can also take parameters, you can author Plugins for DSS which can contain recipes (Python, R or Scala), but I think the snippet feature seems more adapted to your current use case.