agentsclimarketplace

Alicloud redis

Skill ComeOnOliver/skillshub/skills/agents-infrastructure/alicloud-agent-skills/alicloud-redis

🧠 The right skill, one API call. AI agent skills registry with token-efficient skill resolution. 5,000+ skills from 500+ top repos.

Install
npx -y skills add ComeOnOliver/skillshub --skill alicloud-redis

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

What its author says it does

Copied from the file, not written here

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.

The file declares its own license as Apache-2.0. That is the author’s claim about this one file, and it is not the same thing as the license GitHub reports for the repository, which is listed with the other numbers below.

SKILL.md

7.2 KB, as published. Nobody here has run it

Alibaba Cloud Redis (R-KVStore) Skill

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

Prerequisites

npm install @alicloud/r-kvstore20150101 @alicloud/openapi-core @darabonba/typescript
export ALIBABA_CLOUD_ACCESS_KEY_ID="<your-key-id>"
export ALIBABA_CLOUD_ACCESS_KEY_SECRET="<your-key-secret>"

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

Client Initialization

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)

DomainAPIsKey OperationsReference
Instance Management82createInstance, describeInstances, modifyInstanceSpecreferences/instance.md
Account Management7createAccount, grantAccountPrivilege, resetAccountPasswordreferences/account.md
Backup & Recovery11createBackup, describeBackups, modifyBackupPolicy, restoreInstancereferences/backup.md
Security & Encryption23modifySecurityIps, modifyInstanceSSL, modifyInstanceTDE, modifyAuditLogConfigreferences/security.md
Parameter Management11describeParameters, createParameterGroup, modifyInstanceParameterreferences/parameter.md
Monitoring & Performance8describeHistoryMonitorValues, describeSlowLogRecordsreferences/monitoring.md
Tair Custom Instance12createTairKVCacheCustomInstance, describeTairKVCacheCustomInstancesreferences/tair-custom.md
Tag & Resource5tagResources, untagResources, listTagResourcesreferences/tag-resource.md

Core Patterns

RPC-Style with instanceId

Most APIs require instanceId as the primary identifier:

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

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

Page-Based Pagination

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:

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):

// 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: 'MyP@ssw0rd!', 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: 'MyP@ssw0rd!', vpcId: 'vpc-xxx', vSwitchId: 'vsw-xxx',
}));

Config as JSON String

Instance configuration is passed as a JSON string:

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

Error Handling

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 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 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

Keep looking

Skills are one crate of 328,083. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.