Tair Database AI Assistant This Skill focuses on Alibaba Cloud Tair (Redis OSS-Compatible) database intelligent O&M, invoking the get-yao-chi-agent API through the aliyun CLI DAS plugin for diagnostics and analysis. Architecture : → → → Tair Intelligent Diagnostics Supported Capabilities | Capability | Description | |------------|-------------| | Instance List Query | List and filter Tair/Redis instances by region, type, status | | Memory Usage Analysis | Memory consumption breakdown, fragmentation ratio, eviction statistics | | Hotspot Key Detection | Hot key identification, access frequency…

\\r'}\"\n [[ -z \"$line\" ]] && continue\n\n # Detect response format on first line\n if [[ \"$format_detected\" == false ]]; then\n if [[ \"$line\" =~ ^data: ]]; then\n is_sse=true\n debug_log \"Detected SSE format response\"\n elif echo \"$line\" | jq -e '.data' &>/dev/null 2>&1; then\n is_json_stream=true\n debug_log \"Detected streaming JSON format response (DAS plugin)\"\n else\n # Might be error response or plain JSON, buffer first\n error_buffer=\"$line\"\n # Check if error response\n local error_code\n error_code=$(echo \"$line\" | jq -r '.Code // empty' 2>/dev/null) || true\n if [[ -n \"$error_code\" ]]; then\n local error_msg\n error_msg=$(echo \"$line\" | jq -r '.Message // empty' 2>/dev/null) || true\n echo \"Error: ${error_msg:-Unknown error} (${error_code})\" >&2\n if [[ \"$error_code\" == *\"Throttling\"* ]] || [[ \"$error_code\" == *\"ConcurrentLimit\"* ]]; then\n echo \"Max 2 concurrent sessions per account. Please wait for previous query to complete.\" >&2\n fi\n return 1\n fi\n # Try to handle as plain JSON response\n local content\n content=$(echo \"$line\" | jq -r '.Content // .Data // empty' 2>/dev/null) || true\n if [[ -n \"$content\" ]]; then\n printf \"%s\" \"$content\"\n session_id=$(echo \"$line\" | jq -r '.SessionId // empty' 2>/dev/null) || true\n else\n # Cannot parse, output as-is\n echo \"$line\"\n fi\n format_detected=true\n continue\n fi\n format_detected=true\n fi\n\n # Process SSE format\n if [[ \"$is_sse\" == true ]]; then\n if [[ \"$line\" =~ ^data:\\ ?(.*) ]]; then\n local data=\"${BASH_REMATCH[1]}\"\n [[ \"$data\" == \"[DONE]\" || -z \"$data\" ]] && continue\n\n local chunk_content\n chunk_content=$(echo \"$data\" | jq -r '.Content // empty' 2>/dev/null) || true\n [[ -n \"$chunk_content\" ]] && printf \"%s\" \"$chunk_content\"\n\n local chunk_session\n chunk_session=$(echo \"$data\" | jq -r '.SessionId // empty' 2>/dev/null) || true\n [[ -n \"$chunk_session\" ]] && session_id=\"$chunk_session\"\n\n if [[ \"$DEBUG\" == \"true\" ]]; then\n local reasoning\n reasoning=$(echo \"$data\" | jq -r '.ReasoningContent // empty' 2>/dev/null) || true\n [[ -n \"$reasoning\" ]] && debug_log \"Reasoning: $reasoning\"\n fi\n fi\n fi\n\n # Process streaming JSON format\n if [[ \"$is_json_stream\" == true ]]; then\n local chunk_content\n chunk_content=$(echo \"$line\" | jq -r '.data.Content // empty' 2>/dev/null) || true\n [[ -n \"$chunk_content\" ]] && printf \"%s\" \"$chunk_content\"\n\n local chunk_session\n chunk_session=$(echo \"$line\" | jq -r '.data.SessionId // empty' 2>/dev/null) || true\n [[ -n \"$chunk_session\" ]] && session_id=\"$chunk_session\"\n\n if [[ \"$DEBUG\" == \"true\" ]]; then\n local reasoning\n reasoning=$(echo \"$line\" | jq -r '.data.ReasoningContent // empty' 2>/dev/null) || true\n [[ -n \"$reasoning\" ]] && debug_log \"Reasoning: $reasoning\"\n fi\n fi\n done\n\n # Output newline (end of content)\n echo \"\"\n\n # Output session ID (to stderr for multi-turn conversation)\n if [[ -n \"$session_id\" ]]; then\n echo \"\" >&2\n echo \"[SessionID] $session_id\" >&2\n fi\n}\n\n# --- Argument parsing ---\nwhile [[ $# -gt 0 ]]; do\n case \"$1\" in\n --session-id)\n SESSION_ID=\"$2\"\n shift 2\n ;;\n --profile)\n PROFILE=\"$2\"\n shift 2\n ;;\n --debug|-d)\n DEBUG=true\n shift\n ;;\n --help|-h)\n usage\n exit 0\n ;;\n -)\n QUERY=$(cat)\n shift\n ;;\n -*)\n echo \"Unknown option: $1\" >&2\n usage\n exit 1\n ;;\n *)\n QUERY=\"$1\"\n shift\n ;;\n esac\ndone\n\n# --- Input validation ---\n# Max query length (reasonable limit for natural language queries)\nMAX_QUERY_LENGTH=4000\n# Max session ID length\nMAX_SESSION_ID_LENGTH=128\n# Session ID format: alphanumeric, hyphens, underscores only\nSESSION_ID_PATTERN='^[a-zA-Z0-9_-]+

Tair Database AI Assistant This Skill focuses on Alibaba Cloud Tair (Redis OSS-Compatible) database intelligent O&M, invoking the get-yao-chi-agent API through the aliyun CLI DAS plugin for diagnostics and analysis. Architecture : → → → Tair Intelligent Diagnostics Supported Capabilities | Capability | Description | |------------|-------------| | Instance List Query | List and filter Tair/Redis instances by region, type, status | | Memory Usage Analysis | Memory consumption breakdown, fragmentation ratio, eviction statistics | | Hotspot Key Detection | Hot key identification, access frequency…

\n\nvalidate_input() {\n # Validate QUERY\n if [[ -z \"$QUERY\" ]]; then\n usage\n exit 1\n fi\n\n local query_length=${#QUERY}\n if [[ $query_length -gt $MAX_QUERY_LENGTH ]]; then\n echo \"Error: Query too long ($query_length chars). Maximum allowed: $MAX_QUERY_LENGTH\" >&2\n exit 1\n fi\n\n # Validate SESSION_ID if provided\n if [[ -n \"$SESSION_ID\" ]]; then\n local session_id_length=${#SESSION_ID}\n if [[ $session_id_length -gt $MAX_SESSION_ID_LENGTH ]]; then\n echo \"Error: Session ID too long ($session_id_length chars). Maximum allowed: $MAX_SESSION_ID_LENGTH\" >&2\n exit 1\n fi\n\n if [[ ! \"$SESSION_ID\" =~ $SESSION_ID_PATTERN ]]; then\n echo \"Error: Invalid session ID format. Only alphanumeric, hyphens, and underscores allowed.\" >&2\n exit 1\n fi\n fi\n\n # Validate PROFILE if provided (alphanumeric, hyphens, underscores, dots)\n if [[ -n \"$PROFILE\" ]]; then\n if [[ ! \"$PROFILE\" =~ ^[a-zA-Z0-9._-]+$ ]]; then\n echo \"Error: Invalid profile name format.\" >&2\n exit 1\n fi\n fi\n}\n\n# --- Validation ---\nvalidate_input\n\ncheck_dependencies\n\n# --- Build CLI command arguments ---\n# Use DAS plugin's kebab-case command, supports Signature V3\ncli_args=(das get-yao-chi-agent\n --query \"$QUERY\"\n --source \"$SOURCE\"\n --endpoint \"$ENDPOINT\"\n --read-timeout \"$READ_TIMEOUT\"\n --connect-timeout \"$CONNECT_TIMEOUT\"\n --user-agent AlibabaCloud-Agent-Skills\n)\n\nif [[ -n \"$SESSION_ID\" ]]; then\n cli_args+=(--session-id \"$SESSION_ID\")\nfi\n\nif [[ -n \"$PROFILE\" ]]; then\n cli_args+=(--profile \"$PROFILE\")\nfi\n\n# --- Output query info ---\necho \"[Query] $QUERY\" >&2\nif [[ -n \"$SESSION_ID\" ]]; then\n echo \"[SessionID] $SESSION_ID\" >&2\nfi\necho \"============================================================\" >&2\necho \"[Tair YaoChi Agent Response]\" >&2\n\ndebug_log \"Executing: aliyun ${cli_args[*]}\"\n\n# --- Execute and stream parse ---\n# Use pipe for real streaming output, avoid command substitution blocking\naliyun \"${cli_args[@]}\" 2>&1 | parse_sse_streaming\nexit_code=${PIPESTATUS[0]}\n\nif [[ $exit_code -ne 0 ]]; then\n # Non-zero exit but content already output via pipe, just log debug info\n debug_log \"aliyun CLI exit code: $exit_code (streaming response may return non-zero)\"\nfi\n","content_type":"application/x-sh; charset=utf-8","language":"bash","size":10345,"content_sha256":"015a923a87fc9d4273e7692ffb96faa7aaec501025ce646ace8ef2494ef96aba"}],"content_json":{"type":"doc","content":[{"type":"heading","attrs":{"level":1},"content":[{"text":"Tair Database AI Assistant","type":"text"}]},{"type":"paragraph","content":[{"text":"This Skill focuses on ","type":"text"},{"text":"Alibaba Cloud Tair (Redis OSS-Compatible) database","type":"text","marks":[{"type":"strong"}]},{"text":" intelligent O&M, invoking the get-yao-chi-agent API through the aliyun CLI DAS plugin for diagnostics and analysis.","type":"text"}]},{"type":"paragraph","content":[{"text":"Architecture","type":"text","marks":[{"type":"strong"}]},{"text":": ","type":"text"},{"text":"Aliyun CLI","type":"text","marks":[{"type":"code_inline"}]},{"text":" → ","type":"text"},{"text":"DAS Plugin (Signature V3)","type":"text","marks":[{"type":"code_inline"}]},{"text":" → ","type":"text"},{"text":"get-yao-chi-agent API","type":"text","marks":[{"type":"code_inline"}]},{"text":" → Tair Intelligent Diagnostics","type":"text"}]},{"type":"heading","attrs":{"level":3},"content":[{"text":"Supported Capabilities","type":"text"}]},{"type":"table","attrs":{"layout":null},"content":[{"type":"tr","content":[{"type":"th","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Capability","type":"text"}]}]},{"type":"th","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Description","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Instance List Query","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"List and filter Tair/Redis instances by region, type, status","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Memory Usage Analysis","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Memory consumption breakdown, fragmentation ratio, eviction statistics","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Hotspot Key Detection","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Hot key identification, access frequency analysis, cache optimization","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Big Key Analysis","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Large key detection, memory distribution analysis, optimization suggestions","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Latency Diagnostics","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Command latency analysis, slow command detection, network latency troubleshooting","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Slow Log Analysis","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Slow command log query, high-latency operation identification","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Parameter Tuning","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Instance parameter explanation, configuration suggestions, performance impact analysis","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Connection Session Analysis","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Connection count monitoring, client session troubleshooting, connection pool optimization","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Backup Status Check","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Backup completion verification, retention policy, recovery point in time","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Performance Monitoring","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"QPS/TPS/hit rate/bandwidth and other core metrics analysis","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Expiring Instance Query","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Subscription instance expiration reminder","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Security Configuration Audit","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Whitelist, SSL/TLS, password policy, security audit","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Storage Optimization","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Data structure optimization, TTL strategy, memory efficiency improvement","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Proxy Diagnostics","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Proxy layer performance analysis, connection routing, bandwidth bottleneck detection","type":"text"}]}]}]}]},{"type":"heading","attrs":{"level":2},"content":[{"text":"Installation","type":"text"}]},{"type":"blockquote","content":[{"type":"paragraph","content":[{"text":"Pre-check: Aliyun CLI >= 3.3.1 required","type":"text","marks":[{"type":"strong"}]},{"text":" Run ","type":"text"},{"text":"aliyun version","type":"text","marks":[{"type":"code_inline"}]},{"text":" to verify >= 3.3.1. If not installed or version too low, see ","type":"text"},{"text":"references/cli-installation-guide.md","type":"text","marks":[{"type":"link","attrs":{"href":"references/cli-installation-guide.md","title":null}}]},{"text":" for installation instructions. Then ","type":"text"},{"text":"[MUST]","type":"text","marks":[{"type":"strong"}]},{"text":" run ","type":"text"},{"text":"aliyun configure set --auto-plugin-install true","type":"text","marks":[{"type":"code_inline"}]},{"text":" to enable automatic plugin installation.","type":"text"}]}]},{"type":"code_block","attrs":{"wrap":false,"language":"bash"},"content":[{"text":"# Install aliyun CLI\ncurl -fsSL https://aliyuncli.alicdn.com/install.sh | bash\naliyun version # Verify >= 3.3.1\n\n# Enable automatic plugin installation\naliyun configure set --auto-plugin-install true\n\n# Install DAS plugin (get-yao-chi-agent requires plugin for Signature V3 support)\naliyun plugin install --names aliyun-cli-das\n\n# Update all installed plugins to latest version\naliyun plugin update\n\n# Install jq (for JSON response parsing)\n# macOS:\nbrew install jq\n# Ubuntu/Debian:\n# sudo apt-get install jq","type":"text"}]},{"type":"heading","attrs":{"level":2},"content":[{"text":"Parameter Confirmation","type":"text"}]},{"type":"blockquote","content":[{"type":"paragraph","content":[{"text":"IMPORTANT: Parameter Confirmation","type":"text","marks":[{"type":"strong"}]},{"text":" — Before executing any command or API call, ALL user-customizable parameters (e.g., RegionId, instance names, CIDR blocks, passwords, domain names, resource specifications, etc.) MUST be confirmed with the user. Do NOT assume or use default values without explicit user approval.","type":"text"}]}]},{"type":"table","attrs":{"layout":null},"content":[{"type":"tr","content":[{"type":"th","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Parameter","type":"text"}]}]},{"type":"th","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Required/Optional","type":"text"}]}]},{"type":"th","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Description","type":"text"}]}]},{"type":"th","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Default","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"query","type":"text","marks":[{"type":"code_inline"}]}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Required","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Natural language query content (including region, instance info)","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"-","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"--session-id","type":"text","marks":[{"type":"code_inline"}]}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Optional","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Session ID for multi-turn conversation","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"-","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"--profile","type":"text","marks":[{"type":"code_inline"}]}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Optional","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"aliyun CLI profile name","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"default","type":"text"}]}]}]}]},{"type":"heading","attrs":{"level":2},"content":[{"text":"Authentication","type":"text"}]},{"type":"paragraph","content":[{"text":"This Skill relies on the ","type":"text"},{"text":"aliyun CLI default credential chain","type":"text","marks":[{"type":"strong"}]},{"text":" for authentication — no explicit AK/SK handling is required in the Skill workflow.","type":"text"}]},{"type":"paragraph","content":[{"text":"The CLI automatically resolves credentials in the following priority order:","type":"text"}]},{"type":"ordered_list","attrs":{"order":1,"listStyle":"number"},"content":[{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"--profile","type":"text","marks":[{"type":"code_inline"}]},{"text":" flag on the command line","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"ALIBABA_CLOUD_PROFILE","type":"text","marks":[{"type":"code_inline"}]},{"text":" environment variable","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"ALIBABA_CLOUD_ACCESS_KEY_ID","type":"text","marks":[{"type":"code_inline"}]},{"text":" / ","type":"text"},{"text":"ALIBABA_CLOUD_ACCESS_KEY_SECRET","type":"text","marks":[{"type":"code_inline"}]},{"text":" environment variables","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Configuration file ","type":"text"},{"text":"~/.aliyun/config.json","type":"text","marks":[{"type":"code_inline"}]},{"text":" (current profile)","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"ECS Instance RAM Role (if running on ECS)","type":"text"}]}]}]},{"type":"paragraph","content":[{"text":"For credential setup and configuration modes (OAuth, AK, StsToken, RamRoleArn, EcsRamRole, etc.), see ","type":"text"},{"text":"references/cli-installation-guide.md","type":"text","marks":[{"type":"link","attrs":{"href":"references/cli-installation-guide.md","title":null}}]},{"text":".","type":"text"}]},{"type":"heading","attrs":{"level":2},"content":[{"text":"RAM Policy","type":"text"}]},{"type":"paragraph","content":[{"text":"See ","type":"text"},{"text":"references/ram-policies.md","type":"text","marks":[{"type":"link","attrs":{"href":"references/ram-policies.md","title":null}}]}]},{"type":"heading","attrs":{"level":2},"content":[{"text":"Core Workflow","type":"text"}]},{"type":"paragraph","content":[{"text":"All intelligent O&M operations are invoked through ","type":"text"},{"text":"scripts/call_yaochi_agent.sh","type":"text","marks":[{"type":"code_inline"}]},{"text":", which wraps ","type":"text"},{"text":"aliyun das get-yao-chi-agent","type":"text","marks":[{"type":"code_inline"}]},{"text":" (DAS plugin kebab-case command, supports Signature V3) with streaming response parsing.","type":"text"}]},{"type":"paragraph","content":[{"text":"Before executing any CLI command, AI-Mode must be enabled; after workflow ends, it must be disabled:","type":"text","marks":[{"type":"strong"}]}]},{"type":"code_block","attrs":{"wrap":false,"language":"bash"},"content":[{"text":"# [MUST] Enable AI-Mode before executing CLI commands\naliyun configure ai-mode enable\naliyun configure ai-mode set-user-agent --user-agent \"AlibabaCloud-Agent-Skills/alibabacloud-tair-ai-assistant\"","type":"text"}]},{"type":"code_block","attrs":{"wrap":false,"language":"bash"},"content":[{"text":"# Instance management\nbash $SKILL_DIR/scripts/call_yaochi_agent.sh \"List Tair instances in Hangzhou region\"\nbash $SKILL_DIR/scripts/call_yaochi_agent.sh \"Show detailed configuration of instance r-xxx\"\n\n# Performance diagnostics\nbash $SKILL_DIR/scripts/call_yaochi_agent.sh \"Analyze instance r-xxx performance in the last hour\"\nbash $SKILL_DIR/scripts/call_yaochi_agent.sh \"Show slow commands of instance r-xxx\"\n\n# Memory analysis\nbash $SKILL_DIR/scripts/call_yaochi_agent.sh \"Analyze memory usage of instance r-xxx\"\nbash $SKILL_DIR/scripts/call_yaochi_agent.sh \"Detect big keys in instance r-xxx\"\n\n# Hotspot key detection\nbash $SKILL_DIR/scripts/call_yaochi_agent.sh \"Find hotspot keys in instance r-xxx\"\n\n# Parameter tuning\nbash $SKILL_DIR/scripts/call_yaochi_agent.sh \"How to tune maxmemory-policy for instance r-xxx\"\nbash $SKILL_DIR/scripts/call_yaochi_agent.sh \"Explain hz parameter\"\n\n# Connection and session\nbash $SKILL_DIR/scripts/call_yaochi_agent.sh \"How to troubleshoot high connection count in instance r-xxx\"\n\n# Backup recovery\nbash $SKILL_DIR/scripts/call_yaochi_agent.sh \"Show backup status of instance r-xxx\"\n\n# Multi-turn conversation (use session ID from previous response)\nbash $SKILL_DIR/scripts/call_yaochi_agent.sh \"Continue analysis\" --session-id \"\u003csession-id>\"\n\n# Specify profile\nbash $SKILL_DIR/scripts/call_yaochi_agent.sh \"List instances\" --profile myprofile\n\n# Read from stdin\necho \"List instances\" | bash $SKILL_DIR/scripts/call_yaochi_agent.sh -","type":"text"}]},{"type":"code_block","attrs":{"wrap":false,"language":"bash"},"content":[{"text":"# [MUST] Disable AI-Mode after workflow ends\naliyun configure ai-mode disable","type":"text"}]},{"type":"heading","attrs":{"level":3},"content":[{"text":"Example Questions","type":"text"}]},{"type":"table","attrs":{"layout":null},"content":[{"type":"tr","content":[{"type":"th","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Scenario","type":"text"}]}]},{"type":"th","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Example Question","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Instance Management","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"List Tair instances in Beijing region","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Performance Diagnostics","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"How to troubleshoot high CPU usage in instance r-xxx","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Slow Log Analysis","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Show slow commands in instance r-xxx in the last hour","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Memory Analysis","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Analyze memory fragmentation of instance r-xxx","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Big Key Detection","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Detect big keys in instance r-xxx and suggest optimization","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Hotspot Key","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Find hotspot keys in instance r-xxx","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Parameter Tuning","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"What does maxmemory-policy parameter mean","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Master-Replica","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"How to handle high replication delay in instance r-xxx","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Backup Recovery","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"When was the latest backup of instance r-xxx","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Connection Troubleshooting","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Instance r-xxx connections are full","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Security Audit","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Check security configuration of instance r-xxx","type":"text"}]}]}]}]},{"type":"heading","attrs":{"level":2},"content":[{"text":"Success Verification","type":"text"}]},{"type":"paragraph","content":[{"text":"See ","type":"text"},{"text":"references/verification-method.md","type":"text","marks":[{"type":"link","attrs":{"href":"references/verification-method.md","title":null}}]}]},{"type":"heading","attrs":{"level":2},"content":[{"text":"Cleanup","type":"text"}]},{"type":"paragraph","content":[{"text":"This Skill focuses on ","type":"text"},{"text":"query and diagnostics","type":"text","marks":[{"type":"strong"}]},{"text":" capabilities, does not create any resources, no cleanup required.","type":"text"}]},{"type":"paragraph","content":[{"text":"The following operations are NOT within the scope of this Skill:","type":"text"}]},{"type":"bullet_list","content":[{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Create/delete Tair instances","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Change instance specifications","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Purchase/renew instances","type":"text"}]}]}]},{"type":"heading","attrs":{"level":2},"content":[{"text":"API and Command Tables","type":"text"}]},{"type":"paragraph","content":[{"text":"See ","type":"text"},{"text":"references/related-apis.md","type":"text","marks":[{"type":"link","attrs":{"href":"references/related-apis.md","title":null}}]}]},{"type":"heading","attrs":{"level":2},"content":[{"text":"Best Practices","type":"text"}]},{"type":"ordered_list","attrs":{"order":1,"listStyle":"number"},"content":[{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Instance ID Format","type":"text","marks":[{"type":"strong"}]},{"text":": Tair/Redis instance IDs typically start with ","type":"text"},{"text":"r-","type":"text","marks":[{"type":"code_inline"}]},{"text":", include the full instance ID in queries","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Region Specification","type":"text","marks":[{"type":"strong"}]},{"text":": Explicitly specify region in natural language queries (e.g., \"Hangzhou region\", \"Beijing region\") to improve query accuracy","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Multi-turn Conversation","type":"text","marks":[{"type":"strong"}]},{"text":": Use ","type":"text"},{"text":"--session-id","type":"text","marks":[{"type":"code_inline"}]},{"text":" for complex diagnostic scenarios to maintain context continuity","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Concurrency Limit","type":"text","marks":[{"type":"strong"}]},{"text":": Maximum 2 concurrent sessions per account, avoid initiating multiple parallel calls","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"High-risk Operations","type":"text","marks":[{"type":"strong"}]},{"text":": For operations involving parameter changes, master-replica switchover, always remind users to verify in test environment first","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Throttling Handling","type":"text","marks":[{"type":"strong"}]},{"text":": If encountering ","type":"text"},{"text":"Throttling.UserConcurrentLimit","type":"text","marks":[{"type":"code_inline"}]},{"text":" error, wait for previous query to complete and retry","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Credential Security","type":"text","marks":[{"type":"strong"}]},{"text":": Use ","type":"text"},{"text":"aliyun configure","type":"text","marks":[{"type":"code_inline"}]},{"text":" to manage credentials, never hardcode AK/SK in scripts","type":"text"}]}]}]},{"type":"heading","attrs":{"level":2},"content":[{"text":"Reference Links","type":"text"}]},{"type":"table","attrs":{"layout":null},"content":[{"type":"tr","content":[{"type":"th","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Reference","type":"text"}]}]},{"type":"th","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Description","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"references/cli-installation-guide.md","type":"text","marks":[{"type":"link","attrs":{"href":"references/cli-installation-guide.md","title":null}}]}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Aliyun CLI installation and configuration guide","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"references/related-apis.md","type":"text","marks":[{"type":"link","attrs":{"href":"references/related-apis.md","title":null}}]}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Related API and CLI command list","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"references/ram-policies.md","type":"text","marks":[{"type":"link","attrs":{"href":"references/ram-policies.md","title":null}}]}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"RAM permission policy list","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"references/verification-method.md","type":"text","marks":[{"type":"link","attrs":{"href":"references/verification-method.md","title":null}}]}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Success verification methods","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"references/acceptance-criteria.md","type":"text","marks":[{"type":"link","attrs":{"href":"references/acceptance-criteria.md","title":null}}]}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Acceptance criteria","type":"text"}]}]}]}]},{"type":"hr","attrs":{"markup":"---"}}]},"metadata":{"date":"2026-06-05","name":"alibabacloud-tair-ai-assistant","author":"@skillopedia","source":{"stars":133,"repo_name":"alibabacloud-aiops-skills","origin_url":"https://github.com/aliyun/alibabacloud-aiops-skills/blob/HEAD/skills/database/kvstore/alibabacloud-tair-ai-assistant/SKILL.md","repo_owner":"aliyun","body_sha256":"7a0c497e757aa489d7445979ed14864fadd416919c10017d5a935cb02b527351","cluster_key":"da044f985210df4cd7db69fee8902a4e126107287892144de3feeff03a4fcb24","clean_bundle":{"format":"clean-skill-bundle-v1","source":"aliyun/alibabacloud-aiops-skills/skills/database/kvstore/alibabacloud-tair-ai-assistant/SKILL.md","attachments":[{"id":"50974608-7d26-58ca-9266-8a36ada9be5e","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/50974608-7d26-58ca-9266-8a36ada9be5e/attachment.md","path":"references/acceptance-criteria.md","size":6401,"sha256":"839fce45d5e10db5f07a5f9c7cc1242a3fb26d37475667386ce748a1c3f201af","contentType":"text/markdown; charset=utf-8"},{"id":"3ada5e82-47b1-5bda-af2b-132f6dd3e69a","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/3ada5e82-47b1-5bda-af2b-132f6dd3e69a/attachment.md","path":"references/cli-installation-guide.md","size":11625,"sha256":"c5e16b897da28ca18451bd241d275023d799a80c5bd4174a1c1f20a55d317177","contentType":"text/markdown; charset=utf-8"},{"id":"bc0c238f-97e9-55c1-8e96-ed1315be8505","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/bc0c238f-97e9-55c1-8e96-ed1315be8505/attachment.md","path":"references/ram-policies.md","size":1719,"sha256":"d7ddb12cc286917ee16675600ba66eb855dbac638b8312a800346d53bfa1f205","contentType":"text/markdown; charset=utf-8"},{"id":"e9d56724-16ec-5ae0-ac1e-6b8c3ee1643e","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/e9d56724-16ec-5ae0-ac1e-6b8c3ee1643e/attachment.md","path":"references/related-apis.md","size":2262,"sha256":"3b5a8be98e73a1afccb3404a233e831147a866db46bfd2de993ffc6967458e58","contentType":"text/markdown; charset=utf-8"},{"id":"f2a14c5f-35e8-57c7-87ab-335c8e3abeb9","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/f2a14c5f-35e8-57c7-87ab-335c8e3abeb9/attachment.md","path":"references/verification-method.md","size":2468,"sha256":"c2aea7454bc50227fd9f032393b69c79584ced014c1a6553b08a7b7fc1c895dc","contentType":"text/markdown; charset=utf-8"},{"id":"b57c64cc-4d8a-5edf-b322-6907dbb56324","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/b57c64cc-4d8a-5edf-b322-6907dbb56324/attachment.sh","path":"scripts/call_yaochi_agent.sh","size":10345,"sha256":"015a923a87fc9d4273e7692ffb96faa7aaec501025ce646ace8ef2494ef96aba","contentType":"application/x-sh; charset=utf-8"}],"bundle_sha256":"6d378e32482ad8ff05fcfd47da1224a52e5c65f1da869a6778d97846416a340b","attachment_count":6,"text_attachments":6,"attachment_storage":"skillopedia-attachments-v1","binary_attachments":0,"excluded_attachments":[]},"cluster_size":1,"skill_md_path":"skills/database/kvstore/alibabacloud-tair-ai-assistant/SKILL.md","import_metadata":{"date":"2026-06-05","author":"@skillopedia","version":"v1","category":"data-analytics","category_label":"Data"},"exact_dupes_collapsed_into_this":0},"version":"v1","category":"data-analytics","import_tag":"clean-skills-v1","description":"Alibaba Cloud Tair (Redis OSS-Compatible) Database AI Assistant. For Tair/Redis instance management, performance diagnostics, memory analysis, hotspot key detection, latency troubleshooting, parameter tuning, connection session analysis.\nUse when user questions involve Tair, Redis, instance IDs starting with r-, memory analysis, hotspot keys, eviction policy, big key detection, etc.\n"}},"renderedAt":1782982057311}

Tair Database AI Assistant This Skill focuses on Alibaba Cloud Tair (Redis OSS-Compatible) database intelligent O&M, invoking the get-yao-chi-agent API through the aliyun CLI DAS plugin for diagnostics and analysis. Architecture : → → → Tair Intelligent Diagnostics Supported Capabilities | Capability | Description | |------------|-------------| | Instance List Query | List and filter Tair/Redis instances by region, type, status | | Memory Usage Analysis | Memory consumption breakdown, fragmentation ratio, eviction statistics | | Hotspot Key Detection | Hot key identification, access frequency…