serve-public
Expose a local port as a public HTTPS subdomain under IRIS_BASE_DOMAIN. Writes nginx config, obtains SSL cert via certbot, reloads nginx.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Expose a local port as a public HTTPS subdomain under IRIS_BASE_DOMAIN. Writes nginx config, obtains SSL cert via certbot, reloads nginx.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
Create a new sub-agent — no Terraform, no Docker by default. Starts as a systemd service, patched into the bridge immediately so @agent works right away.
Commit and push repo changes to GitHub using the standard Iris workflow.
Search the web using Perplexity AI API. Returns sourced, up-to-date information.
Send an email via Resend API from ${IRIS_EMAIL_FROM:-iris@example.com}. Use when human escalation is needed or to deliver results outside Slack/Telegram.
Transcribe an audio file (m4a, mp3, wav, ogg, webm) to text using OpenAI Whisper API. Use when a user shares a voice note or audio attachment.
Add, remove, and test MCP (Model Context Protocol) servers by editing meta/mcp.json. Tools from connected servers appear automatically as mcp__<server>__<tool>.
基于 SOC 职业分类
| name | serve-public |
| description | Expose a local port as a public HTTPS subdomain under IRIS_BASE_DOMAIN. Writes nginx config, obtains SSL cert via certbot, reloads nginx. |
Expose a service (running in Docker or on host) as a public HTTPS subdomain.
Given a subdomain name and a host port, this skill:
<name>.<IRIS_BASE_DOMAIN>The wildcard DNS *.<IRIS_BASE_DOMAIN> is already configured during bootstrap — no DNS step needed here.
serve-public <name> <host-port>
name — subdomain prefix, e.g. weather → weather.${IRIS_BASE_DOMAIN}host-port — port on the host that the service listens on# Expose weather web UI (container port mapped to host :8080)
serve-public weather 8080
# Expose a different agent
serve-public digest 8090
#!/usr/bin/env bash
set -euo pipefail
NAME="${1:?Usage: serve-public <name> <host-port>}"
PORT="${2:?Usage: serve-public <name> <host-port>}"
BASE_DOMAIN="${IRIS_BASE_DOMAIN:?IRIS_BASE_DOMAIN not set — configure in /iris/.env}"
CERTBOT_EMAIL="${CERTBOT_EMAIL:-admin@${BASE_DOMAIN#*.}}"
FQDN="${NAME}.${BASE_DOMAIN}"
CONF="/etc/nginx/sites-available/${FQDN}"
echo "[serve-public] Exposing http://localhost:${PORT} as https://${FQDN}"
# 1. Write nginx config (HTTP only — certbot will add HTTPS block)
sudo tee "$CONF" > /dev/null <<NGINX
server {
listen 80;
listen [::]:80;
server_name ${FQDN};
location / {
proxy_pass http://localhost:${PORT};
proxy_http_version 1.1;
proxy_set_header Upgrade \$http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host \$host;
proxy_set_header X-Real-IP \$remote_addr;
proxy_set_header X-Forwarded-For \$proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto \$scheme;
proxy_read_timeout 86400;
}
}
NGINX
# 2. Enable site
sudo ln -sfn "$CONF" "/etc/nginx/sites-enabled/${FQDN}"
# 3. Reload nginx (HTTP must be up for certbot HTTP-01 challenge)
sudo nginx -t
sudo systemctl reload nginx
# 4. Obtain/renew SSL cert
sudo certbot --nginx \
-d "$FQDN" \
--non-interactive \
--agree-tos \
-m "$CERTBOT_EMAIL" \
--redirect
echo "[serve-public] Done — https://${FQDN} is live"
iptables rules, open 80/443 in both the cloud console and the VM's own firewall manually — see Troubleshooting)iptables directly (sudo iptables -L -n), not just ufw status — ufw may not be installed, or may not be the active firewall frontend, while a distro-shipped iptables rule set (e.g. Oracle's default image) still blocks the port underneath it*.<IRIS_BASE_DOMAIN> must already point to this VM (bootstrap.sh handles this)Upgrade and Connection headerssudo rm /etc/nginx/sites-{available,enabled}/<fqdn> && sudo systemctl reload nginx