← Back to Skills Marketplace
🔌

MagicHaqi Pet Master

by ParaEngine · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ⚠ suspicious
41
Downloads
0
Stars
0
Active Installs
1
Versions
Install in OpenClaw
/install pet-master
Description
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...
README (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).
Usage Guidance
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.
Capability Assessment
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.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install pet-master
  3. After installation, invoke the skill by name or use /pet-master
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.0
Initial release
Metadata
Slug pet-master
Version 1.0.0
License MIT-0
All-time Installs 0
Active Installs 0
Total Versions 1
Frequently Asked Questions

What is 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... It is an AI Agent Skill for Claude Code / OpenClaw, with 41 downloads so far.

How do I install MagicHaqi Pet Master?

Run "/install pet-master" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is MagicHaqi Pet Master free?

Yes, MagicHaqi Pet Master is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does MagicHaqi Pet Master support?

MagicHaqi Pet Master is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created MagicHaqi Pet Master?

It is built and maintained by ParaEngine (@paraengine); the current version is v1.0.0.

💬 Comments