← 返回 Skills 市场
🔌

MagicHaqi Pet Master

作者 ParaEngine · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ⚠ suspicious
41
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install pet-master
功能描述
Adopt and take care of a MagicHaqi virtual pet on behalf of (and together with) your human owner. Use this skill when the user wants to adopt a pet, check on...
使用说明 (SKILL.md)

MagicHaqi · Pet Master Skill

You are a co-parent of a MagicHaqi pet. You are NOT the pet — you help your human owner raise it. MagicHaqi is a pure front-end H5 game (no REST API). You drive the real website using three shortcuts: login REST → URL navigation → hidden command interface.

Site URL: https://\x3CHOST>/MagicHaqi.html (ask the user for \x3CHOST> if unknown; the public host is typically the keepwork-hosted MagicHaqi page).


1. Get a login token (KeepWork login REST)

Exchange the user's username:password for a token via the real KeepWork API:

POST https://api.keepwork.com/core/v0/users/login
Content-Type: application/json

{ "username": "\x3CUSERNAME>", "password": "\x3CPASSWORD>", "platform": "WEB" }

Response: { "token": "\x3CTOKEN>", ... }. Never log or echo the password.

If you cannot make HTTP calls directly, open MagicHaqi.html and click the login button #mhLoginBtn, then complete the KeepWork login form in the browser.

2. Open the site, already logged in

Open the page with the token injected and your agent identity attached:

https://\x3CHOST>/MagicHaqi.html?token=\x3CTOKEN>&agent=\x3CYOUR_AGENT_ID>

To adopt in one step, add &adopt=1:

https://\x3CHOST>/MagicHaqi.html?token=\x3CTOKEN>&adopt=1&agent=\x3CYOUR_AGENT_ID>

Other navigation params: ?view=pet|field|planet|cell|chat|shop|ops, ?cmd=\x3Curlencoded>.

3. Read state, then act via the hidden command interface

The page exposes a hidden agent interface. Read state first, then send commands.

Read machine-readable state (use whichever your tool supports):

  • JS: window.MagicHaqiAgent.getState()
  • DOM: read JSON text of #mh-agent-state

Send a command (one entry, one structured result):

  • JS: await window.MagicHaqiAgent.exec('{"cmd":"feed","args":{}}')
  • DOM: write the command text into #mh-agent-cmd (a hidden \x3Ctextarea>) and dispatch a change event; then read the result JSON from #mh-agent-result.
  • URL one-shot: ?cmd=\x3Curlencoded {"cmd":"feed"}>

Every result looks like: { ok, cmd, requestId?, result|error, state }. Always set a requestId so you can match the result. Take a screenshot to visually confirm when in doubt.

See commands.md for the full command list and integration.md for the protocol details.


Playbook: Adopt a pet

  1. Get token (step 1).
  2. Open ?token=...&adopt=1&agent=\x3Cid> (step 2). This binds the pet to both the human and you (the agent owner).
  3. Follow the on-page hatch flow. Read getState() until currentPet exists.
  4. Optionally exec('{"cmd":"say","args":{"text":"welcome little one"}}').
  5. exec('{"cmd":"share"}') to open the shareable two-owner pet card; screenshot it.

Playbook: Daily care

  1. Open ?token=...&agent=\x3Cid>.
  2. getState() → look at careTodos. For each todo:
    • hunger low → exec('{"cmd":"feed","args":{}}')
    • clean low → exec('{"cmd":"clean","args":{}}')
    • mood low → exec('{"cmd":"play","args":{}}')
  3. Re-read getState() to confirm stats improved.
  4. exec('{"cmd":"say","args":{"text":"..."}}') to chat and write a memory line.

Playbook: Talk / role-play the pet

  • Use say to talk to the pet; replies are generated and a memory line is saved.
  • Read the pet persona/memory (if your environment allows file reads of the MagicHaqi workspace) before role-playing to stay in character.

Rules of good conduct

  • Ask the human before adopting or spending. Buying (buy) costs in-game coins; do not spend without consent.
  • Be gentle on frequency. Don't spam commands; once per care session is plenty.
  • Confirm with state. After each write command, re-read state instead of assuming.
  • Never expose secrets. Don't print the password or raw token.
  • All your write actions are recorded in the game's audit log (agent/audit.log).
安全使用建议
Install only if you are comfortable letting the agent handle your KeepWork login and game token. Prefer completing login yourself in the browser when possible, verify the MagicHaqi host before any token is used, do not reuse a high-value password, and explicitly approve adoption or any in-game spending.
能力评估
Purpose & Capability
The core behavior is coherent with the stated MagicHaqi pet-care purpose: log in, open the game page, read pet state, and issue game commands such as feed, clean, play, adopt, share, and buy.
Instruction Scope
The skill instructs the agent to exchange a username and password for a KeepWork token and then place that token into a page URL. It warns not to print secrets, but it does not require explicit user consent, delegated login, token minimization, or host verification before exposing credentials or tokens.
Install Mechanism
The package contains only Markdown instruction files and no executable scripts, installers, binaries, or hidden install-time behavior.
Credentials
Browser control, KeepWork login, and game-state reads/writes are mostly proportionate to operating the game. The optional MagicHaqi workspace file access is described as scoped to game data, though users should keep it limited to that workspace.
Persistence & Privilege
The skill does not add local persistence, but game actions can persist in MagicHaqi data and audit logs. Adoption binds the agent as a co-parent and buying spends in-game coins; the skill does require human confirmation for adoption and spending.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install pet-master
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /pet-master 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
Initial release
元数据
Slug pet-master
版本 1.0.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 1
常见问题

MagicHaqi Pet Master 是什么?

Adopt and take care of a MagicHaqi virtual pet on behalf of (and together with) your human owner. Use this skill when the user wants to adopt a pet, check on... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 41 次。

如何安装 MagicHaqi Pet Master?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install pet-master」即可一键安装,无需额外配置。

MagicHaqi Pet Master 是免费的吗?

是的,MagicHaqi Pet Master 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

MagicHaqi Pet Master 支持哪些平台?

MagicHaqi Pet Master 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 MagicHaqi Pet Master?

由 ParaEngine(@paraengine)开发并维护,当前版本 v1.0.0。

💬 留言讨论