Official agent skill

Add Redis Command to go-redis

by redis in redis/go-redis

Walks through adding a new Redis or Redis module command to the go-redis client, from fetching the spec and docs to the type, interface wiring, parsing and tests.

OfficialBSD-2-ClauseAuto-check passedDevelopment

Install Add Redis Command to go-redis

skills CLI
$ npx skills add redis/go-redis --skill add-command -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install redis/go-redis add-command --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/redis/go-redis.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/add-command .claude/skills/add-command && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
add-command
GitHub stars
22k
Token cost
~1.4k tokens
SKILL.md length
644 words
Files
4 (incl. references)
Skills in repo
5
Repo updated
First seen
Licence
BSD-2-Clause

At a glance

Walks through adding a new Redis or Redis module command to the go-redis client, from fetching the spec and docs to the type, interface wiring, parsing and tests.

  • Works in 3 steps: Spec file argument — if the user passed… → PR URL argument — if the user passed a… → No argument — fetch the machine-readable…
  • Adding support for a newly released Redis command to go-redis
  • SKILL.md covers Step 0 — Get the command spec…, Decide before you start, Reference files and Pitfalls (full list in…
  • Reaches raw.githubusercontent.com and redis.io

What it does

Contributors adding a command to the root redis package of go-redis get a router here. Step 0 comes before any Go code: fetch the command's machine-readable JSON spec from the redis/redis repository for arguments, key positions and reply schema, and the prose docs on redis.io for what the reply really looks like, including the separate RESP2 and RESP3 reply sections.

A 404 on the spec means a module command, such as RediSearch, TimeSeries, VectorSet or Bloom, whose spec lives in the module's own repository, so the agent switches there or asks you for a spec or PR rather than retrying. You can also hand it a spec file or a redis/redis pull request URL. The skill then covers the Cmder type, Cmdable interface wiring, RESP parsing, tests and the custom vet rule that enforces SetVal.

Detailed guidance sits in three reference files, for core command patterns, cluster routing and module commands, and the agent is told to open only the one that matches the area being changed.

When your agent uses it

  • Adding support for a newly released Redis command to go-redis
  • Wiring a RediSearch or TimeSeries subcommand into the client
  • Implementing a command that arrives as a redis/redis pull request
  • Making a new command route correctly in cluster mode

Example prompts

  • “Add support for the FT.SEARCH command in go-redis, starting from its spec and docs.”
  • “Use the spec in ./specs/client-info.json to add the CLIENT INFO command to go-redis.”
  • “Make sure the new command's reply parsing handles both RESP2 and RESP3.”

Requirements

  • A checkout of the go-redis repository
  • Network access to GitHub and redis.io for the command spec and docs
  • Pre-approved tools (allowed-tools): WebFetch

Workflow steps

3 steps, taken from the first numbered list in SKILL.md.

  1. Spec file argument — if the user passed a path to a spec/JSON file, read it.
  2. PR URL argument — if the user passed a github.com/redis/redis PR (or other repo) URL, fetch the diff and read the command definition +…
  3. No argument — fetch the machine-readable spec from redis/redis

What it can do on your machine

Read from SKILL.md and the folder at commit 6f2b263. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves these tools, so the agent can use them without asking each time:

    • WebFetch

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Hosts in commands or code, which the agent is likely to contact:

    • raw.githubusercontent.com
    • redis.io

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Add Redis Command to go-redis loads about 1.4k tokens when it runs, and up to ~4k if it reads all its reference files. Until then it costs about 69 tokens; SKILL.md has 644 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~69
When it runs · the whole SKILL.md, loaded when a task matches
~1.4k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~4k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from redis/go-redis at commit 6f2b263, republished under its BSD-2-Clause licence (© redis). 644 words, ~1,380 tokens.

Download SKILL.mdSave it as .claude/skills/add-command/SKILL.md (or your agent's skills folder). This skill also uses 3 other files; get the full folder from GitHub.
name
add-command
description
Use when adding a new Redis command (or RediSearch / TimeSeries / VectorSet / module subcommand) to go-redis — covers fetching the command spec and docs, the Cmder type, Cmdable interface wiring, RESP parsing, tests, and the custom-vet rule that enforces SetVal.
allowed-tools
WebFetch

Adding a new Redis command

Router for adding a Redis command to the root redis package. Read the reference file for the area you're touching — don't load all of them.

Step 0 — Get the command spec AND docs FIRST

Before writing any Go, know the exact command shape (arguments, optional flags, reply structure, since-version, key positions) and its documented semantics (what each reply field means, RESP2-vs-RESP3 differences, examples). Fetch two sources — the machine-readable spec and the prose docs. They cover different gaps: the spec nails arguments and key positions, the docs nail what the reply actually looks like.

A. Machine-readable spec (arguments, key specs, reply schema)

Resolve the spec in this order:

  1. Spec file argument — if the user passed a path to a spec/JSON file, read it.
  2. PR URL argument — if the user passed a github.com/redis/redis PR (or other repo) URL, fetch the diff and read the command definition + src/commands/<cmd>.json it adds.
  3. No argument — fetch the machine-readable spec from redis/redis:
    https://raw.githubusercontent.com/redis/redis/unstable/src/commands/<command>.json
    Container subcommands use <container>-<sub>.json (e.g. client-info.json). A 404 means it's a module command (RediSearch, TimeSeries, VectorSet, Bloom) — those specs live in the module's own repo, not redis/redis. Switch to the module repo (see references/module-commands.md §1) or ask the user for the spec/PR. Don't retry the redis/redis URL.
B. Prose docs (semantics, return value, RESP2/RESP3 reply, examples)

The JSON reply_schema is often thin or missing; the docs spell out what the reply actually is — including separate RESP2 Reply and RESP3 Reply sections, which decide your readReply and any module RESP2-vs-RESP3 handling. Fetch the command's doc page:

https://redis.io/docs/latest/commands/<command>/

Raw markdown source (alternative, good for diffing or when the rendered page is noisy): https://raw.githubusercontent.com/redis/redis-doc/master/commands/<command>.md. Module commands (RediSearch, TimeSeries, …) are documented under their own path on redis.io (e.g. /docs/latest/commands/ft.search/) or in the module repo — see references/module-commands.md.

Read the Return value / RESP2 Reply / RESP3 Reply sections plus the examples, and reconcile them against the JSON reply_schema. When the two disagree, the docs' reply description (and a quick redis-cli check) win.

Map both sources to the implementation
SourceDrives
spec argumentsmethod signature, args-slice build order, optional FooArgs struct
spec reply_schema + docs Return valuethe readReply parser and Cmder result type
docs RESP2 Reply / RESP3 ReplyRESP2-vs-RESP3 branching in readReply (see references/module-commands.md)
spec since + docs @historySkipBeforeRedisVersion(...) in the integration test, doc comment
spec key_specskey-position maps in command.go; cluster routing
spec command_flags (e.g. READONLY, no key)keyless / fan-out handling, cluster routing
docs examplesintegration-test cases and expected values

If you can't get either source, STOP and ask the user — guessing the reply shape produces a broken readReply.

Show full SKILL.md (220 more words)Show less

Decide before you start

  1. Which *_commands.go file? — pick the existing file matching the data type (string_commands.go, hash_commands.go, search_commands.go, …). Only create a new file for a genuinely new category. New files need a matching XxxCmdable interface embedded in Cmdable (commands.go).
  2. Reuse an existing Cmder, or define a new one? — simple replies (int, string, bool, []string, map) reuse *IntCmd, *StringCmd, *BoolCmd, *StringSliceCmd, *MapStringStringCmd, … Define a new Cmder only for a structured reply that no existing type fits.
  3. Foo vs FooWithArgs? — for commands with optional flags, expose a positional Foo(...) for the common path plus FooWithArgs(ctx, key, *FooArgs) for the full surface.

Reference files

Read thisWhen
references/core-command-pattern.mdAlways — the 7-step Go pattern (interface method, Cmder type, RESP parsing, tests, vet, fmt). Worked example: LCS.
references/module-commands.mdAdding a RediSearch / TimeSeries / VectorSet / Bloom subcommand — naming, RESP2-vs-RESP3 shape differences, where the Cmd type lives.
references/cluster-routing-wiring.mdCommand is keyless, fans out, multi-key, or aggregates across shards.

When several apply, read in order: core → module → cluster.

Pitfalls (full list in core-command-pattern.md)

  • Forgetting to embed the new XxxCmdable interface in Cmdable — compiles on *Client, silently unreachable via UniversalClient.
  • Forgetting Clone() — pipelines reuse Cmders; shared val causes cross-execution bugs.
  • Skipping SetVal because "nothing calls it" — hooks do, and the setval custom-vet check fails the build.
  • Using time.Duration directly in args — server gets nanoseconds. Convert per spec.

© redis, BSD-2-Clause. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 3 other files (references) in .claude/skills/add-command of redis/go-redis.

  • SKILL.md
  • references/cluster-routing-wiring.md
  • references/core-command-pattern.md
  • references/module-commands.md

Open the folder on GitHubat commit 6f2b263

Compare with similar skills

Add Redis Command to go-redis next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Add Redis Command to go-redis compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Add Redis Command to go-redis this skillredis/go-redis22k—~1.4kAutomated safety check: PassBSD-2-Clause
Tgf Server Devthkhxm/tgf128—~1.3kAutomated safety check: NotesMIT
Devinggo Project Inithuagelong/devinggo122—~1.1kAutomated safety check: NotesApache-2.0
Add Garnet RESP Commandmicrosoft/garnet12k—~9.7kAutomated safety check: PassMIT
Docs Syncredis/node-redis18k—~1.1kAutomated safety check: PassMIT
Maintainer Reviewredis/node-redis18k—~5.5kAutomated safety check: PassMIT

Similar skills

  • Tgf Server Dev

    thkhxm/tgf

    基于 tgf v2(github.com/thkhxm/tgf/v2)用确定性的 tgfctl 工作流创建、验证和维护 Go 游戏服务器项目。

    128 GitHub stars~1.3k tokensUpdated 2 mo ago
    DatabasesAuto-check: notes
  • Devinggo Project Init

    huagelong/devinggo

    DevingGo 项目初始化与本地开发环境配置流程。用于用户询问项目初始化、开发环境搭建、依赖检查、配置文件生成、数据库迁移、本地启动后端/前端/Worker 服务、或希望 AI 大模型一步步把 DevingGo 跑起来时。适用于基于本项目 CLI、Makefile、manifest/config、hack/config、admin-ui 前端工作区的初始化排障与启动验证。

    122 GitHub stars~1.1k tokensUpdated 3 mo ago
    DatabasesAuto-check: notes
  • Add Garnet RESP Command

    microsoft/garnet

    Official

    Step-by-step guide for adding a new built-in RESP command to Garnet, from the command enum and parser to storage callbacks, command metadata JSON and tests.

    12k GitHub stars~9.7k tokensUpdated today
    DevelopmentAuto-check passed
  • Docs Sync

    redis/node-redis

    Official

    Analyze master branch implementation and configuration to find missing, incorrect, or outdated documentation in docs/, README.md, and per-package READMEs.

    18k GitHub stars~1.1k tokensUpdated yesterday
    DevelopmentAuto-check passed
  • Maintainer Review

    redis/node-redis

    Official

    Review a GitHub issue or pull request URL as a node-redis maintainer, with a staged assessment of whether the claim is real, practically important, already solvable with supported functionality…

    18k GitHub stars~5.5k tokensUpdated yesterday
    DevelopmentAuto-check passed
  • Golang Architecture

    HoangNguyen0403/agent-skills-standard

    Structure Go code with package-first boundaries, cmd/ and internal/, and explicit dependency wiring.

    570 GitHub stars~577 tokensUpdated today
    Backend & APIsAuto-check passed

More from redis/go-redis

  • Official

    Prepares a go-redis release locally: picks the next semver, gathers merged PRs, writes the RELEASE-NOTES entry and bumps versions, without publishing.

    22k GitHub stars~1.1k tokensUpdated yesterday
    Auto-check passed
  • Official

    Explains how to run go-redis tests: the Docker Compose stack, make targets, focusing a single Ginkgo spec, the e2e suite and the version environment variables.

    22k GitHub stars~786 tokensUpdated yesterday
    Auto-check passed
  • Official

    Keeps every reference to the redislabs client-libs-test image tag in sync across the Makefile, compose file, GitHub workflows and docs when a Redis test version changes.

    22k GitHub stars~1.5k tokensUpdated yesterday
    Auto-check passed
  • Official

    Sets the commit message and PR conventions for the go-redis repository: Conventional Commits, the repo's scope names, breaking-change syntax and no AI trailer.

    22k GitHub stars~429 tokensUpdated yesterday
    Auto-check passed

Works with

Questions about Add Redis Command to go-redis

What does Add Redis Command to go-redis do?

Walks through adding a new Redis or Redis module command to the go-redis client, from fetching the spec and docs to the type, interface wiring, parsing and tests. Contributors adding a command to the root redis package of go-redis get a router here.io for what the reply really looks like, including the separate RESP2 and RESP3 reply sections.

When should I use Add Redis Command to go-redis?

Add Redis Command to go-redis fits situations like: adding support for a newly released Redis command to go-redis; wiring a RediSearch or TimeSeries subcommand into the client; implementing a command that arrives as a redis/redis pull request; making a new command route correctly in cluster mode.

How do I install Add Redis Command to go-redis in Claude Code?

Run `npx skills add redis/go-redis --skill add-command -a claude-code`. Or copy the skill folder (.claude/skills/add-command in redis/go-redis) into .claude/skills/add-command in your project. Claude Code loads it when a task matches its description.

How do I install Add Redis Command to go-redis in Codex?

Run `npx skills add redis/go-redis --skill add-command -a codex`. Or copy the skill folder (.claude/skills/add-command in redis/go-redis) into .agents/skills/add-command in your project. Codex loads it when a task matches its description.

Can I use Add Redis Command to go-redis in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add redis/go-redis --skill add-command -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/add-command, .gemini/skills/add-command, .github/skills/add-command and .opencode/skills/add-command in your project.

What does Add Redis Command to go-redis need to run?

SKILL.md names no scripts, command-line tools or credentials: Add Redis Command to go-redis is instructions for the agent only. Our summary lists: A checkout of the go-redis repository; Network access to GitHub and redis.io for the command spec and docs. Its frontmatter pre-approves these tools: WebFetch.

Does Add Redis Command to go-redis access the network?

SKILL.md names 2 domains. In commands or code: raw.githubusercontent.com and redis.io; the agent is likely to contact these when it follows the instructions. This is read from the text; nothing was executed.

Is Add Redis Command to go-redis safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Add Redis Command to go-redis use?

Add Redis Command to go-redis is published under the BSD-2-Clause licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Add Redis Command to go-redis use?

About 1.4k tokens (SKILL.md is roughly 5.5k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 2.6k tokens, read only when the agent opens those files.

What are the alternatives to Add Redis Command to go-redis?

Skills that share tags, products or a category with Add Redis Command to go-redis: Tgf Server Dev (thkhxm/tgf, 128 stars), Devinggo Project Init (huagelong/devinggo, 122 stars), Add Garnet RESP Command (microsoft/garnet, 12k stars) and Docs Sync (redis/node-redis, 18k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Add Redis Command to go-redis?

redis (a GitHub organization, an official publisher) maintains it in redis/go-redis, which has 22,257 GitHub stars. The repository holds 5 skills in this directory. The repository was last updated on October 6, 2026.

Source: redis/go-redis on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.