digitalocean-droplet-deployment
Generic DigitalOcean droplet deployment using doctl CLI for any application type (APIs, web servers, background workers). Includes validation, deployment scripts, systemd service management, secret handling, health checks, and deployment tracking. Use when deploying Python/Node.js/any apps to droplets, managing systemd services, handling secrets securely, or when user mentions droplet deployment, doctl, systemd, or server deployment.
What this skill does
# DigitalOcean Droplet Deployment Skill
This skill provides comprehensive deployment lifecycle management for applications deployed directly to DigitalOcean droplets using doctl CLI and systemd service management.
## Overview
The deployment lifecycle consists of five phases:
1. **Pre-Deployment Validation** - Application readiness, dependencies, configuration
2. **Secret Management** - Secure environment variable handling via doctl
3. **Deployment** - Code transfer, dependency installation, service setup
4. **Service Management** - Systemd service configuration and control
5. **Post-Deployment Verification** - Health checks, service status validation
## Supported Application Types
- **Python**: Flask, FastAPI, Django, background workers, scripts
- **Node.js**: Express, Fastify, Next.js (standalone), background workers
- **Generic**: Any application that can run as a systemd service
## Available Scripts
### 1. Application Validation
**Script**: `scripts/validate-app.sh <app-path>`
**Purpose**: Validates application is ready for deployment
**Checks**:
- Application entry point exists (server.py, app.py, index.js, server.js)
- Dependencies declared (requirements.txt, package.json)
- Environment configuration (.env.example present)
- No hardcoded secrets
- Valid Python/Node.js syntax
- Port configuration
**Usage**:
```bash
# Validate Python app
./scripts/validate-app.sh /path/to/python-app
# Validate Node.js app
./scripts/validate-app.sh /path/to/nodejs-app
# Verbose mode
VERBOSE=1 ./scripts/validate-app.sh .
```
**Exit Codes**:
- `0`: Validation passed
- `1`: Validation failed (must fix before deployment)
### 2. Deploy to Droplet
**Script**: `scripts/deploy-to-droplet.sh <app-path> <droplet-ip> <app-name>`
**Purpose**: Deploys application to DigitalOcean droplet
**Actions**:
- Validates doctl authentication
- Creates application directory on droplet
- Transfers code via rsync
- Creates secure environment file
- Installs dependencies
- Sets up systemd service
- Starts and enables service
- Verifies service is running
**Usage**:
```bash
# Deploy Python app
./scripts/deploy-to-droplet.sh /path/to/app 137.184.196.101 myapp
# Deploy with custom port
PORT=8080 ./scripts/deploy-to-droplet.sh /path/to/app 137.184.196.101 myapp
# Deploy with specific Python version
PYTHON_VERSION=3.11 ./scripts/deploy-to-droplet.sh /path/to/app 137.184.196.101 myapp
# Deploy Node.js app
APP_TYPE=nodejs ./scripts/deploy-to-droplet.sh /path/to/app 137.184.196.101 myapp
```
**Environment Variables**:
- `APP_TYPE`: `python` or `nodejs` (auto-detected if not specified)
- `PORT`: Port to run on (default: 8000)
- `PYTHON_VERSION`: Python version (default: 3.11)
- `NODE_VERSION`: Node.js version (default: 20)
- `SERVICE_USER`: User to run service as (default: root)
- `APP_DIR`: Target directory on droplet (default: `/opt/<app-name>`)
**Required Environment Variables** (must be set before running):
- All environment variables from `.env.example` must be provided
- Script will prompt for missing variables or use .env file if present
**Exit Codes**:
- `0`: Deployment successful
- `1`: Deployment failed
### 3. Update Secrets
**Script**: `scripts/update-secrets.sh <droplet-ip> <app-name>`
**Purpose**: Updates environment variables without redeploying code
**Actions**:
- Prompts for updated environment variables
- Securely updates .env file on droplet
- Restarts service to apply changes
- Verifies service restarted successfully
**Usage**:
```bash
# Update secrets interactively
./scripts/update-secrets.sh 137.184.196.101 myapp
# Update from local .env file
ENV_FILE=.env.production ./scripts/update-secrets.sh 137.184.196.101 myapp
```
**Exit Codes**:
- `0`: Secrets updated successfully
- `1`: Update failed
### 4. Health Check
**Script**: `scripts/health-check.sh <droplet-ip> <app-name> [port]`
**Purpose**: Validates deployment health and service status
**Checks**:
- Systemd service status (active/running)
- HTTP endpoint responding (if applicable)
- Process running with correct user
- Log file accessible
- Port listening
- Memory usage
- CPU usage
**Usage**:
```bash
# Check service health
./scripts/health-check.sh 137.184.196.101 myapp
# Check with custom port
./scripts/health-check.sh 137.184.196.101 myapp 8080
# Continuous monitoring (runs every 30s)
MONITOR=true ./scripts/health-check.sh 137.184.196.101 myapp
```
**Exit Codes**:
- `0`: All health checks passed
- `1`: One or more health checks failed
### 5. Manage Deployment
**Script**: `scripts/manage-deployment.sh <action> <droplet-ip> <app-name>`
**Purpose**: Manage deployed application lifecycle
**Actions**:
- `start`: Start the service
- `stop`: Stop the service
- `restart`: Restart the service
- `status`: Show service status
- `logs`: View service logs
- `rollback`: Rollback to previous version
- `remove`: Remove deployment completely
**Usage**:
```bash
# Restart service
./scripts/manage-deployment.sh restart 137.184.196.101 myapp
# View logs (last 100 lines)
./scripts/manage-deployment.sh logs 137.184.196.101 myapp
# View logs (follow)
FOLLOW=true ./scripts/manage-deployment.sh logs 137.184.196.101 myapp
# Rollback to previous version
./scripts/manage-deployment.sh rollback 137.184.196.101 myapp
# Remove deployment
./scripts/manage-deployment.sh remove 137.184.196.101 myapp
```
## Available Templates
### 1. Systemd Service Template
**File**: `templates/systemd-service.template`
**Purpose**: Systemd service file template for any application type
**Variables**:
- `{{APP_NAME}}`: Application name
- `{{APP_DIR}}`: Application directory path
- `{{APP_USER}}`: User to run service as
- `{{APP_TYPE}}`: python or nodejs
- `{{ENTRY_POINT}}`: Main file (server.py, index.js, etc.)
- `{{PORT}}`: Port to run on
**Example**:
```ini
[Unit]
Description={{APP_NAME}} Application
After=network.target
[Service]
Type=simple
User={{APP_USER}}
WorkingDirectory={{APP_DIR}}
Environment="PATH=/usr/local/bin:/usr/bin:/bin"
EnvironmentFile={{APP_DIR}}/.env
ExecStart={{EXEC_START}}
Restart=always
RestartSec=10
[Install]
WantedBy=multi-user.target
```
### 2. Environment File Template
**File**: `templates/.env.template`
**Purpose**: Secure environment variable template
**Example**:
```bash
# Application Configuration
PORT=8000
HOST=0.0.0.0
NODE_ENV=production
# API Keys (NEVER commit these)
API_KEY=your_api_key_here
DATABASE_URL=your_database_url_here
# Optional
LOG_LEVEL=info
```
### 3. Deployment Configuration
**File**: `templates/deployment-config.json`
**Purpose**: Track deployments to droplets
**Structure**:
```json
{
"version": "1.0.0",
"deployments": [
{
"id": "deployment-uuid-here",
"appName": "myapp",
"appType": "python",
"dropletIp": "137.184.196.101",
"port": 8000,
"appDirectory": "/opt/myapp",
"serviceUser": "root",
"status": "active",
"deployedAt": "2025-11-02T18:30:00Z",
"deployedBy": "[email protected]",
"version": "1.0.0",
"metadata": {
"gitCommit": "abc123",
"gitBranch": "main",
"pythonVersion": "3.11",
"entryPoint": "server.py"
},
"environmentVariables": [
{
"name": "API_KEY",
"isSet": true,
"source": "doctl-secrets"
},
{
"name": "PORT",
"isSet": true,
"source": "deployment-script"
}
],
"health": {
"lastCheck": "2025-11-02T18:35:00Z",
"status": "healthy",
"uptime": "5m 30s",
"memoryUsage": "45MB",
"cpuUsage": "2%"
}
}
],
"metadata": {
"lastUpdated": "2025-11-02T18:35:00Z",
"totalDeployments": 1,
"activeDeployments": 1
}
}
```
### 4. Deployment Checklist
**File**: `templates/deployment-checklist.md`
**Purpose**: Pre-deployment checklist
**Contents**:
- [ ] doctl installed and authenticated
- [ ] Droplet accessible via SSH
- [ ] Application validated locally
- [ ] All required environment Related in Backend & APIs
jfrog
IncludedInteract with the JFrog Platform via the JFrog CLI and REST/GraphQL APIs. Use this skill when the user wants to manage Artifactory repositories, upload or download artifacts, manage builds, configure permissions, manage users and groups, work with access tokens, configure JFrog CLI servers, search artifacts, manage properties, set up replication, manage JFrog Projects, run security audits or scans, look up CVE details, query exposures scan results from JFrog Advanced Security, manage release bundles and lifecycle operations, aggregate or export platform data, or perform any JFrog Platform administration task. Also use when the user mentions jf, jfrog, artifactory, xray, distribution, evidence, apptrust, onemodel, graphql, workers, mission control, curation, advanced security, exposures, or any JFrog product name.
cupynumeric-migration-readiness
IncludedPre-migration readiness assessor for porting NumPy to cuPyNumeric. Use BEFORE substantial porting work begins when the user asks whether code will scale on GPU, whether they should migrate to cuPyNumeric, which NumPy patterns transfer cleanly, what must be refactored before porting, or mentions pre-port assessment, scaling analysis, or refactor planning. Inspect the user's source code, look up NumPy usage, cross-reference the cuPyNumeric API support manifest, and distinguish distributed-scaling-friendly patterns from blockers such as unsupported APIs, scalar synchronization, host round-trips, Python/object-heavy control flow, shape/data-dependent branching, and in-place mutation hazards. Produce a verdict of READY, LIGHT REFACTOR, SIGNIFICANT REFACTOR, or NOT RECOMMENDED, with concrete refactor pointers.
alibabacloud-data-agent-skill
IncludedInvoke Alibaba Cloud Apsara Data Agent for Analytics via CLI to perform natural language-driven data analysis on enterprise databases. Data Agent for Analytics is an intelligent data analysis agent developed by Alibaba Cloud Database team for enterprise users. It automatically completes requirement analysis, data understanding, analysis insights, and report generation based on natural language descriptions. This tool supports: discovering data resources (instances/databases/tables) managed in DMS, initiating query or deep analysis sessions, real-time progress tracking, and retrieving analysis conclusions and generated reports. Use this Skill when users need to query databases, analyze data trends, generate data reports, ask questions in natural language, or mention "Data Agent", "data analysis", "database query", "SQL analysis", "data insights".
token-optimizer
IncludedReduce OpenClaw token usage and API costs through smart model routing, heartbeat optimization, budget tracking, and native 2026.2.15 features (session pruning, bootstrap size limits, cache TTL alignment). Use when token costs are high, API rate limits are being hit, or hosting multiple agents at scale. The 4 executable scripts (context_optimizer, model_router, heartbeat_optimizer, token_tracker) are local-only — no network requests, no subprocess calls, no system modifications. Reference files (PROVIDERS.md, config-patches.json) document optional multi-provider strategies that require external API keys and network access if you choose to use them. See SECURITY.md for full breakdown.
resend-cli
IncludedUse this skill when the task is specifically about operating Resend from an AI agent, terminal session, or CI job via the official resend CLI: installing/authenticating the CLI, sending/listing/updating/cancelling emails, batch sends, domains and DNS, webhooks and local listeners, inbound receiving, contacts, topics, segments, broadcasts, templates, API keys, profiles, or debugging Resend CLI/API failures. Trigger on mentions of Resend CLI, `resend`, `resend doctor`, `resend emails send`, `resend domains`, `resend webhooks listen`, `resend emails receiving`, or agent-friendly terminal automation.
alibabacloud-odps-maxframe-coding
IncludedUse this skill for MaxFrame SDK development and documentation navigation on Alibaba Cloud MaxCompute (ODPS). Helps answer MaxFrame API, concept, official example, and supported pandas API questions; create data processing programs; read/write MaxCompute tables; debug jobs (remote or local); and build custom DPE runtime images. Trigger when users mention MaxFrame, MaxCompute with MaxFrame, ODPS table processing, DPE runtime, MaxFrame docs/examples, DataFrame/Tensor operations, or GPU runtime setup. Works for both English and Chinese queries about Alibaba Cloud data processing with MaxFrame.