prompts / account-audit.md
edit FILL IN & copy this prompt →739 words

Prompt: audit an ird account — spend, expiries, forgotten resources

Have an agent go through everything on an ird account — credits, domains, DNS zones, IPFS pins and names, gateway domains, tunnels, servers, apps, p2p apps, shared domains, open tickets — and produce a monthly-cost table with concrete cleanup actions, applying only what you approve, line by line.

Needs: ird access (MCP server or the ird CLI, logged in) Costs: none — every step is read-only until you approve an action Group: housekeeping

Paste everything below the line into a fresh conversation. Fill in the FILL IN block first.


Task

Audit the account, report, propose. Do not change anything until I approve a specific numbered action.

FILL IN

EXPIRY_WINDOW_DAYS: 60          # flag domains expiring within this many days
KEEP_PINS:          site:, share:   # pin name prefixes that are intentional (don't propose unpinning)
IDLE_TUNNEL_DAYS:   14          # tunnels not active for this long count as forgotten

Non-negotiable rules

  1. Read-only by default. No unpin, delete, destroy, renew, or record change without my explicit approval of that numbered action, in chat, naming the resource id.
  2. Destroy is irreversible. For servers and one-click apps, always restate what will be lost and the id before acting, and act on one at a time.
  3. Paginate. ipfs_pins is paged (max 100 per page, total says how many): walk every page before concluding anything.
  4. Numbers from the account, not from memory. Rates come from credits_prices; usage from the *_usage tools; prices per tier from vps_tiers.

Steps — collect

A. Money. credits_balance; credits_prices. With the CLI, ird credits ledger --limit 200 --kind charge for the last charges (what actually bills).

B. Domains. list_domains → state, expiry, auto-renew, nameservers. Flag: expiring within EXPIRY_WINDOW_DAYS and not auto-renew; nameservers not ird's while the zone exists on ird (split brain); domains with no zone at all.

C. DNS. dns_list_zones → own and delegated. For each own zone, dns_get_zone: flag empty zones (only apex SOA/NS), records pointing at IPs of servers/tunnels that no longer exist (cross-check with steps E–G), and AAAA records on hostnames served by the IPFS gateway or a tunnel. dns_claim_list for pending claims about to expire.

D. IPFS. ipfs_usage (bytes pinned, served, hourly/monthly cost). ipfs_pins — all pages. Group by name; flag: failed/queued for long, duplicate names (old site roots not unpinned), names outside KEEP_PINS, large pins. ipns_list — names whose target CID is not among pinned CIDs (they serve nothing). ipfs_domains and ipfs_domain_pins per domain — domains attached but linked to nothing.

E. Tunnels. list_tunnels → status; flag degraded/pending-dns, and any not active (bills hourly regardless). With the CLI, ird tunnels status <host> for last activity; older than IDLE_TUNNEL_DAYS → forgotten.

F. Servers & apps. vps_list → state, tier; vps_tiers → hourly; monthly = hourly × 730 per server. Shut-down servers still bill — flag them. apps_list → deployments, their state and URL (is it answering?). ird vps snapshot images and ird vps volumes for orphaned snapshots and volumes (billed per GB-hour).

G. p2p. p2p_list_apps; p2p_usage → hourly/monthly, relayed bytes, cached mailbox bytes. Flag apps with an empty origin allowlist in production, and apps with no traffic this period.

H. Sharing & support. grants_list → domains others shared with me and the payer setting (am I paying for someone else's usage?). support_list_tickets → open tickets awaiting my reply.

Steps — report

I. Cost table. One row per category (domains renewals due, DNS zones, IPFS storage, IPFS traffic, tunnels, servers, snapshots/volumes, one-click apps, p2p apps, mailbox storage): current monthly cost, and the monthly cost after proposed cleanup. Total both, and months of runway at the current balance.

J. Actions. A numbered list; each with: resource id/name, what happens, monthly saving (or risk avoided), reversibility (reversible / irreversible). Order: irreversible-and-cheap last. Typical items: renew a domain expiring soon; unpin a stale site root; delete an idle tunnel; destroy a shut-down server (irreversible); remove an orphaned snapshot; tighten p2p origins; fix a split-brain nameserver setup; reply to a ticket.

K. Apply only approved actions, one at a time, each followed by a read that proves it (e.g. ipfs_pins no longer lists the CID; list_tunnels no longer lists the id; list_domains shows the new expiry). Report each result before the next.

Deliverable

The cost table, the numbered action list with savings, and — after approvals — a log of what was applied with the proving read for each.

static mirror of HEAD · about · clone: git clone https://ird.cod-sursa.ro/prompts.git