Agent Skillsluoluoluo22/yanzi › mobile-notifier

mobile-notifier

GitHub

通过局域网Yanzi API向Android手机推送本地通知,绕过云端。需PC与手机同网,调用POST接口并严格使用UTF-8编码及Bearer认证头,确保消息不乱码。

.agent/skills/mobile-notifier/SKILL.md luoluoluo22/yanzi

Trigger Scenarios

用户要求发送手机通知 用户要求向Android设备发消息 用户要求从PC通信至Yanzi App

Install

npx skills add luoluoluo22/yanzi --skill mobile-notifier -g -y
More Options

Non-standard path

npx skills add https://github.com/luoluoluo22/yanzi/tree/main/.agent/skills/mobile-notifier -g -y

Use without installing

npx skills use luoluoluo22/yanzi@mobile-notifier

指定 Agent (Claude Code)

npx skills add luoluoluo22/yanzi --skill mobile-notifier -a claude-code -g -y

安装 repo 全部 skill

npx skills add luoluoluo22/yanzi --all -g -y

预览 repo 内 skill

npx skills add luoluoluo22/yanzi --list

SKILL.md

Frontmatter
{
    "name": "mobile-notifier",
    "description": "Use this skill when the user asks to push a notification, send a message to their mobile phone, or communicate with the Android Yanzi app from the PC."
}

Mobile Notifier

Goal

To send a system notification directly to the user's Android phone via the local network Yanzi API, completely bypassing the cloud.

Instructions

  • Ensure the user's PC and Android phone are on the same local network and have successfully discovered each other.
  • Formulate a JSON payload with title and body fields.
  • Send an HTTP POST request to the local Yanzi PC Agent API at http://127.0.0.1:53919/v1/notify.
  • CRITICAL: The request MUST include the header Authorization: Bearer yanzi-local-dev-token.
  • CRITICAL: The payload MUST be sent as a strict UTF-8 encoded byte array. If using PowerShell, do not use a raw string for -Body, as PowerShell 5.1 will default to GBK/ISO-8859-1 which causes ??? gibberish on the phone. Convert the string to UTF-8 bytes first.

Examples

PowerShell Example

$body = '{"title":"构建完成","body":"您的前端项目已经打包完毕,可以发布了!"}'
$bytes = [System.Text.Encoding]::UTF8.GetBytes($body)
Invoke-RestMethod -Uri http://127.0.0.1:53919/v1/notify -Method Post -Headers @{"Authorization"="Bearer yanzi-local-dev-token"} -Body $bytes -ContentType "application/json; charset=utf-8"

Python Example

import requests
headers = {
    "Authorization": "Bearer yanzi-local-dev-token",
    "Content-Type": "application/json; charset=utf-8"
}
data = {"title": "构建完成", "body": "您的前端项目已经打包完毕,可以发布了!"}
# requests automatically handles dict to UTF-8 json serialization
requests.post("http://127.0.0.1:53919/v1/notify", headers=headers, json=data)

Constraints

  • Never omit the Authorization header.
  • Never send text using local ANSI/GBK encodings.
  • The phone must have the Yanzi App running and the local network permission enabled.

Version History

  • a26597f Current 2026-07-24 11:37

Same Skill Collection

skills/yanzi-extension-dev/SKILL.md

Metadata

Files
0
Version
0f2de90
Hash
a5a0efc6
Indexed
2026-07-24 11:37

Главная - Вики-сайт
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-08-08 07:53
浙ICP备14020137号-1 $Гость$