- Extract WeChat notification payload construction from inline curl command - Move environment variables to explicit env section for clarity - Build JSON payload using Python for better string handling and readability - Write payload to temporary file and pass to curl via -d @wechat.json - Improves maintainability and reduces shell string escaping complexity