Save an audit to the hosted Store Skills viewer
After each newly completed local audit, save the validated report, viewer context, issue statuses and supported screenshots to the merchant’s Store Skills account through their approved connection. The merchant can then open the report on another device. Saving uses no additional audit.
Before you save
Use the validated report and context from local audit results. A closed or unavailable local viewer does not affect saving. Honor a request to keep a run local. Opening an old report does not trigger an upload.
During setup, explain that this device will automatically save future completed audits and their supported screenshots. If the Store Skills MCP connection already offers save_result, use it without asking again for each report. Otherwise, guide the merchant through the one-time device approval and reconnect the agent:
npx glue-fast login --site https://glue.fast --save storeskills/run-store-skills
A reading login or viewer sign-in alone cannot save. If permission is declined, revoked or unavailable, keep the report local and tell the merchant it is available only on this device. They can enable saving later and ask to retry that report.
Save
Use Python 3.9 or newer and resolve <installed-skill> to this installed skill directory.
-
Prepare the portable copy:
shellscript python3 "<installed-skill>/scripts/save_audit.py" prepare "/absolute/external/run/report.json"If the local viewer was opened with
--context, pass the same--contextfile toprepare, including on retries.It prints
saveResultArguments. It also listskeptOnThisDevice: screenshots that were too large or too many to save. Tell the merchant about those. -
Call
save_resultwith exactly those arguments. -
Pass the tool's output to the script, which uploads each listed file:
shellscript python3 "<installed-skill>/scripts/save_audit.py" upload "/absolute/external/run/report.json" --response "/absolute/path/to/begin-output.json"If it prints
saved: true, the report already committed and the receipt is recorded. Otherwise it prints the finalize arguments for the next step. -
Call
save_resultwith those arguments. The output is the receipt. -
Keep the receipt beside the report:
shellscript python3 "<installed-skill>/scripts/save_audit.py" record "/absolute/external/run/report.json" --response "/absolute/path/to/finalize-output.json"
After recording the committed receipt, link the saved audit at https://runstoreskills.com/runs/<receipt.resultId>/. The merchant opens it using the same account that approved this device. Name any screenshots that stayed on this device.
What is saved
The script builds a copy in report.json.glue-save/ beside the report and leaves the original untouched.
- The report, with every Check ID, Issue, outcome, caption and their order preserved.
- The viewer context for the same pinned Checks.
- The Issue statuses already set in the local viewer.
- Only the screenshots the local viewer would show: raster images the report references inside its own directory.
Each saved screenshot uses its content digest. The exporter replaces a local file address and the remaining text on that line with attachment:local-only. File names can contain spaces, quotes and punctuation. Explicit web URLs and digest-based attachment references on the same line still travel with the report. Put other evidence on a separate line or use repository-relative source locations. Standard Shopify routes stay readable. Use full HTTPS URLs for custom storefront routes. A screenshot over 4 MiB, or past 25 MiB or 61 images in total, stays local and shows as unavailable in the saved copy.
Retry and resume
The script keeps the save ID in report.json.glue-save.json beside the report. Repeating a step is always safe.
- Lost connection or a failed step: run
prepareagain and continue from step 2. The save ID is the same,save_resultlists only the files still missing, and nothing is saved twice. - No answer after the last step: run
prepareagain and callsave_resultwith its arguments. An audit that was already saved returns its receipt; record it. upload_expired: a save left unfinished for 30 minutes is discarded. Start again from step 1; the save ID is reused.conflict: the report changed after it was prepared. Runprepareagain; a changed audit gets a new save ID.forbiddenor the tool is missing: follow "Before you save" to approve saving.app_pausedorquota_exceeded: tell the merchant the reason and stop. The local audit is unaffected.
To check a report, run save_audit.py status with its path.
A failed save never changes Check outcomes, never becomes a storefront Limitation and never calls for another audit. Do not rerun Checks to retry a save.