Agent Skills
› opskat/opskat
› redis
redis
GitHub提供 Redis 资产执行技能,支持直接运行 Redis 命令及指定数据库范围。强调使用 scope 参数而非 SELECT 以避免连接池冲突,并自动处理凭证。
Trigger Scenarios
需要执行 Redis 查询或写入操作
需指定 Redis 数据库编号进行数据交互
Install
npx skills add opskat/opskat --skill redis -g -y
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 mykeyHGETALL user:1SET key value EX 3600SCAN 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 | yes | No server-side default — pass 6379 explicitly |
username |
string | yes | Required by validation even for legacy single-password Redis (no ACL); pass "default", Redis's built-in default user |
password |
string | no | Stored encrypted; never echoed back |
redis_db |
number | no | Default DB index (0-15) |
ssh_asset_id |
number | no | SSH asset to tunnel through; 0 detaches |
Version History
-
d6c7a6e
Current 2026-08-16 07:29
修正文档:明确 SELECT 命令在连接池模式下会被直接拒绝,而非无效或导致串库风险。
- aeb4bc3 2026-07-24 16:28


