Agent Skillsopskat/opskat › redis

redis

GitHub

提供 Redis 资产执行命令的能力,支持通过 scope 参数指定数据库号。强调禁止使用 SELECT 命令以避免连接池混淆,并说明凭据自动解析及配置字段要求。

internal/ai/skills/redis/SKILL.md opskat/opskat

Trigger Scenarios

用户需要执行 Redis 查询或写入操作 用户询问如何正确切换 Redis 数据库

Install

npx skills add opskat/opskat --skill redis -g -y
More Options

Non-standard path

npx skills add https://github.com/opskat/opskat/tree/main/internal/ai/skills/redis -g -y

Use without installing

npx skills use opskat/opskat@redis

指定 Agent (Claude Code)

npx skills add opskat/opskat --skill redis -a claude-code -g -y

安装 repo 全部 skill

npx skills add opskat/opskat --all -g -y

预览 repo 内 skill

npx skills add opskat/opskat --list

SKILL.md

Frontmatter
{
    "name": "redis",
    "description": "Run Redis commands against a Redis asset via exec. Covers command syntax, the db scope parameter, and why SELECT must not be used."
}

Redis assets

Command syntax

Pass the Redis command verbatim as command:

  • GET mykey
  • HGETALL user:1
  • SET key value EX 3600
  • SCAN 0 MATCH prefix:* COUNT 100

Scope

Use the scope parameter to pick the database number (0-15), e.g. scope: "3".

Do NOT send SELECT. It is rejected outright before execution — connections are pooled, so a per-connection database switch would corrupt another caller's selection. scope is the only correct way to switch databases.

Notes

  • Results are returned as JSON.
  • Credentials are resolved automatically from the app's encrypted store; never ask the user for a password.

Asset config (for put_asset)

field type required notes
host string yes
port number no Defaults to 6379
username string yes Use "default" for Redis's built-in default user
password string no Write-only. Encrypted in the asset; does not create a credential
credential_id number no Existing managed password credential ID
redis_db number no Default DB index (0-15)
ssh_asset_id number no SSH asset to tunnel through; 0 detaches

password and credential_id are mutually exclusive. Plaintext is never returned, is encrypted in the asset, and never creates a managed credential.

Version History

  • b159e91 Current 2026-08-19 20:21

    更新端口默认值说明为显式传递;username 字段增加对无 ACL 旧版 Redis 的说明;密码存储描述简化。

  • d6c7a6e 2026-08-16 07:29

    修正文档:明确 SELECT 命令在连接池模式下会被直接拒绝,而非无效或导致串库风险。

  • aeb4bc3 2026-07-24 16:28

Same Skill Collection

internal/ai/skills/database/SKILL.md
internal/ai/skills/etcd/SKILL.md
internal/ai/skills/k8s/SKILL.md
internal/ai/skills/kafka/SKILL.md
internal/ai/skills/local/SKILL.md
internal/ai/skills/mongodb/SKILL.md
internal/ai/skills/oss/SKILL.md
internal/ai/skills/rdp/SKILL.md
internal/ai/skills/serial/SKILL.md
internal/ai/skills/ssh/SKILL.md
internal/ai/skills/vnc/SKILL.md
plugin/opsctl/skills/opsctl/SKILL.md

Metadata

Files
0
Version
b159e91
Hash
4fd0e53e
Indexed
2026-07-24 16:28

- 위키
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-08-20 06:40
浙ICP备14020137号-1 $방문자$