This article discribes the workflow of downloading a script from Agisoft GitHub page. The script from the article Script with general processing workflow is used as an example.
Open the page with the script using the following link:
https://github.com/agisoft-llc/metashape-scripts/tree/master/src/samples
Open general_workflow.py script (click on the *.py file) as shown in the animation below:
Click Raw button:
The page with raw code will open up. Right click on the page to access context menu and select Save page as... command:

Then specify the path to the folder where the script should be saved and click Save button. The script will be downloaded as a file in *.py format.