Preface
The Shiro theme has a "Personal Status Display" feature that can show some custom statuses.
To make full use of this feature, I wanted to sync the phone's activity-ring data into the personal status, with results like this:

Effect picture
At first I planned to write a JavaScript script and use the Scriptable app to achieve this. After trying, however, I found that Scriptable does not support HealthKit, so it can't access health data. On Apple devices, an app needs to use the HealthKit API to read health data, and Scriptable once tried to integrate HealthKit but was rejected by the App Store. So I had to settle for using Apple's built-in Shortcuts instead.
Update 2026.3.1: Due to too many limitations of Shortcuts, I have now switched to a self-written App + SideStore self-signing for automatic push.
Setting up Status Display
By manually setting the personal status, you can see in the console that the page sends a POST request to https://{backend server}/api/v2/serverless/shiro/status:

Personal status request
The request body contains JSON in the following format:
To update the personal status, you first need to obtain an access token and build the request header Authorization: bearer {token} to verify user permissions.
There are two ways to get the access token. The first is to send a login request before each status update, and the returned JSON will contain an access token in the format xxxxx.xxxxxxxx.
The other is to create a token in the format xxxxxxxxxxxxxx under Settings -> Security -> API Token in the backend; this way is recommended.
After getting the token, verify it in the console:
Status set successfully.

Set success
Designing the Shortcut
To automatically sync health data to the personal status, we need a shortcut that can fetch health data, build the request, and call the API. The design idea is as follows:
When converting the flowchart into a shortcut, there are a few pitfalls to note:
- If a certain type of data has no record for the day (e.g., no workout), the shortcut will return empty instead of 0. You need to preset an initial value of 0 to avoid issues when concatenating the description text later.
- If you want the data to match the Apple Health Activity panel, pay special attention to how "Stand x hours" is counted. It reflects the number of hours you met the goal, not the actual standing duration. The logic is: within each hour, as long as you accumulate at least 1 minute of standing, it counts as 1 hour met. For example, standing 08:00–08:01 and 09:30–09:31 will be recorded as 2 hours met. In contrast, the "Stand Time" that the shortcut retrieves is the actual minutes you stood. Therefore, to count "Stand x hours", you need to count whether each hour met the goal, not simply sum the standing minutes. The shortcut expression is as follows:

Count达标次数
- When the interface successfully sets the status, it only returns a
204status code with no content. Since Shortcuts itself does not support detailed HTTP status-code checks, you can only confirm success by checking whether the returned file size is 0.
Because the shortcut is too long, here is the shortcut.
The complete shortcut flow is as follows (super-long image warning):
