← 返回 Skills 市场
sdk-team

Alibabacloud Tair Ai Assistant

作者 alibabacloud-skills-team · GitHub ↗ · v0.0.1 · MIT-0
cross-platform ✓ 安全检测通过
81
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install alibabacloud-tair-ai-assistant
功能描述
Alibaba Cloud Tair (Redis OSS-Compatible) Database AI Assistant. For Tair/Redis instance management, performance diagnostics, memory analysis, hotspot key de...
使用说明 (SKILL.md)

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: Aliyun CLIDAS Plugin (Signature V3)get-yao-chi-agent API → 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 analysis, cache optimization
Big Key Analysis Large key detection, memory distribution analysis, optimization suggestions
Latency Diagnostics Command latency analysis, slow command detection, network latency troubleshooting
Slow Log Analysis Slow command log query, high-latency operation identification
Parameter Tuning Instance parameter explanation, configuration suggestions, performance impact analysis
Connection Session Analysis Connection count monitoring, client session troubleshooting, connection pool optimization
Backup Status Check Backup completion verification, retention policy, recovery point in time
Performance Monitoring QPS/TPS/hit rate/bandwidth and other core metrics analysis
Expiring Instance Query Subscription instance expiration reminder
Security Configuration Audit Whitelist, SSL/TLS, password policy, security audit
Storage Optimization Data structure optimization, TTL strategy, memory efficiency improvement
Proxy Diagnostics Proxy layer performance analysis, connection routing, bandwidth bottleneck detection

Installation

Pre-check: Aliyun CLI >= 3.3.1 required Run aliyun version to verify >= 3.3.1. If not installed or version too low, see references/cli-installation-guide.md for installation instructions. Then [MUST] run aliyun configure set --auto-plugin-install true to enable automatic plugin installation.

# Install aliyun CLI
curl -fsSL https://aliyuncli.alicdn.com/install.sh | bash
aliyun version  # Verify >= 3.3.1

# Enable automatic plugin installation
aliyun configure set --auto-plugin-install true

# Install DAS plugin (get-yao-chi-agent requires plugin for Signature V3 support)
aliyun plugin install --names aliyun-cli-das

# Update all installed plugins to latest version
aliyun plugin update

# Install jq (for JSON response parsing)
# macOS:
brew install jq
# Ubuntu/Debian:
# sudo apt-get install jq

Parameter Confirmation

IMPORTANT: Parameter Confirmation — 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.

Parameter Required/Optional Description Default
query Required Natural language query content (including region, instance info) -
--session-id Optional Session ID for multi-turn conversation -
--profile Optional aliyun CLI profile name default

Authentication

This Skill relies on the aliyun CLI default credential chain for authentication — no explicit AK/SK handling is required in the Skill workflow.

The CLI automatically resolves credentials in the following priority order:

  1. --profile flag on the command line
  2. ALIBABA_CLOUD_PROFILE environment variable
  3. ALIBABA_CLOUD_ACCESS_KEY_ID / ALIBABA_CLOUD_ACCESS_KEY_SECRET environment variables
  4. Configuration file ~/.aliyun/config.json (current profile)
  5. ECS Instance RAM Role (if running on ECS)

For credential setup and configuration modes (OAuth, AK, StsToken, RamRoleArn, EcsRamRole, etc.), see references/cli-installation-guide.md.

RAM Policy

See references/ram-policies.md

Core Workflow

All intelligent O&M operations are invoked through scripts/call_yaochi_agent.sh, which wraps aliyun das get-yao-chi-agent (DAS plugin kebab-case command, supports Signature V3) with streaming response parsing.

Before executing any CLI command, AI-Mode must be enabled; after workflow ends, it must be disabled:

# [MUST] Enable AI-Mode before executing CLI commands
aliyun configure ai-mode enable
aliyun configure ai-mode set-user-agent --user-agent "AlibabaCloud-Agent-Skills/alibabacloud-tair-ai-assistant"
# Instance management
bash $SKILL_DIR/scripts/call_yaochi_agent.sh "List Tair instances in Hangzhou region"
bash $SKILL_DIR/scripts/call_yaochi_agent.sh "Show detailed configuration of instance r-xxx"

# Performance diagnostics
bash $SKILL_DIR/scripts/call_yaochi_agent.sh "Analyze instance r-xxx performance in the last hour"
bash $SKILL_DIR/scripts/call_yaochi_agent.sh "Show slow commands of instance r-xxx"

# Memory analysis
bash $SKILL_DIR/scripts/call_yaochi_agent.sh "Analyze memory usage of instance r-xxx"
bash $SKILL_DIR/scripts/call_yaochi_agent.sh "Detect big keys in instance r-xxx"

# Hotspot key detection
bash $SKILL_DIR/scripts/call_yaochi_agent.sh "Find hotspot keys in instance r-xxx"

# Parameter tuning
bash $SKILL_DIR/scripts/call_yaochi_agent.sh "How to tune maxmemory-policy for instance r-xxx"
bash $SKILL_DIR/scripts/call_yaochi_agent.sh "Explain hz parameter"

# Connection and session
bash $SKILL_DIR/scripts/call_yaochi_agent.sh "How to troubleshoot high connection count in instance r-xxx"

# Backup recovery
bash $SKILL_DIR/scripts/call_yaochi_agent.sh "Show backup status of instance r-xxx"

# Multi-turn conversation (use session ID from previous response)
bash $SKILL_DIR/scripts/call_yaochi_agent.sh "Continue analysis" --session-id "\x3Csession-id>"

# Specify profile
bash $SKILL_DIR/scripts/call_yaochi_agent.sh "List instances" --profile myprofile

# Read from stdin
echo "List instances" | bash $SKILL_DIR/scripts/call_yaochi_agent.sh -
# [MUST] Disable AI-Mode after workflow ends
aliyun configure ai-mode disable

Example Questions

Scenario Example Question
Instance Management List Tair instances in Beijing region
Performance Diagnostics How to troubleshoot high CPU usage in instance r-xxx
Slow Log Analysis Show slow commands in instance r-xxx in the last hour
Memory Analysis Analyze memory fragmentation of instance r-xxx
Big Key Detection Detect big keys in instance r-xxx and suggest optimization
Hotspot Key Find hotspot keys in instance r-xxx
Parameter Tuning What does maxmemory-policy parameter mean
Master-Replica How to handle high replication delay in instance r-xxx
Backup Recovery When was the latest backup of instance r-xxx
Connection Troubleshooting Instance r-xxx connections are full
Security Audit Check security configuration of instance r-xxx

Success Verification

See references/verification-method.md

Cleanup

This Skill focuses on query and diagnostics capabilities, does not create any resources, no cleanup required.

The following operations are NOT within the scope of this Skill:

  • Create/delete Tair instances
  • Change instance specifications
  • Purchase/renew instances

API and Command Tables

See references/related-apis.md

Best Practices

  1. Instance ID Format: Tair/Redis instance IDs typically start with r-, include the full instance ID in queries
  2. Region Specification: Explicitly specify region in natural language queries (e.g., "Hangzhou region", "Beijing region") to improve query accuracy
  3. Multi-turn Conversation: Use --session-id for complex diagnostic scenarios to maintain context continuity
  4. Concurrency Limit: Maximum 2 concurrent sessions per account, avoid initiating multiple parallel calls
  5. High-risk Operations: For operations involving parameter changes, master-replica switchover, always remind users to verify in test environment first
  6. Throttling Handling: If encountering Throttling.UserConcurrentLimit error, wait for previous query to complete and retry
  7. Credential Security: Use aliyun configure to manage credentials, never hardcode AK/SK in scripts

Reference Links

Reference Description
references/cli-installation-guide.md Aliyun CLI installation and configuration guide
references/related-apis.md Related API and CLI command list
references/ram-policies.md RAM permission policy list
references/verification-method.md Success verification methods
references/acceptance-criteria.md Acceptance criteria
安全使用建议
This skill is an instruction-only wrapper around the official aliyun CLI DAS APIs and appears coherent with its stated purpose. Before installing or running it: - Do not run remote install scripts (curl | bash) unless you trust the source; if you do, review the installer first. - Provide credentials with least privilege (create a RAM user and attach only the das:GetYaoChiAgent / das:GetDasAgentSSE actions) or use ECS RAM roles / STS tokens rather than long-lived root keys. - Note the skill uses the aliyun CLI credential chain (env vars, ~/.aliyun/config.json, or CLI profile) even though metadata lists no required env vars; check which profile or credentials the CLI will pick up to avoid accidental use of high-privilege keys. - Enabling aliyun "ai-mode" changes local CLI config; review and revert if undesired. - If you need higher assurance, run the script in an isolated environment (separate profile, container, or CI runner) and inspect network calls / CLI behavior during a test run.
功能分析
Type: OpenClaw Skill Name: alibabacloud-tair-ai-assistant Version: 0.0.1 The skill is a legitimate AI assistant for Alibaba Cloud Tair (Redis) diagnostics. It utilizes the official aliyun CLI and the DAS (Database Autonomy Service) plugin to perform instance analysis and troubleshooting. The core execution script, `scripts/call_yaochi_agent.sh`, is well-structured with input validation for query length and session ID formats, and it executes CLI commands safely using array-based arguments to prevent shell injection. All network communication is directed to official Alibaba Cloud endpoints (e.g., das.cn-shanghai.aliyuncs.com), and the skill relies on the user's pre-configured CLI credentials without attempting to exfiltrate them.
能力标签
cryptorequires-walletcan-make-purchasesrequires-oauth-tokenrequires-sensitive-credentials
能力评估
Purpose & Capability
The name/description (Tair/Redis diagnostics) lines up with the implementation: a bash wrapper that invokes aliyun das GetYaoChiAgent/GetDasAgentSSE. The skill legitimately needs access to Alibaba Cloud credentials via the aliyun CLI credential chain. One minor note: the skill metadata declares no required env vars, yet the documentation and script rely on the CLI credential chain (environment vars, ~/.aliyun/config.json, or ECS RAM role). This is coherent but not explicitly declared in metadata.
Instruction Scope
Runtime instructions and the included script are narrowly scoped to invoking the aliyun CLI DAS plugin, parsing streaming SSE/JSON responses, and printing session IDs. The SKILL.md rightly instructs confirming user parameters before execution. Note: it instructs the user to enable "ai-mode" in the aliyun CLI and to set a custom user-agent (command-line config changes to the local aliyun CLI), which is an operational side-effect the user should be aware of. The instructions do reference (and show examples of) environment variables and config files used by the CLI for credentials.
Install Mechanism
There is no formal install spec; this is mostly instruction-only plus a shell script. The documentation suggests installing the aliyun CLI via a curl|bash one-liner pointing at aliyuncli.alicdn.com (official vendor domain), and installing the DAS plugin via aliyun plugin install. Pulling installers directly from the vendor domain is common but always carries the usual risk of running remote install scripts — verify the domain and contents before piping to shell.
Credentials
The skill does not declare required env vars in metadata, but it clearly depends on the aliyun CLI credential chain (ALIBABA_CLOUD_ACCESS_KEY_ID/SECRET, ALIBABA_CLOUD_PROFILE, ~/.aliyun/config.json, or ECS RAM role). That dependency is proportional for a cloud management/diagnostics skill, but you should ensure credentials used grant least privilege (ram:GetYaoChiAgent / das:GetDasAgentSSE as recommended) and are not root-level keys. The references explicitly discourage hardcoding AK/SK in scripts (correct).
Persistence & Privilege
The skill is not marked always:true and does not request persistent platform privileges. It only writes/reads local aliyun CLI configuration when you run the CLI commands (standard behavior). It does ask you to enable ai-mode in the local aliyun CLI, which modifies the CLI configuration but is limited to that tool and not the skill platform.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install alibabacloud-tair-ai-assistant
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /alibabacloud-tair-ai-assistant 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v0.0.1
Initial release of Alibaba Cloud Tair (Redis OSS-Compatible) Database AI Assistant. - Provides intelligent O&M, diagnostics, and instance analysis for Alibaba Cloud Tair/Redis. - Supports instance listing, memory analysis, hotspot/big key detection, latency diagnostics, parameter tuning, connection session analysis, backup status, and security audits. - Integrates with aliyun CLI and DAS plugin for seamless operation using get-yao-chi-agent API. - Enforces strict user parameter confirmation before command execution. - Requires AI-Mode activation in CLI prior to operations and deactivation after completion.
元数据
Slug alibabacloud-tair-ai-assistant
版本 0.0.1
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 1
常见问题

Alibabacloud Tair Ai Assistant 是什么?

Alibaba Cloud Tair (Redis OSS-Compatible) Database AI Assistant. For Tair/Redis instance management, performance diagnostics, memory analysis, hotspot key de... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 81 次。

如何安装 Alibabacloud Tair Ai Assistant?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install alibabacloud-tair-ai-assistant」即可一键安装,无需额外配置。

Alibabacloud Tair Ai Assistant 是免费的吗?

是的,Alibabacloud Tair Ai Assistant 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Alibabacloud Tair Ai Assistant 支持哪些平台?

Alibabacloud Tair Ai Assistant 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Alibabacloud Tair Ai Assistant?

由 alibabacloud-skills-team(@sdk-team)开发并维护,当前版本 v0.0.1。

💬 留言讨论