alicloud-redis

Manage Alibaba Cloud Redis (Tair / R-KVStore) using the @alicloud/r-kvstore20150101 TypeScript SDK. Use when working with Redis or Tair instances, accounts, backups, security (whitelist/SSL/TDE/audit), parameters, monitoring, cluster scaling, direct connection, Tair Custom instances, and resource tagging. Covers all 157 APIs of the R-KVStore 20150101 version.

16 stars

Best use case

alicloud-redis is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Manage Alibaba Cloud Redis (Tair / R-KVStore) using the @alicloud/r-kvstore20150101 TypeScript SDK. Use when working with Redis or Tair instances, accounts, backups, security (whitelist/SSL/TDE/audit), parameters, monitoring, cluster scaling, direct connection, Tair Custom instances, and resource tagging. Covers all 157 APIs of the R-KVStore 20150101 version.

Teams using alicloud-redis should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/alicloud-redis/SKILL.md --create-dirs "https://raw.githubusercontent.com/diegosouzapw/awesome-omni-skill/main/skills/development/alicloud-redis/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/alicloud-redis/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How alicloud-redis Compares

Feature / Agentalicloud-redisStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Manage Alibaba Cloud Redis (Tair / R-KVStore) using the @alicloud/r-kvstore20150101 TypeScript SDK. Use when working with Redis or Tair instances, accounts, backups, security (whitelist/SSL/TDE/audit), parameters, monitoring, cluster scaling, direct connection, Tair Custom instances, and resource tagging. Covers all 157 APIs of the R-KVStore 20150101 version.

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# Alibaba Cloud Redis (R-KVStore) Skill

Manage Redis and Tair instances via the `@alicloud/r-kvstore20150101` TypeScript SDK.

## Prerequisites

```bash
npm install @alicloud/r-kvstore20150101 @alicloud/openapi-core @darabonba/typescript
```

```bash
export ALIBABA_CLOUD_ACCESS_KEY_ID="<your-key-id>"
export ALIBABA_CLOUD_ACCESS_KEY_SECRET="<your-key-secret>"
```

See [scripts/setup_client.ts](scripts/setup_client.ts) for a reusable client factory, and [references/quickstart.md](references/quickstart.md) for full setup including endpoints, instance types, architectures, Redis versions, pagination, and async polling.

## Client Initialization

```typescript
import Client from '@alicloud/r-kvstore20150101';
import { Config } from '@alicloud/openapi-core';

const client = new Client(new Config({
  accessKeyId: process.env.ALIBABA_CLOUD_ACCESS_KEY_ID,
  accessKeySecret: process.env.ALIBABA_CLOUD_ACCESS_KEY_SECRET,
  endpoint: 'r-kvstore.aliyuncs.com',
  regionId: 'cn-hangzhou',
}));
```

## API Overview (157 APIs in 8 Domains)

| Domain | APIs | Key Operations | Reference |
|--------|------|----------------|-----------|
| Instance Management | 82 | createInstance, describeInstances, modifyInstanceSpec | [references/instance.md](references/instance.md) |
| Account Management | 7 | createAccount, grantAccountPrivilege, resetAccountPassword | [references/account.md](references/account.md) |
| Backup & Recovery | 11 | createBackup, describeBackups, modifyBackupPolicy, restoreInstance | [references/backup.md](references/backup.md) |
| Security & Encryption | 23 | modifySecurityIps, modifyInstanceSSL, modifyInstanceTDE, modifyAuditLogConfig | [references/security.md](references/security.md) |
| Parameter Management | 11 | describeParameters, createParameterGroup, modifyInstanceParameter | [references/parameter.md](references/parameter.md) |
| Monitoring & Performance | 8 | describeHistoryMonitorValues, describeSlowLogRecords | [references/monitoring.md](references/monitoring.md) |
| Tair Custom Instance | 12 | createTairKVCacheCustomInstance, describeTairKVCacheCustomInstances | [references/tair-custom.md](references/tair-custom.md) |
| Tag & Resource | 5 | tagResources, untagResources, listTagResources | [references/tag-resource.md](references/tag-resource.md) |

## Core Patterns

### RPC-Style with instanceId

Most APIs require `instanceId` as the primary identifier:

```typescript
import * as models from '@alicloud/r-kvstore20150101/dist/models';

const { body } = await client.describeInstanceAttribute(
  new models.DescribeInstanceAttributeRequest({
    instanceId: 'r-bp1xxxxxxxxxxxxx',
  })
);
```

### Page-Based Pagination

```typescript
let pageNumber = 1;
let all: any[] = [];
while (true) {
  const { body } = await client.describeInstances(new models.DescribeInstancesRequest({
    regionId: 'cn-hangzhou', pageSize: 50, pageNumber,
  }));
  all.push(...(body.instances?.KVStoreInstance || []));
  if (all.length >= (body.totalCount || 0)) break;
  pageNumber++;
}
```

### Async Operation Polling

Many operations are async — poll instance status until target state:

```typescript
while (true) {
  const { body } = await client.describeInstanceAttribute(
    new models.DescribeInstanceAttributeRequest({ instanceId })
  );
  const status = body.instances?.DBInstanceAttribute?.[0]?.instanceStatus;
  if (status === 'Normal') break;
  await new Promise(r => setTimeout(r, 5000));
}
```

### Multi-Type Support

R-KVStore supports Redis Community and Tair (DRAM/Persistent Memory/ESSD):

```typescript
// Redis Community
const { body: redis } = await client.createInstance(new models.CreateInstanceRequest({
  regionId: 'cn-hangzhou', instanceType: 'Redis', engineVersion: '7.0',
  instanceClass: 'redis.master.small.default', chargeType: 'PostPaid',
  password: process.env.REDIS_PASSWORD!, vpcId: 'vpc-xxx', vSwitchId: 'vsw-xxx',
}));

// Tair (Enhanced Redis)
const { body: tair } = await client.createTairInstance(new models.CreateTairInstanceRequest({
  regionId: 'cn-hangzhou', instanceType: 'tair_rdb',
  instanceClass: 'tair.rdb.2g', chargeType: 'PostPaid',
  password: process.env.REDIS_PASSWORD!, vpcId: 'vpc-xxx', vSwitchId: 'vsw-xxx',
}));
```

### Config as JSON String

Instance configuration is passed as a JSON string:

```typescript
await client.modifyInstanceConfig(new models.ModifyInstanceConfigRequest({
  instanceId,
  config: JSON.stringify({
    'maxmemory-policy': 'allkeys-lru',
    'timeout': '300',
  }),
}));
```

### Error Handling

```typescript
try {
  await client.createInstance(request);
} catch (err: any) {
  console.error(`Code: ${err.code}, Message: ${err.message}, RequestId: ${err.data?.RequestId}`);
}
```

## Common Workflows

### 1. Create Redis Instance with Account

```
createInstance → waitForNormal → createAccount → modifySecurityIps
```

### 2. Create Tair Cluster

```
createTairInstance → waitForNormal → describeClusterMemberInfo
```

### 3. Backup and Recovery

```
modifyBackupPolicy → createBackup → describeBackups → restoreInstance
```

### 4. Security Hardening

```
modifySecurityIps → modifyInstanceSSL → modifyInstanceTDE → modifyAuditLogConfig
```

### 5. Cluster Scaling

```
describeClusterMemberInfo → addShardingNode / deleteShardingNode
```

### 6. Direct Connection Mode

```
allocateDirectConnection → describeDBInstanceNetInfo → releaseDirectConnection
```

### 7. Parameter Tuning

```
describeParameterTemplates → createParameterGroup → modifyInstanceParameter
```

### 8. Performance Monitoring

```
describeMonitorItems → describeHistoryMonitorValues → describeSlowLogRecords → createCacheAnalysisTask
```

See [references/workflows.md](references/workflows.md) for detailed workflow examples with full code.

## API Reference Quick Index

Load the corresponding reference file for parameter details:

- **Instance CRUD/lifecycle/spec/network/cluster/proxy**: `references/instance.md`
- **Account CRUD/password/privileges**: `references/account.md`
- **Backup/restore/cache analysis**: `references/backup.md`
- **IP whitelist/SSL/TDE/audit/global whitelist**: `references/security.md`
- **Parameters/parameter groups/templates**: `references/parameter.md`
- **Performance monitoring/slow logs/running logs**: `references/monitoring.md`
- **TairKVCache custom instances**: `references/tair-custom.md`
- **Resource tagging**: `references/tag-resource.md`

Each reference file contains per-API documentation with method signatures and parameter tables.

## Code Examples

See [scripts/examples.ts](scripts/examples.ts) for ready-to-use code covering:

- Instance listing, creation, and deletion
- Account management
- Backup creation and listing
- IP whitelist and SSL configuration
- Audit log management
- Performance monitoring and slow log analysis
- Parameter management
- Resource tagging

Related Skills

redis

16
from diegosouzapw/awesome-omni-skill

Redis best practices including data modeling, caching patterns, and performance optimization.

azure-resource-manager-redis-dotnet

16
from diegosouzapw/awesome-omni-skill

Azure Resource Manager SDK for Redis in .NET.

agentuity-cli-cloud-redis-show

16
from diegosouzapw/awesome-omni-skill

Show Redis connection URL. Requires authentication. Use for Agentuity cloud platform operations

bgo

10
from diegosouzapw/awesome-omni-skill

Automates the complete Blender build-go workflow, from building and packaging your extension/add-on to removing old versions, installing, enabling, and launching Blender for quick testing and iteration.

Coding & Development

context7-efficient

16
from diegosouzapw/awesome-omni-skill

Token-efficient library documentation fetcher using Context7 MCP with 86.8% token savings through intelligent shell pipeline filtering. Fetches code examples, API references, and best practices for JavaScript, Python, Go, Rust, and other libraries. Use when users ask about library documentation, need code examples, want API usage patterns, are learning a new framework, need syntax reference, or troubleshooting with library-specific information. Triggers include questions like "Show me React hooks", "How do I use Prisma", "What's the Next.js routing syntax", or any request for library/framework documentation.

context7-docs

16
from diegosouzapw/awesome-omni-skill

Fetch official library docs via Context7 MCP. Use for Tailwind CSS docs (grid, responsive variants), React, Next.js, Vue, MCP, OpenCode, or any npm library. Always use before external web search.

context7-auto-research

16
from diegosouzapw/awesome-omni-skill

Automatically fetch latest library/framework documentation for Claude Code via Context7 API

context-optimization

16
from diegosouzapw/awesome-omni-skill

Apply compaction, masking, and caching strategies

context-memory

16
from diegosouzapw/awesome-omni-skill

Advanced context and memory management system for AI agents. Provides persistent memory across sessions through daily logs (memory/YYYY-MM-DD.md), long-term curated memory (MEMORY.md), conversation archives with semantic search, and automatic behavioral learning from user satisfaction tracking. Use when you need to: (1) Remember information across sessions, (2) Archive conversations before context loss, (3) Search past discussions, (4) Track and learn from user satisfaction patterns, (5) Maintain session continuity, (6) Implement proactive memory maintenance. Includes conversation-archiver.py and satisfaction-tracker.py scripts, session startup routines, and periodic reflection workflows.

context-engineering

16
from diegosouzapw/awesome-omni-skill

Use when starting a new session, when agent output quality degrades, when switching between tasks, or when you need to configure rules files and context for a project.

context-driven-development

16
from diegosouzapw/awesome-omni-skill

Use this skill when working with Conductor's context-driven development methodology, managing project context artifacts, or understanding the relationship between product.md, tech-stack.md, and...

context-detector

16
from diegosouzapw/awesome-omni-skill

Detect project language, framework, and existing conventions. Use when creating workflows to adapt generated artifacts to match project patterns.