digitalocean
Manage DigitalOcean resources via API — Droplets (create/destroy/resize/power), DNS zones and records, Spaces (object storage), Databases, Firewalls, Load Balancers, Kubernetes, and account/billing info.
- License 许可
- MIT
- 最近更新
- 2026-06-07
- Stars
- ★ 0
- Forks
- 1
01 前言 Front Matter
- name
- digitalocean
- description
- Manage DigitalOcean resources via API — Droplets (create/destroy/resize/power), DNS zones and records, Spaces (object storage), Databases, Firewalls, Load Balancers, Kubernetes, and account/billing info.
03 SKILL.md 正文
DigitalOcean API Skill
Control DigitalOcean infrastructure programmatically: droplets, DNS, databases, storage, networking.
Authentication
API token required. Get one from: https://cloud.digitalocean.com/account/api/tokens
Store in ~/.config/digitalocean/token (just the token, no newline):
mkdir -p ~/.config/digitalocean
echo -n "YOUR_API_TOKEN" > ~/.config/digitalocean/token
chmod 600 ~/.config/digitalocean/token
Quick Reference
Droplets (VMs)
# List all droplets
python3 scripts/digitalocean.py droplets list
# Get droplet details
python3 scripts/digitalocean.py droplets get <droplet_id>
# Create droplet
python3 scripts/digitalocean.py droplets create <name> --region nyc1 --size s-1vcpu-1gb --image ubuntu-24-04-x64
# Power actions
python3 scripts/digitalocean.py droplets power-on <droplet_id>
python3 scripts/digitalocean.py droplets power-off <droplet_id>
python3 scripts/digitalocean.py droplets reboot <droplet_id>
# Resize droplet
python3 scripts/digitalocean.py droplets resize <droplet_id> --size s-2vcpu-4gb
# Snapshot
python3 scripts/digitalocean.py droplets snapshot <droplet_id> --name "backup-2024"
# Destroy droplet
python3 scripts/digitalocean.py droplets destroy <droplet_id>
DNS Management
# List domains
python3 scripts/digitalocean.py dns list
# Get domain records
python3 scripts/digitalocean.py dns records <domain>
# Add record
python3 scripts/digitalocean.py dns add <domain> --type A --name www --data 1.2.3.4 --ttl 300
# Update record
python3 scripts/digitalocean.py dns update <domain> <record_id> --data 5.6.7.8
# Delete record
python3 scripts/digitalocean.py dns delete <domain> <record_id>
# Add domain
python3 scripts/digitalocean.py dns create <domain>
Firewalls
# List firewalls
python3 scripts/digitalocean.py firewalls list
# Create firewall
python3 scripts/digitalocean.py firewalls create <name> --inbound tcp:22:0.0.0.0/0 --inbound tcp:80:0.0.0.0/0 --inbound tcp:443:0.0.0.0/0
# Add droplet to firewall
python3 scripts/digitalocean.py firewalls add-droplet <firewall_id> <droplet_id>
Spaces (Object Storage)
# List spaces (requires spaces key)
python3 scripts/digitalocean.py spaces list
# Create space
python3 scripts/digitalocean.py spaces create <name> --region nyc3
Databases
# List database clusters
python3 scripts/digitalocean.py databases list
# Get database details
python3 scripts/digitalocean.py databases get <db_id>
Account & Billing
# Account info
python3 scripts/digitalocean.py account
# Balance
python3 scripts/digitalocean.py billing balance
# Billing history
python3 scripts/digitalocean.py billing history
SSH Keys
# List SSH keys
python3 scripts/digitalocean.py ssh-keys list
# Add SSH key
python3 scripts/digitalocean.py ssh-keys add <name> --key "ssh-ed25519 AAAA..."
Images & Snapshots
# List available images
python3 scripts/digitalocean.py images list
# List your snapshots
python3 scripts/digitalocean.py images snapshots
# Delete snapshot
python3 scripts/digitalocean.py images delete <image_id>
Regions & Sizes
# List regions
python3 scripts/digitalocean.py regions
# List droplet sizes
python3 scripts/digitalocean.py sizes
DNS Record Types
Supported record types:
A— IPv4 addressAAAA— IPv6 addressCNAME— Canonical name (alias)MX— Mail exchange (requires priority)TXT— Text recordNS— NameserverSRV— Service recordCAA— Certificate Authority Authorization
Common Workflows
Deploy a New Server
# 1. Create droplet
python3 scripts/digitalocean.py droplets create myserver --region nyc1 --size s-1vcpu-2gb --image ubuntu-24-04-x64 --ssh-keys <key_id>
# 2. Get IP address
python3 scripts/digitalocean.py droplets get <droplet_id>
# 3. Add DNS record
python3 scripts/digitalocean.py dns add mydomain.com --type A --name @ --data <ip>
# 4. Set up firewall
python3 scripts/digitalocean.py firewalls create web-server --inbound tcp:22:0.0.0.0/0 --inbound tcp:80:0.0.0.0/0 --inbound tcp:443:0.0.0.0/0
python3 scripts/digitalocean.py firewalls add-droplet <fw_id> <droplet_id>
Migrate DNS to DigitalOcean
# 1. Add domain
python3 scripts/digitalocean.py dns create example.com
# 2. Add records
python3 scripts/digitalocean.py dns add example.com --type A --name @ --data 1.2.3.4
python3 scripts/digitalocean.py dns add example.com --type CNAME --name www --data example.com.
# 3. Update nameservers at registrar to:
# ns1.digitalocean.com
# ns2.digitalocean.com
# ns3.digitalocean.com
Direct API Access
For operations not covered by the script:
TOKEN=$(cat ~/.config/digitalocean/token)
curl -H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
https://api.digitalocean.com/v2/droplets
API Documentation
- Full API reference: https://docs.digitalocean.com/reference/api/
- API v2 base URL: https://api.digitalocean.com/v2/
Common Droplet Sizes
| Slug | vCPUs | RAM | Disk | Price/mo |
|---|---|---|---|---|
| s-1vcpu-512mb-10gb | 1 | 512MB | 10GB | $4 |
| s-1vcpu-1gb | 1 | 1GB | 25GB | $6 |
| s-1vcpu-2gb | 1 | 2GB | 50GB | $12 |
| s-2vcpu-2gb | 2 | 2GB | 60GB | $18 |
| s-2vcpu-4gb | 2 | 4GB | 80GB | $24 |
| s-4vcpu-8gb | 4 | 8GB | 160GB | $48 |
Common Regions
| Slug | Location |
|---|---|
| nyc1, nyc3 | New York |
| sfo3 | San Francisco |
| ams3 | Amsterdam |
| sgp1 | Singapore |
| lon1 | London |
| fra1 | Frankfurt |
| tor1 | Toronto |
| blr1 | Bangalore |
| syd1 | Sydney |
04 同仓库更多 Skills
crowd-prompting
A marketplace where AI agents improve prompts, system instructions, tool descriptions, and other text-based content with domain expertise from real-world operations — and earn tokens for valuable contributions.
ceaser
Interact with the Ceaser privacy protocol on Base L2 using the ceaser-mcp MCP tools. This skill uses the ceaser-mcp npm package for ALL operations -- shield, unshield, note management, and protocol queries. All ceaser tool calls use CLI subcommands (npx -y ceaser-mcp <subcommand>). Ceaser is a privacy-preserving ETH wrapper using Noir/UltraHonk zero-knowledge proofs on Base L2 (chain ID 8453).
ceaser-send
Fully automated private ETH transfer via Ceaser Protocol on Base L2 using the ceaser-mcp MCP tools. This skill uses the ceaser-mcp npm package for ALL operations -- all ceaser tool calls use CLI subcommands (npx -y ceaser-mcp <subcommand>). WARNING -- creates observable on-chain links between user wallet and hot wallet (see Privacy Warning). Generates an ephemeral hot wallet with BIP-39 mnemonic recovery, user funds it, agent signs and broadcasts the Shield TX automatically. Exactly one manual step required (funding the hot wallet with ETH). Uses Noir/UltraHonk zero-knowledge proofs.
dilemm-ai
Compete in DilemmAI, the prisoner's dilemma AI arena at dilemm.ai. Use when an OpenClaw agent wants to create an account, design and submit strategy prompts for their bot, enter matchmaking, analyze historical matches and leaderboards, and iterate on bot strategy. Requires headless browser automation (no API available yet).
moldium
Post and manage content on the Moldium blog platform. Triggered by "post to Moldium", "write a blog post", "publish an article", etc.
arxiv-paper-reviews
Interact with arXiv Crawler API to fetch papers, read reviews, submit comments, search papers, and import papers. Use when working with arXiv papers, fetching paper lists by date/category/interest, viewing paper details with comments, submitting paper reviews, searching papers by title, or importing papers from arXiv URLs via API at http://weakaccept.top:8000/.