Vigiar
1
0
Derivar
Você já tinha feito uma derivação do repositório claude-plugin, anteriormente
0
claude-plugin/skills/manage-vps/SKILL.md
2026-11-28 15:28:07 +02:00

6,6 KiB


name: manage-vps description: See and control the user's MozOut VPS servers through the MozOut API: state, IP addresses, start, stop and restart, backups, reverse DNS, time zone, root password, reinstall and restore, and extra IPs or disk. Use when the user asks about their VPS or server, wants to restart it, back it up, reinstall the system or find its IP.

MozOut VPS

Use this skill to manage the VPS servers of the account. To publish a project on a server, see deploy-to-vps; to point a domain at it, see connect-domain.

Setup

  • API address: https://api.mozout.com/v1. It is fixed for MozOut: never ask the user for another address.
  • API key: always read it from the MOZOUT_API_KEY environment variable. Check it without printing it: test -n "$MOZOUT_API_KEY" && echo set || echo missing
  • If it is missing, ask the user to create a key in the API Center (https://www.my.mozout.com/api-center.php) with vps:read (and vps:write to act; vps:password, vps:reinstall and vps:restore are separate permissions, off by default), then to run export MOZOUT_API_KEY="sandbox_..." and restart Claude Code (or the editor).
  • sandbox_ keys read the real account but only simulate writes and never charge. prod_ keys change the account and can charge. GET /v1/token gives the mode in data.mode and the permissions in data.permissions. Suggest a sandbox_ key for a first try.
  • Never print, log or commit the key, and never put it in code that runs in a browser or a mobile app. In code, read it from the environment.

Every request looks like this:

curl -sS "https://api.mozout.com/v1/PATH" -H "Authorization: Bearer $MOZOUT_API_KEY" -H "Accept: application/json"

Rules

  • Before anything that charges, deletes data or cannot be undone, tell the user exactly what will happen (with the price, when the API gives one) and wait for a clear yes.
  • Send an Idempotency-Key header on purchases, sends and other POST requests that accept it, and reuse the same value if you retry the same request: IDEM=$(uuidgen 2>/dev/null || cat /proc/sys/kernel/random/uuid).
  • Lists come in pages: ?page=1&per_page=100, and meta.total_pages says how many there are.
  • Long operations answer 202 with an action_id. Follow them with GET /v1/actions/{action_id} every 10 to 20 seconds until status is done or failed.
  • Answer the user in the language they write in, and show amounts with the currency the API returns.

See the servers

curl -sS "https://api.mozout.com/v1/servers?per_page=100" -H "Authorization: Bearer $MOZOUT_API_KEY"
curl -sS "https://api.mozout.com/v1/servers/SERVER_ID" -H "Authorization: Bearer $MOZOUT_API_KEY"
  • A server has id (the same as its service), name, status, ip, additional_ips, power_state, operating_system and resources.
  • GET /v1/servers/{id}/traffic gives the traffic of the month. With the service suspended, data can be read but actions answer 409 service_not_active.

Start, stop and restart

IDEM=$(uuidgen 2>/dev/null || cat /proc/sys/kernel/random/uuid)
curl -sS -X POST "https://api.mozout.com/v1/servers/SERVER_ID/restart" -H "Authorization: Bearer $MOZOUT_API_KEY" -H "Idempotency-Key: $IDEM"
  • Same for start and stop. Stopping or restarting takes the sites on the server offline for a few minutes: ask first.
  • The answer is 202 with action_id. Follow it with GET /v1/actions/{action_id}: running, then done or failed. Starting takes about 2 minutes, stopping about 6.
  • One action at a time per server (409 action_in_progress), 15 seconds between actions, 10 actions per minute per account.

Backups

  • List: GET /v1/servers/{id}/backups. Make one: POST /v1/servers/{id}/backups with {"name": "before-update"} and an Idempotency-Key. It can take up to 50 minutes to appear.
  • At most 4 backups per server, counting the automatic ones (409 backup_limit_reached). Downloading and deleting backups is done in My MozOut.
  • Suggest a backup before any risky change on the server.

Reverse DNS and time zone

  • GET or PUT /v1/servers/{id}/reverse-dns with {"records": [{"ip": "203.0.113.10", "hostname": "mail.mybusiness.com"}]}. Only the server IPs are accepted.
  • GET or PUT /v1/servers/{id}/timezone with {"timezone": "America/New_York"}.

Dangerous actions

Each one needs its own permission, the server name in confirm and an Idempotency-Key. Never run them without a clear request, and repeat back what will be lost.

  • New root password: POST /v1/servers/{id}/password with {"confirm": "<name>"} (vps:password). The server restarts. The password is only in that answer: give it to the user once and never save it in files or logs.
  • Reinstall: first GET /v1/servers/{id}/operating-systems, then POST /v1/servers/{id}/reinstall with {"confirm": "<name>", "operating_system": "ubuntu-24.04", "backup_first": true} (vps:reinstall). It deletes everything on the server. Suggest backup_first: true.
  • Restore: POST /v1/servers/{id}/restore with {"confirm": "<name>", "backup": "<backup id>"} (vps:restore). Everything changed after that backup is lost.
  • Limits: 5 new passwords and 3 reinstalls or restores per hour.

Extra IP and disk

GET /v1/servers/{id}/extras shows the prices (amount_today is paid now, monthly_amount joins each renewal). POST /v1/servers/{id}/extras buys with account credit (billing:purchase): show the price and ask first. Follow the delivery with GET /v1/extras/{extra_id}.

Errors

Errors look like {"error": {"code", "message", "correlation_id", "details"}}. Act on code, never on the text of message.

HTTP code What to do
401 unauthorized The key is missing, wrong or revoked. Ask the user to check MOZOUT_API_KEY.
402 insufficient_credit Not enough account credit, and nothing was charged. Give the user details.add_funds_url.
403 insufficient_scope The key lacks a permission. Name it and ask for a key that has it.
403 spending_limit_exceeded The purchase goes over the key spending limit. Nothing was charged.
404 not_found Wrong id, or it is not in this account.
409 conflict and others Read details.reason and explain it in plain words.
422 validation_failed Fix the field named in details and try again.
429 rate_limited Wait for the Retry-After seconds, then try once more.
5xx internal_error, upstream_error Try again later. If the user contacts support, give them the correlation_id.

More