mcpbeat

Add New Command

redis/add-new-command

>- Adds support for a new Redis command to the gem from a specification. Triggers on requests like "add support for the TS.BGET command" or via /add-new-command <COMMAND|path>. Resolves the spec from command_specs/, falling back to official redis.io docs. See .claude/skills/add-new-command/examples/command-specification-template.md.

2k tokens
context cost
the whole folder, loaded on every use
3
files
ships runnable scripts
0
copies elsewhere
how many repositories repackaged it
4001
stars on the repo
on the repository, not the skill itself

Install

one command, takes just this skill from the repository
npx skills add https://github.com/redis/redis-rb --skill add-new-command

What comes with it

3 461 bytes besides the instruction
examples/command-specification-template.md
scripts/resolve_spec.sh

What it tells the agent to use

found in the instruction text
Bash runs shell commands — read the instruction before connecting
WebFetch fetches pages from the network

The instruction itself

16 sections, as written by the author

Add new Redis command support

$ARGUMENTS is either a Redis command name (e.g. TS.BGET, JSON.GET) or a path to a

specification file. Before doing anything else, resolve it to a filled specification using Step 0.

Step 0 — Resolve the specification

Run bash .claude/skills/add-new-command/scripts/resolve_spec.sh "$ARGUMENTS" from the repo root. Branch on its RESOLUTION: line.

The only way into Step 1 is a RESOLUTION: ready from the resolver — never enter it on your own judgment that a spec looks filled.

  • ready — filled spec is in the output. Go to Step 1.
  • incomplete — spec exists but still has the $COMMAND_NAME placeholder. Ask the user to fill in the template, show the RERUN_HINT to resume, then STOP.
  • missing — WebFetch REDIS_IO_URL.
  • Found → write a spec to TARGET_SPEC_FILE using .claude/skills/add-new-command/examples/command-specification-template.md structure, then use the AskUserQuestion tool to present a "Proceed / Stop" choice. On Proceed → re-run the resolver on TARGET_SPEC_FILE and branch on its RESOLUTION: again — only ready may enter Step 1; incomplete means the written spec is still a stub, so follow the incomplete branch. On Stop → end (the saved spec can be edited and re-run later).
  • Not found → ask the user to either give a spec path, or have you copy .claude/skills/add-new-command/examples/command-specification-template.md verbatim to TARGET_SPEC_FILE (keep the $COMMAND_NAME marker so the resolver flags it incomplete until filled) for them to fill; then show the RERUN_HINT and STOP.
  • path_not_found — the argument looks like a file path but no file exists at SPEC_FILE. Tell the user, ask for a corrected path (or a command name to resolve instead), then STOP. Do not guess a command name from the path.
  • no_argument — ask for a command name or spec path, then STOP.

Execution Instructions

1. Preparations

  • Go through the guide specs/adding-commands.md

2. Read and Understand

  • Read the ENTIRE specification carefully
  • Go through Command Description and identify command type (string, list, set, etc.)
  • Go through the Command API:
  • Identify required and optional arguments
  • Identify how to match Redis command arguments type to Ruby types
  • Identify return value and possible response types
  • Check relevant Redis-Cli examples, if provided
  • Review the Test Plan

3. Execute Tasks in Order

a. Navigate to the task
  • Identify the files and action required
  • Read existing related files if modifying
b. Implement the command
  • Identify the command API surface object you need to work with.
  • Identify required and optional arguments and their matching types.
  • Add command implementation following specs/adding-commands.md
  • Ensure doc string documents are added
c. Verify as you go
  • After each file change, check syntax
  • Ensure imports are correct
  • Verify types are properly defined

4. Implement Testing Plan

After completing implementation tasks:

  • Identify matching test file or create new one if needed
  • Implement all test cases as separate test methods
  • Ensure adding version constraint if specified in the specification
  • Ensure tests cover edge cases

5. Run tests

  • Run newly added test cases
  • Get back to the Implementation stage if any test failed

6. Final Verification

Before completing:

  • ✅ All tasks from plan completed
  • ✅ All tests created and passing
  • ✅ Code follows project conventions
  • ✅ Documentation added/updated as needed

Output Report

Provide summary:

Specification Source

  • How the spec was resolved (local file / built from redis.io / user-provided path)
  • Path to the spec file used

Completed Tasks

  • List of all tasks completed
  • Files created (with paths)
  • Files modified (with paths)

Tests Added

  • Test files created
  • Test cases implemented
  • Test results

How to use it

Copy the folder

Take redis/add-new-command from the repository into ~/.claude/skills for personal use, or into .claude/skills inside a project.

Check the name does not clash

The agent identifies a skill by the name field in its header. Two skills with the same name cannot sit side by side — one of them will be ignored.