aliyun-cosyvoice-voice…
Use when creating cloned voices with Alibaba Cloud Model Studio CosyVoice customization models, especially cosyvoice-v3.5-plus or…
Use when the user needs to integrate OpenClaw with Alibaba Cloud SLS/Observability, including collector setup, machine groups, indexes, dashboards, collection configs, or Logtail bindings on Linux.
$ npx -y skills add cinience/alicloud-skills --skill aliyun-sls-openclaw-integration --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/aliyun-sls-openclaw-integrationContext preview
The summary Claude sees to decide when to auto-load this skill.
Use when the user needs to integrate OpenClaw with Alibaba Cloud SLS/Observability, including collector setup, machine groups, indexes, dashboards, collection configs, or Logtail bindings on Linux.
name: aliyun-sls-openclaw-integration
description: Use when the user needs to integrate OpenClaw with Alibaba Cloud SLS/Observability, including collector setup, machine groups, indexes, dashboards, collection configs, or Logtail bindings on Linux.
metadata:
{
"openclaw":
{
"emoji": "📊",
"requires": { "bins": ["aliyun"] },
},
}This skill provisions Alibaba Cloud SLS observability for OpenClaw on Linux and keeps reruns safe.
At a high level, execute this flow:
1. Check and install `aliyun` CLI (install latest when missing) 2. Install `LoongCollector` by project region (skip if already running) 3. Create an identifier-based machine group (local identifier + cloud machine group) 4. Create `logstore` index and dashboards 5. Create `logstore` collection config 6. Bind the collection config to the machine group
---
Before running commands, make sure the user intent is complete:
1. Confirm the target `PROJECT` and `LOGSTORE`. 2. Confirm Linux host access with `sudo` available. 3. Confirm AK/SK are already exported in environment variables. 4. If any required input is missing, ask for it first and do not run partial setup.
---
Required:
Read from environment variables:
Recommended optional:
> If you use different AK/SK variable names, export them to these standard names first.
---
After successful execution, the environment should contain:
---
> The commands below are designed as "exists -> skip" and are safe to rerun. > Strict template mode: for index/config/dashboard payloads, always read from files in `references/`. > Do not handcraft or simplify JSON bodies beyond required placeholder replacement.
set -euo pipefail
# ===== User inputs =====
: "${PROJECT:?Please export PROJECT}"
: "${LOGSTORE:?Please export LOGSTORE}"
: "${ALIBABACLOUD_ACCESS_KEY_ID:?Please export ALIBABACLOUD_ACCESS_KEY_ID}"
: "${ALIBABACLOUD_ACCESS_KEY_SECRET:?Please export ALIBABACLOUD_ACCESS_KEY_SECRET}"
: "${ALIYUN_UID:?Please export ALIYUN_UID}"
MACHINE_GROUP="openclaw-sls-collector"
CONFIG_NAME="openclaw-audit_${LOGSTORE}"
# 1) Install aliyun CLI if missing (Linux)
if ! command -v aliyun >/dev/null 2>&1; then
if command -v apt-get >/dev/null 2>&1; then
sudo apt-get update
sudo apt-get install -y aliyun-cli
elif command -v dnf >/dev/null 2>&1; then
sudo dnf install -y aliyun-cli
elif command -v yum >/dev/null 2>&1; then
sudo yum install -y aliyun-cli
elif command -v zypper >/dev/null 2>&1; then
sudo zypper -n install aliyun-cli
else
echo "aliyun CLI not found. Install aliyun-cli manually for your Linux distribution." >&2
exit 1
fi
fi
# Export auth variables for aliyun CLI
export ALIBABACLOUD_ACCESS_KEY_ID
export ALIBABACLOUD_ACCESS_KEY_SECRET
is_loong_running() {
if sudo /etc/init.d/loongcollectord status 2>/dev/null | grep -qi "running"; then
return 0
fi
if sudo /etc/init.d/ilogtaild status 2>/dev/null | grep -qi "running"; then
return 0
fi
return 1
}
# 2) Resolve region and install LoongCollector (skip when already running)
REGION_ID="${ALIBABACLOUD_REGION_ID:-}"
if [ -z "$REGION_ID" ]; then
REGION_ID="$(aliyun sls GetProject --project "$PROJECT" --cli-query 'region' --quiet 2>/dev/null | tr -d '\"' || true)"
fi
if [ -z "$REGION_ID" ]; then
echo "Cannot resolve region from project: $PROJECT. Please set ALIBABACLOUD_REGION_ID." >&2
exit 1
fi
if ! is_loong_running; then
wget "https://aliyun-observability-release-${REGION_ID}.oss-${REGION_ID}.aliyuncs.com/loongcollector/linux64/latest/loongcollector.sh" -O loongcollector.sh
chmod +x loongcollector.sh
./loongcollector.sh install "${REGION_ID}"
fi
# Post-install verification: one of loongcollectord/ilogtaild must be running.
if ! is_loong_running; then
sudo /etc/init.d/loongcollectord start >/dev/null 2>&1 || true
sudo /etc/init.d/ilogtaild start >/dev/null 2>&1 || true
fi
if ! is_loong_running; then
echo "LoongCollector installation check failed: neither loongcollectord nor ilogtaild is running." >&2
exit 1
fi
# 3) Local user-defined identifier + create machine group
sudo mkdir -p /etc/ilogtail
sudo mkdir -p /etc/ilogtail/users
if [ ! -f /etc/ilogtail/user_defined_id ]; then
sudo touch /etc/ilogtail/user_defined_id
fi
RAND8="$(LC_ALL=C tr -dc 'a-z0-9' </dev/urandom | head -c 8)"
USER_DEFINED_ID_PREFIX="${PROJECT}_openclaw_sls_collector_"
EXISTING_USER_DEFINED_ID="$(sudo awk -v p="${USER_DEFINED_ID_PREFIX}" 'index($0,p)==1 {print; exit}' /etc/ilogtail/user_defined_id 2>/dev/null || true)"
if [ -n "${EXISTING_USER_DEFINED_ID}" ]; then
USER_DEFINED_ID="${EXISTING_USER_DEFINED_ID}"
else
USER_DEFINED_ID="${USER_DEFINED_ID_PREFIX}${RAND8}"
echo "${USER_DEFINED_ID}" | sudo tee -a /etc/ilogtail/user_defined_id >/dev/null
fi
if ! sudo grep -Fxq "${USER_DEFINED_ID}" /etc/ilogtail/user_defined_id 2>/dev/null; then
echo "Failed to persist USER_DEFINED_ID to /etc/ilogtail/user_defined_id" >&2
exit 1
fi
if [ ! -f "/etc/ilogtail/users/${ALIYUN_UID}" ]; then
sudo touch "/etc/ilogtail/users/${ALIYUN_UID}"
fi
if [ ! -f "/etc/ilogtail/users/${ALIYUN_UID}" ]; then
echo "Failed to create UID marker file: /etc/ilogtail/users/${ALIYUN_UID}" >&2
exit 1
fi
if ! aliyun sls GetMachineGroup --Use when creating cloned voices with Alibaba Cloud Model Studio CosyVoice customization models, especially cosyvoice-v3.5-plus or…
Use when designing custom voices with Alibaba Cloud Model Studio CosyVoice customization models, especially cosyvoice-v3.5-plus…
Use when low-latency realtime speech recognition is needed with Alibaba Cloud Model Studio Qwen ASR Realtime models, including…
Use when transcribing non-realtime speech with Alibaba Cloud Model Studio Qwen ASR models (`qwen3-asr-flash`, `qwen-audio-asr`,…
Use when live speech translation is needed with Alibaba Cloud Model Studio Qwen LiveTranslate models, including bilingual…
Use when real-time speech synthesis is needed with Alibaba Cloud Model Studio Qwen TTS Realtime models. Use when low-latency…