command-registry-integration

Integrate new chat commands into OpenClaw's formal command registry

33 stars

Best use case

command-registry-integration is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Integrate new chat commands into OpenClaw's formal command registry

Teams using command-registry-integration should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/command-registry-integration/SKILL.md --create-dirs "https://raw.githubusercontent.com/aAAaqwq/AGI-Super-Team/main/skills/command-registry-integration/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/command-registry-integration/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How command-registry-integration Compares

Feature / Agentcommand-registry-integrationStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Integrate new chat commands into OpenClaw's formal command registry

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# command-registry-integration

Integrate a new chat command into OpenClaw’s formal command registry and command handling chain so it appears in `/commands`, supports native slash registration where applicable, and avoids brittle text-intercept hacks.

## Use this when

- You need a real built-in chat command such as `/foo`
- The command must appear in `/commands`
- The command should ride the formal command detection / registry / handler path
- You want the smallest-source-change path for adding a command

## Do NOT use this when

- A plugin command is enough and you do **not** need a built-in source command
- A skill command (`/skill name`) already solves the problem
- You are trying to intercept plain text with ad-hoc regexes outside the command pipeline

## Source map: where to look first

1. `src/auto-reply/commands-registry.data.ts`
   - Source of truth for built-in command registry entries
   - Controls `/commands` visibility and native command metadata
2. `src/auto-reply/commands-registry.ts`
   - Detection, normalization, arg parsing, native spec export
3. `src/auto-reply/reply/commands-core.ts`
   - Main built-in handler chain
4. `src/auto-reply/reply/commands-*.ts`
   - Concrete handlers; add the new command here
5. `src/auto-reply/status.ts`
   - `/commands` and `/help` rendering tests depend on registry descriptions
6. Tests:
   - `src/auto-reply/commands-registry.test.ts`
   - `src/auto-reply/reply/commands.test.ts`
   - `src/auto-reply/status.test.ts`

## Minimal integration path

### 1) Add registry entry

In `commands-registry.data.ts`, add a `defineChatCommand({...})` entry with:
- `key`
- `nativeName`
- `description`
- `textAlias` or `textAliases`
- `category`
- `args` / `argsParsing` / `acceptsArgs` only if needed

This is what makes the command:
- detectable from text
- eligible for native slash export
- visible in `/commands`

### 2) Implement a focused handler

Create `src/auto-reply/reply/commands-<name>.ts`.

Typical shape:
- early return if text commands disabled
- early return if normalized command doesn’t match `/name`
- auth gate via `rejectUnauthorizedCommand(...)` if needed
- parse args minimally
- return `{ shouldContinue: false, reply: { text } }`

Prefer **bridging to existing logic** over reimplementation.

Examples:
- shell out to an existing Python/CLI script with `execFile`
- call an existing library/service helper
- keep formatting logic close to existing implementation if already standardized elsewhere

### 3) Wire into the command chain

In `commands-core.ts`:
- import the handler
- insert it into `HANDLERS`

Keep ordering intentional:
- before generic fallthrough
- near related info/status/tool handlers

### 4) Add minimal regression tests

At minimum cover:
- registry/list visibility (`/commands` rendering contains the command)
- handler routing (`/foo ...` reaches your handler and parses args as expected)

Good minimal test pattern:
- mock `node:child_process` if bridging to CLI/Python
- call `handleCommands(buildCommandTestParams(...))`
- assert invoked argv + reply text

## Acceptance checklist

- [ ] `commands-registry.data.ts` contains the new command entry
- [ ] `/commands` output includes the command
- [ ] text command detection works
- [ ] native name is set if native slash export is desired
- [ ] handler is connected in `commands-core.ts`
- [ ] auth gating is correct
- [ ] args route correctly
- [ ] tests cover registry visibility and execution path
- [ ] no duplicate business logic if an existing script/helper already exists

## Common pitfalls

### 1) Added handler, forgot registry entry
Result: command may work only in ad-hoc paths, but won’t appear in `/commands` or native registration.

### 2) Added registry entry, forgot handler
Result: command is detected and listed but falls through to agent flow.

### 3) Wrong scope / nativeName
If you want native slash command support, do not leave it text-only by accident.

### 4) Re-implementing existing business logic
If a Python/CLI script already exists, bridge to it first. Reimplementation increases drift.

### 5) Missing tests for descriptions
`/commands` assertions often depend on exact description strings from the registry.

### 6) Ad-hoc regex interception
Do not bolt text interception onto unrelated stages. Use the command registry + handler chain.

## Recommended implementation pattern

For existing external logic (best for MVP):
1. registry entry
2. handler file
3. `execFile` bridge to existing script
4. test mocked subprocess call

For pure in-repo logic:
1. registry entry
2. handler file
3. call existing TS helper/service
4. test reply payload

## Verification commands

From the repo root, usually:

```bash
pnpm vitest run src/auto-reply/commands-registry.test.ts src/auto-reply/reply/commands.test.ts src/auto-reply/status.test.ts
```

Or project standard test runner if customized in `package.json`.

## Deliverable template

When done, report:
- files changed
- command execution chain
- how to verify
- any blockers / follow-ups

## Example outputs to mention

- `/commands` now shows `/yourcommand`
- `/yourcommand --json` routes to existing implementation
- native slash metadata exported via `nativeName`

Related Skills

payment-integration

33
from aAAaqwq/AGI-Super-Team

Integrate Stripe, PayPal, and payment processors. Handles checkout flows, subscriptions, webhooks, and PCI compliance. Use PROACTIVELY when implementing payments, billing, or subscription features.

wemp-operator

33
from aAAaqwq/AGI-Super-Team

> 微信公众号全功能运营——草稿/发布/评论/用户/素材/群发/统计/菜单/二维码 API 封装

Content & Documentation

zsxq-smart-publish

33
from aAAaqwq/AGI-Super-Team

Publish and manage content on 知识星球 (zsxq.com). Supports talk posts, Q&A, long articles, file sharing, digest/bookmark, homework tasks, and tag management. Use when publishing content to 知识星球, creating/editing posts, uploading files/images/audio, managing digests, batch publishing, or formatting content for 知识星球.

zoom-automation

33
from aAAaqwq/AGI-Super-Team

Automate Zoom meeting creation, management, recordings, webinars, and participant tracking via Rube MCP (Composio). Always search tools first for current schemas.

zoho-crm-automation

33
from aAAaqwq/AGI-Super-Team

Automate Zoho CRM tasks via Rube MCP (Composio): create/update records, search contacts, manage leads, and convert leads. Always search tools first for current schemas.

ziliu-publisher

33
from aAAaqwq/AGI-Super-Team

字流(Ziliu) - AI驱动的多平台内容分发工具。用于一次创作、智能适配排版、一键分发到16+平台(公众号/知乎/小红书/B站/抖音/微博/X等)。当用户需要多平台发布、内容排版、格式适配时使用。触发词:字流、ziliu、多平台发布、一键分发、内容分发、排版发布。

zhihu-post-skill

33
from aAAaqwq/AGI-Super-Team

> 知乎文章发布——知乎平台内容创作与发布自动化

zendesk-automation

33
from aAAaqwq/AGI-Super-Team

Automate Zendesk tasks via Rube MCP (Composio): tickets, users, organizations, replies. Always search tools first for current schemas.

youtube-knowledge-extractor

33
from aAAaqwq/AGI-Super-Team

This skill performs deep analysis of YouTube videos through **both information channels** Multimodal YouTube video analysis through both audio (transcript) and visual (frame extraction + image analysis) channels. Especially powerful for HowTo videos, tutorials, demos, and explainer videos where what is SHOWN (screenshots, UI demos, diagrams, code, physical actions) is just as important as what is SAID. Use this skill whenever a user wants to analyze, summarize, or create step-by-step guides from YouTube videos, or when they share a YouTube URL and want to understand what happens in the video. Triggers on requests like "Analyze this YouTube video", "Create a step-by-step guide from this video", "What does this video show?", "Summarize this tutorial", or any YouTube URL shared with analysis intent.

youtube-factory

33
from aAAaqwq/AGI-Super-Team

Generate complete YouTube videos from a single prompt - script, voiceover, stock footage, captions, thumbnail. Self-contained, no external modules. 100% free tools.

youtube-automation

33
from aAAaqwq/AGI-Super-Team

Automate YouTube tasks via Rube MCP (Composio): upload videos, manage playlists, search content, get analytics, and handle comments. Always search tools first for current schemas.

xlsx

33
from aAAaqwq/AGI-Super-Team

Comprehensive spreadsheet creation, editing, and analysis with support for formulas, formatting, data analysis, and visualization. When Claude needs to work with spreadsheets (.xlsx, .xlsm, .csv, .tsv, etc) for: (1) Creating new spreadsheets with formulas and formatting, (2) Reading or analyzing data, (3) Modify existing spreadsheets while preserving formulas, (4) Data analysis and visualization in spreadsheets, or (5) Recalculating formulas