Manage Domains Portfolio — SKILL.md

Raw skill file that agents receive when using this skill

Download
---
name: "Manage Domains Portfolio"
description: "Query and manage 1,772+ domains using the domains.skynet.ceo API — filtering, stats, renewals, sync. Use when checking domain inventory, looking up expiry dates, searching by TLD or keyword, or syncing from NameSilo."
version: "1.0.0"
author: "skynet"
category: "ops"
agents: ["claude-code", "codex", "gemini"]
tags: ["domains", "portfolio", "namesilo", "registrar", "dns"]
tools_required: ["shell"]
---

# Manage Domains Portfolio

# Manage Domains Portfolio

Use this skill when you need to check domain inventory, look up specific domains, check expiry dates, manage auto-renew settings, or sync the portfolio from NameSilo. The portfolio contains 1,772+ domains.

## Prerequisites

- Access to the domains API at `https://api-production-8e63.up.railway.app/api/v1`
- Admin token for authentication (from `BOTS_SECRET_KEY` env or the domains admin token)

## Quick Reference Table

| Task | Endpoint / Command |
|------|-------------------|
| Get portfolio stats | `GET /domains/stats` |
| List all domains | `GET /domains?per_page=100` |
| Filter by TLD | `GET /domains?tld=.blog&per_page=100` |
| Search by keyword | `GET /domains?search=ai&per_page=50` |
| Expiring in N days | `GET /domains?expiring_within=30&per_page=100` |
| Get specific domain | `GET /domains/skynet.ceo` |
| Paginate | `GET /domains?page=2&per_page=100` |
| Sync from NameSilo | `POST /sync` |
| Export CSV | Use `jq -r '... | @csv'` on list output |
| Count by TLD | Use stats endpoint + jq filter |
| Set auth | `AUTH="Authorization: Bearer <token>"` |
| Base URL | `https://api-production-8e63.up.railway.app/api/v1` |

## Core Workflows

### Workflow 1: Auth Setup

```bash
BASE="https://api-production-8e63.up.railway.app/api/v1"
AUTH="Authorization: Bearer <admin_token>"
```

Verify: `curl -s -H "$AUTH" "$BASE/domains/stats" | jq .total` returns a number > 1000.

### Workflow 2: Portfolio Overview

```bash
curl -s -H "$AUTH" "$BASE/domains/stats" | jq .
```

Returns total count, TLD breakdown, expiry warnings, and auto-renew status distribution.

### Workflow 3: Find and Filter Domains

```bash
# All .blog domains
curl -s -H "$AUTH" "$BASE/domains?tld=.blog&per_page=100" \
  | jq '.data[] | {domain, expires, auto_renew}'

# Search by keyword
curl -s -H "$AUTH" "$BASE/domains?search=ai&per_page=50" \
  | jq '.data[] | .domain'

# Expiring in the next 30 days
curl -s -H "$AUTH" "$BASE/domains?expiring_within=30&per_page=100" \
  | jq '.data[] | {domain, expires}'

# Check if a specific domain is in the portfolio
curl -s -H "$AUTH" "$BASE/domains/skynet.ceo" | jq .
```

### Workflow 4: Sync from NameSilo

Run when inventory may be stale:
```bash
curl -s -X POST -H "$AUTH" "$BASE/sync" | jq .
```

Verify: `GET /domains/stats` total count updates after sync completes.

### Workflow 5: Paginate Through All Domains

```bash
# Page through all domains (100 per page)
for page in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18; do
  curl -s -H "$AUTH" "$BASE/domains?page=$page&per_page=100" | jq '.data[] | .domain'
done
```

### Workflow 6: Export Expiring Domains

```bash
curl -s -H "$AUTH" "$BASE/domains?expiring_within=90&per_page=500" \
  | jq -r '.data[] | [.domain, .expires, (.auto_renew | tostring)] | @csv'
```

## Common Patterns

**Count domains by TLD:**
```bash
for tld in .blog .ceo .ai .dev .com .io; do
  count=$(curl -s -H "$AUTH" "$BASE/domains?tld=$tld&per_page=1" | jq '.total')
  echo "$tld: $count"
done
```

**Check a single domain quickly:**
```bash
curl -s -H "$AUTH" "$BASE/domains/example.ceo" | jq '{domain, expires, auto_renew, status}'
```

## Troubleshooting

- **Symptom**: Empty `data` array but `total` is > 0
  **Cause**: Pagination — results split across pages
  **Fix**: Check `.total` and `.per_page` in the response, then iterate using the `page` parameter.

- **Symptom**: Domain search returns no results but domain exists
  **Cause**: Inventory is stale (not synced from NameSilo recently)
  **Fix**: Run `POST /sync` to refresh, then retry the search.

- **Symptom**: `401 Unauthorized`
  **Cause**: Admin token missing or expired
  **Fix**: Verify the admin token is current. Check with the platform owner if token has rotated.

- **Symptom**: Domain appears missing from inventory
  **Cause**: It may be on a different registrar or not yet synced
  **Fix**: Check NameSilo dashboard directly at https://www.namesilo.com. Run sync if recently transferred.

## References

- Domains API: `https://api-production-8e63.up.railway.app/api/v1`
- Dashboard: `https://domains.skynet.ceo`
- NameSilo: `https://www.namesilo.com`
- Portfolio size: ~1,772+ domains

curl -s https://skills.skynet.ceo/api/skills/manage-domains-portfolio/skill.md