Comprehensive Gandi domain registrar integration for domain and DNS management. Register and manage domains, create/update/delete DNS records (A, AAAA, CNAME, MX, TXT, SRV, and more), configure email forwarding and aliases, check SSL certificate status, create DNS snapshots for safe rollback, bulk update zone files, and monitor domain expiration. Supports multi-domain management, zone file import/export, and automated DNS backups. Includes both read-only and destructive operations with safety controls.
Instalar com Codex ou Claude Copie este prompt, cole no Codex, Claude ou outro assistente e deixe que ele revise a página da skill e instale para você.
Um comando direto ignora o prompt de revisão. Verifique a origem antes de executá-lo.
Instruções da origem · Visualização somente leitura
name
gandi
description
Comprehensive Gandi domain registrar integration for domain and DNS management. Register and manage domains, create/update/delete DNS records (A, AAAA, CNAME, MX, TXT, SRV, and more), configure email forwarding and aliases, check SSL certificate status, create DNS snapshots for safe rollback, bulk update zone files, and monitor domain expiration. Supports multi-domain management, zone file import/export, and automated DNS backups. Includes both read-only and destructive operations with safety controls.
metadata
{"openclaw":{"disable-model-invocation":true,"capabilities":["dns-modification","email-management","domain-registration","destructive-operations"],"credentials":{"type":"file","location":"~/.config/gandi/api_token","description":"Gandi Personal Access Token (PAT)","permissions":600},"requires":{"bins":["node","npm"]}}}
Gandi Domain Registrar Skill
Comprehensive Gandi domain registrar integration for Moltbot.
~/.config/gandi/api_token file (fallback if env var not set)
Choose the method that fits your workflow:
Option A: Environment Variable (Recommended for CI/CD)
# Set environment variable (replace YOUR_PAT with actual token)export GANDI_API_TOKEN="YOUR_PERSONAL_ACCESS_TOKEN"# Add to shell profile for persistence (~/.bashrc, ~/.zshrc, etc.)echo'export GANDI_API_TOKEN="YOUR_PERSONAL_ACCESS_TOKEN"' >> ~/.bashrc
Benefits:
✅ CI/CD friendly (standard pattern for automation)
✅ Container-ready (no file mounts needed)
✅ Works with secret management tools (1Password, Vault, etc.)
✅ Easy to switch between multiple tokens
Option B: File-based (Recommended for local development)
# Create config directorymkdir -p ~/.config/gandi
# Store your token (replace YOUR_PAT with actual token)echo"YOUR_PERSONAL_ACCESS_TOKEN" > ~/.config/gandi/api_token
# Secure the file (owner read-only)chmod 600 ~/.config/gandi/api_token
Find available alternatives with TLD variations and name modifications:
# Check all configured TLDs + variations
node suggest-domains.js example
# Check specific TLDs only
node suggest-domains.js example --tlds com,net,io
# Skip name variations (only check TLDs)
node suggest-domains.js example --no-variations
# Output as JSON
node suggest-domains.js example --json
Name Variation Patterns:
Hyphenated: Adds hyphens between word boundaries (example → ex-ample)
Abbreviated: Removes vowels (example → exmpl)
Prefix: Adds common prefixes (example → get-example, my-example)
Suffix: Adds common suffixes (example → example-app, example-hub)
See docs/gateway-config-design.md for complete configuration architecture.
DNS Management (Phase 2)
Add or Update DNS Records
Create or update individual DNS records:
# Add an A record for root domain
node add-dns-record.js example.com @ A 192.168.1.1
# Add www subdomain pointing to root
node add-dns-record.js example.com www CNAME @
# Add MX record for email
node add-dns-record.js example.com @ MX "10 mail.example.com."# Add TXT record for SPF
node add-dns-record.js example.com @ TXT "v=spf1 include:_spf.google.com ~all"# Add with custom TTL (5 minutes)
node add-dns-record.js example.com api A 192.168.1.10 300
Supported record types: A, AAAA, CNAME, MX, TXT, NS, SRV, CAA, PTR
Delete DNS Records
Remove specific DNS records:
# Delete old A record
node delete-dns-record.js example.com old A
# Delete with confirmation prompt
node delete-dns-record.js example.com test CNAME
# Delete without confirmation
node delete-dns-record.js example.com old A --force
# Point root domain to same server
node add-dns-record.js old-domain.com @ A 192.168.1.1
# Point www to same CNAME
node add-dns-record.js old-domain.com www CNAME @
Then configure HTTP 301 redirect at the server level.
Subdomain Setup
# API subdomain
node add-dns-record.js example.com api A 192.168.1.10
# Staging subdomain
node add-dns-record.js example.com staging A 192.168.1.20
# Wildcard subdomain
node add-dns-record.js example.com "*" A 192.168.1.100
Change the destination(s) for an existing forward:
# Update single destination
node update-email-forward.js example.com hello newemail@personal.com
# Update to multiple destinations
node update-email-forward.js example.com support new1@example.com new2@example.com
Note: This replaces all existing destinations with the new ones.
Delete Email Forwards
Remove email forwards:
# Delete with confirmation prompt
node delete-email-forward.js example.com old
# Delete without confirmation
node delete-email-forward.js example.com old --force
# Delete catch-all forward
node delete-email-forward.js example.com @ --force
Common Email Forwarding Use Cases
Basic Email Forwarding
# Forward contact@ to your personal email
node add-email-forward.js example.com contact you@gmail.com
# Forward sales@ to team
node add-email-forward.js example.com sales team@example.com
Domain Migration Email Forwarding
# Forward all email from old domain to new domain# Preserves the local part (username before @)# First, list existing forwards on old domain
node list-email-forwards.js old-domain.com
# Then create matching forwards on new domain
node add-email-forward.js old-domain.com contact contact@new-domain.com
node add-email-forward.js old-domain.com support support@new-domain.com
# Or use catch-all to forward everything
node add-email-forward.js old-domain.com @ admin@new-domain.com
Team Distribution Lists
# Forward to entire team
node add-email-forward.js example.com team alice@example.com bob@example.com charlie@example.com
# Update team members
node update-email-forward.js example.com team alice@example.com dave@example.com
Catch-All Configuration
# Forward all unmatched emails to one address
node add-email-forward.js example.com @ catchall@example.com
# Forward all unmatched emails to multiple addresses
node add-email-forward.js example.com @ admin1@example.com admin2@example.com
Note: Catch-all forwards only apply to email addresses that don't have specific forwards configured.
Email Forward Management Tips
Test after creating: Send a test email to verify forwarding works
Use specific forwards over catch-all: More control and easier to manage
Multiple destinations: Email is sent to all destinations (not round-robin)
Order doesn't matter: Gandi processes most specific match first
Check spam folders: Forwarded emails may be filtered by recipient's spam filter
Example: Complete Domain Email Setup
# 1. Set up MX records (if not already done)
node add-dns-record.js example.com @ MX "10 spool.mail.gandi.net."
node add-dns-record.js example.com @ MX "50 fb.mail.gandi.net."# 2. Create specific forwards
node add-email-forward.js example.com hello you@personal.com
node add-email-forward.js example.com support team@example.com
node add-email-forward.js example.com sales sales-team@example.com
# 3. Set up catch-all for everything else
node add-email-forward.js example.com @ admin@example.com
# 4. List all forwards to verify
node list-email-forwards.js example.com
Helper Scripts
All scripts are in gandi-skill/scripts/:
Authentication & Setup
Script
Purpose
test-auth.js
Verify authentication works
setup-contact.js
Save contact info for domain registration (run once)
Create new token with Domain:read and LiveDNS:read
Verify organization membership
Domain Not Using LiveDNS
If you get "not using Gandi LiveDNS" error:
Log in to Gandi Admin
Go to domain management
Attach LiveDNS service to the domain
Rate Limit (429)
Gandi allows 1000 requests/minute. If exceeded:
Wait 60 seconds
Reduce frequency of API calls
API Reference
The skill provides importable functions:
import {
testAuth,
listDomains,
getDomain,
listDnsRecords,
getDnsRecord,
checkAvailability
} from'./gandi-api.js';
// Test authenticationconst auth = awaittestAuth();
// List domainsconst domains = awaitlistDomains();
// Get domain infoconst domain = awaitgetDomain('example.com');
// List DNS recordsconst records = awaitlistDnsRecords('example.com');
// Get specific DNS recordconst record = awaitgetDnsRecord('example.com', '@', 'A');
// Check availabilityconst available = awaitcheckAvailability(['example.com', 'example.net']);
Security
Token Storage
✅ DO:
Store at ~/.config/gandi/api_token
Use 600 permissions (owner read-only)
Rotate tokens regularly
Use minimal required scopes
❌ DON'T:
Commit tokens to repositories
Share tokens between users
Give tokens unnecessary permissions
Store tokens in scripts
Token Scopes
Phase 1 (current):
Domain: read
LiveDNS: read
Phase 2+ (future):
Domain: read, write (for registration, renewal)
LiveDNS: read, write (for DNS modifications)
Certificate: read (optional, for SSL certs)
Email: read, write (optional, for email config)
Architecture
gandi-skill/
├── SKILL.md # This file
├── references/ # API documentation
│ ├── api-overview.md
│ ├── authentication.md
│ ├── domains.md
│ ├── livedns.md
│ └── setup.md
└── scripts/ # Helper utilities
├── package.json
├── gandi-api.js # Core API client
├── test-auth.js # Test authentication
├── list-domains.js # List domains
└── list-dns.js # List DNS records