/alibabacloud-starops-chat
Alibaba Cloud STAROps Agent AIOps diagnostic skill. Use this skill to help users diagnose service errors, analyze root causes, query workspace/service topology, inspect APM metrics, and troubleshoot incidents through the STAROps Agent. Triggers: "排查根因", "根因分析", "服务报错", "服务异常",
$ npx -y skills add aliyun/alibabacloud-aiops-skills --skill alibabacloud-starops-chat --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
- Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
- You can call itInvoke it directly when you want it.
- Slash command
/alibabacloud-starops-chat
Context preview
The summary Claude sees to decide when to auto-load this skill.
Alibaba Cloud STAROps Agent AIOps diagnostic skill. Use this skill to help users diagnose service errors, analyze root causes, query workspace/service topology, inspect APM metrics, and troubleshoot incidents through the STAROps Agent. Triggers: "排查根因", "根因分析", "服务报错", "服务异常",
SKILL.md
alibabacloud-starops-chat.SKILL.mdname: alibabacloud-starops-chat
description: |
Alibaba Cloud STAROps Agent AIOps diagnostic skill. Use this skill to help users diagnose service errors, analyze root causes, query workspace/service topology, inspect APM metrics, and troubleshoot incidents through the STAROps Agent.
Triggers: "排查根因", "根因分析", "服务报错", "服务异常", "APM 服务", "workspace 服务", "STAROps", "AIOps 诊断", "链路追踪", "告警分析".
Alibaba Cloud STAROps Agent
Call the Alibaba Cloud STAROps Agent through STAROps OpenAPI and receive a streaming diagnostic answer.
Scenario Description
Use this skill when the user wants to:
- Diagnose service errors or exceptions (root cause analysis)
- Query workspace topology, service lists, or service metrics
- Analyze APM traces, error rates, latency, or request volume
- Triage alerts or investigate incidents
- Ask questions about their STAROps workspace or services
Configuration
The script reads STAROps connection values from environment variables and optional JSON config files. Environment variables and command-line flags override config file values.
Config files are loaded in this order:
1. User config: `~/.starops/config.json` 2. Project config: `./.starops/config.json` (overrides user config) 3. Explicit config: `--config <path>` or `STAROPS_AGENT_CONFIG` (overrides user/project config)
The three required values (`employeeId`, `workspace`, `uid`) may come from either environment variables or config files.
| Variable | Required | Description | |----------|----------|-------------| | `STAROPS_AGENT_EMPLOYEE` | Yes, unless config provides `employeeId` | Digital Employee ID in STAROps (from console → Digital Employee list → ID column) | | `STAROPS_AGENT_WORKSPACE` | Yes, unless config provides `workspace` | Workspace identifier | | `STAROPS_AGENT_UID` | Yes, unless config provides `uid` | Alibaba Cloud account UID that owns the workspace | | `STAROPS_AGENT_ENDPOINT` | No | API endpoint (default: `starops.cn-beijing.aliyuncs.com`) | | `STAROPS_AGENT_PROJECT` | No | Optional STAROps project variable forwarded with each request. Overridden by `--project` | | `STAROPS_AGENT_TIMEOUT` | No | Default value for `--timeout` (CreateChat stream total timeout in seconds; default `1800`) | | `STAROPS_AGENT_IDLE_TIMEOUT` | No | Default value for `--idle-timeout` (max seconds to wait for the next SSE event; default `60`) | | `STAROPS_AGENT_CONFIG` | No | Path to an explicit JSON config file loaded after user/project config |
Minimal config file example:
{
"employeeId": "<your-digital-employee-id>",
"workspace": "<your-workspace-name>",
"uid": "<your-alibaba-cloud-account-uid>"
}Optional fields:
{
"endpoint": "starops.cn-beijing.aliyuncs.com",
"project": "optional-project",
"timeout": 1800,
"idleTimeout": 60
}Config files use the exact key names shown above. Do not use alternate aliases such as `employee`, `digitalEmployeeId`, `workspaceName`, or `accountUid`.
**Pre-flight check — run this before invoking the script to confirm environment or config values are available:**
missing=""
[ -z "$STAROPS_AGENT_EMPLOYEE" ] && missing="$missing STAROPS_AGENT_EMPLOYEE"
[ -z "$STAROPS_AGENT_WORKSPACE" ] && missing="$missing STAROPS_AGENT_WORKSPACE"
[ -z "$STAROPS_AGENT_UID" ] && missing="$missing STAROPS_AGENT_UID"
config_file_found=""
[ -f ".starops/config.json" ] && config_file_found=1
[ -f "$HOME/.starops/config.json" ] && config_file_found=1
[ -n "$STAROPS_AGENT_CONFIG" ] && [ -f "$STAROPS_AGENT_CONFIG" ] && config_file_found=1
if [ -n "$missing" ] && [ -z "$config_file_found" ]; then
echo "ERROR: Missing required environment variables:$missing and no STAROps config file was found" >&2
exit 1
fi
echo "OK: STAROps configuration is available from environment variables or config file"
If any required value is still unavailable, ask the user to provide it. Never substitute placeholder strings like `example-employee`.
The STAROps console link uses the same digital employee ID as `assistantId`.
Credentials use the Alibaba Cloud Credentials default chain. Do not define skill-specific AccessKey variables; use standard Alibaba Cloud credential sources such as environment credentials (`ALIBABA_CLOUD_ACCESS_KEY_ID` / `ALIBABA_CLOUD_ACCESS_KEY_SECRET`), profiles, STS, RAM role, or instance metadata.
Invocation
**IMPORTANT: The `--pipe` flag is MANDATORY for all invocations.** It ensures structured output with THREAD ID, STAROPS_URL, and delimited answer blocks that downstream agents can reliably parse. Never omit `--pipe`.
Install dependencies and run from this skill's root directory:
pip3 install -r scripts/requirements.txt
# First call - creates a new thread automatically
python3 scripts/call_starops_agent.py --question "<complete user context>" --pipe
# First call with an explicit config file
python3 scripts/call_starops_agent.py --config ".starops/config.json" --question "<complete user context>" --pipe
# Follow-up calls - MUST reuse the thread ID from previous response
python3 scripts/call_starops_agent.py --thread "<thread_id>" --question "<follow-up question>" --pipe
**Thread Management:**
- Extract thread ID from output
- Use the printed `STAROPS_URL` when the user needs to inspect the same thread in the STAROps console
- Always pass `--thread "<id>"` for related follow-up questions to preserve context
Example workflow:
# Query 1: Creates new thread
$ python3 scripts/call_starops_agent.py --question "Query TOP 5 error applications" --pipe
THREAD: thread-abc123-xyz
STAROPS_URL: https://starops.console.aliyun.com/chat?threadId=thread-abc123-xyz&assistantId=apsara-ops
=== STAROPS ANSWER BEGIN ===
...
# Query 2: MUST reuse thread for context
$ python3 scripts/call_starops_agent.py --thread "thread-abc123-xyz" --question "Deep dive into notification app errors" --pipe
Command-Line Options
| Flag | Description | |------|-------------| | `--question <text>` | **Required.** Natural-language quest
Read more
name: alibabacloud-starops-chat description: | Alibaba Cloud STAROps Agent AIOps diagnostic skill. Use this skill to help users diagnose service errors, analyze root causes, query workspace/service topology, inspect APM metrics, and troubleshoot incidents through the STAROps Agent. Triggers: "排查根因", "根因分析", "服务报错", "服务异常", "APM 服务", "workspace 服务", "STAROps", "AIOps 诊断", "链路追踪", "告警分析".
Alibaba Cloud STAROps Agent
Call the Alibaba Cloud STAROps Agent through STAROps OpenAPI and receive a streaming diagnostic answer.
Scenario Description
Use this skill when the user wants to:
- Diagnose service errors or exceptions (root cause analysis)
- Query workspace topology, service lists, or service metrics
- Analyze APM traces, error rates, latency, or request volume
- Triage alerts or investigate incidents
- Ask questions about their STAROps workspace or services
Configuration
The script reads STAROps connection values from environment variables and optional JSON config files. Environment variables and command-line flags override config file values.
Config files are loaded in this order:
1. User config: `~/.starops/config.json` 2. Project config: `./.starops/config.json` (overrides user config) 3. Explicit config: `--config <path>` or `STAROPS_AGENT_CONFIG` (overrides user/project config)
The three required values (`employeeId`, `workspace`, `uid`) may come from either environment variables or config files.
| Variable | Required | Description | |----------|----------|-------------| | `STAROPS_AGENT_EMPLOYEE` | Yes, unless config provides `employeeId` | Digital Employee ID in STAROps (from console → Digital Employee list → ID column) | | `STAROPS_AGENT_WORKSPACE` | Yes, unless config provides `workspace` | Workspace identifier | | `STAROPS_AGENT_UID` | Yes, unless config provides `uid` | Alibaba Cloud account UID that owns the workspace | | `STAROPS_AGENT_ENDPOINT` | No | API endpoint (default: `starops.cn-beijing.aliyuncs.com`) | | `STAROPS_AGENT_PROJECT` | No | Optional STAROps project variable forwarded with each request. Overridden by `--project` | | `STAROPS_AGENT_TIMEOUT` | No | Default value for `--timeout` (CreateChat stream total timeout in seconds; default `1800`) | | `STAROPS_AGENT_IDLE_TIMEOUT` | No | Default value for `--idle-timeout` (max seconds to wait for the next SSE event; default `60`) | | `STAROPS_AGENT_CONFIG` | No | Path to an explicit JSON config file loaded after user/project config |
Minimal config file example:
{
"employeeId": "<your-digital-employee-id>",
"workspace": "<your-workspace-name>",
"uid": "<your-alibaba-cloud-account-uid>"
}Optional fields:
{
"endpoint": "starops.cn-beijing.aliyuncs.com",
"project": "optional-project",
"timeout": 1800,
"idleTimeout": 60
}Config files use the exact key names shown above. Do not use alternate aliases such as `employee`, `digitalEmployeeId`, `workspaceName`, or `accountUid`.
**Pre-flight check — run this before invoking the script to confirm environment or config values are available:**
missing="" [ -z "$STAROPS_AGENT_EMPLOYEE" ] && missing="$missing STAROPS_AGENT_EMPLOYEE" [ -z "$STAROPS_AGENT_WORKSPACE" ] && missing="$missing STAROPS_AGENT_WORKSPACE" [ -z "$STAROPS_AGENT_UID" ] && missing="$missing STAROPS_AGENT_UID" config_file_found="" [ -f ".starops/config.json" ] && config_file_found=1 [ -f "$HOME/.starops/config.json" ] && config_file_found=1 [ -n "$STAROPS_AGENT_CONFIG" ] && [ -f "$STAROPS_AGENT_CONFIG" ] && config_file_found=1 if [ -n "$missing" ] && [ -z "$config_file_found" ]; then echo "ERROR: Missing required environment variables:$missing and no STAROps config file was found" >&2 exit 1 fi echo "OK: STAROps configuration is available from environment variables or config file"
If any required value is still unavailable, ask the user to provide it. Never substitute placeholder strings like `example-employee`.
The STAROps console link uses the same digital employee ID as `assistantId`.
Credentials use the Alibaba Cloud Credentials default chain. Do not define skill-specific AccessKey variables; use standard Alibaba Cloud credential sources such as environment credentials (`ALIBABA_CLOUD_ACCESS_KEY_ID` / `ALIBABA_CLOUD_ACCESS_KEY_SECRET`), profiles, STS, RAM role, or instance metadata.
Invocation
**IMPORTANT: The `--pipe` flag is MANDATORY for all invocations.** It ensures structured output with THREAD ID, STAROPS_URL, and delimited answer blocks that downstream agents can reliably parse. Never omit `--pipe`.
Install dependencies and run from this skill's root directory:
pip3 install -r scripts/requirements.txt # First call - creates a new thread automatically python3 scripts/call_starops_agent.py --question "<complete user context>" --pipe # First call with an explicit config file python3 scripts/call_starops_agent.py --config ".starops/config.json" --question "<complete user context>" --pipe # Follow-up calls - MUST reuse the thread ID from previous response python3 scripts/call_starops_agent.py --thread "<thread_id>" --question "<follow-up question>" --pipe
**Thread Management:**
- Extract thread ID from output
- Use the printed `STAROPS_URL` when the user needs to inspect the same thread in the STAROps console
- Always pass `--thread "<id>"` for related follow-up questions to preserve context
Example workflow:
# Query 1: Creates new thread $ python3 scripts/call_starops_agent.py --question "Query TOP 5 error applications" --pipe THREAD: thread-abc123-xyz STAROPS_URL: https://starops.console.aliyun.com/chat?threadId=thread-abc123-xyz&assistantId=apsara-ops === STAROPS ANSWER BEGIN === ... # Query 2: MUST reuse thread for context $ python3 scripts/call_starops_agent.py --thread "thread-abc123-xyz" --question "Deep dive into notification app errors" --pipe
Command-Line Options
| Flag | Description | |------|-------------| | `--question <text>` | **Required.** Natural-language quest
Official Alibaba Cloud Agent Skills collection, providing AI agents with rich Alibaba Cloud product capabilities and general-purpose tooling.
Other skills on alibabacloud-aiops-skills.
- /alibabacloud-agentbay-aio-skills
Execute code in a secure cloud sandbox via AgentBay SDK. Use this skill whenever users request to run, execute, or evaluate code (Python, JavaScript, R, Java), including plotting charts, running scripts, or viewing code output. Covers requests like "run this code", "execute
Open skill - /alibabacloud-agentloop-dataset
Operate Alibaba Cloud AgentLoop Dataset resources with aliyun CLI and the AgentLoop API version 2026-05-20. Use when requests concern AgentLoop datasets, data rows, Dataset schemas, embedding fields, semantic search, ExecuteQuery, AgentSpace data, 数据集, 数据写入, 数据查询, 语义检索, or ask
Open skill - /alibabacloud-agentloop-evaluation
Orchestrate AgentLoop evaluation workflows through the Aliyun CLI plugin with safe previews, saved evaluator and evaluator-skill management, one-shot sample tests, trace or dataset batch runs, polling, and result inspection. Analyze evaluation quality and low-score cases from
Open skill - /alibabacloud-agentloop-experience
Proactively use AgentLoop Recall to retrieve prior Alibaba Cloud AgentLoop experience through the bundled SearchContext CLI whenever the user asks or implies that prior work may help. Trigger for requests to check, search, recall, retrieve, look up, review, consult, reference,
Open skill - /alibabacloud-agentloop-management
AgentLoop APM接入 / AI可观测接入 / 应用监控接入 / 自研探针 / 探针安装. Use for Python aliyun-bootstrap (aliyun-instrument), Java AliyunJavaAgent, Golang instgo, Node.js cms_node_sdk, PHP/.NET OpenTelemetry, ack-onepilot, LicenseKey, AgentLoop workspace agentloop-*. Also for LangChain, Dify,
Open skill - /alibabacloud-avatar-video
Use Alibaba Cloud DashScope API and LingMou to generate AI video and speech. Seven capabilities — (1) LivePortrait talking-head (image + audio → video, two-step), (2) EMO talking-head, (3) AA/AnimateAnyone full-body animation (three-step), (4) T2I text-to-image (Wan 2.x, default
Open skill

