slash-command-creation-reuse

Create and register slash commands using established descriptor, implementation, and registration skeletons.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/liuyu520/cc_source --skill slash-command-creation-reuse
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: slash-command-creation-reuse
Source: https://github.com/liuyu520/cc_source/tree/main/.claude/skills/slash-command-creation-reuse
Command: npx skills add https://github.com/liuyu520/cc_source --skill slash-command-creation-reuse

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps teams create new slash commands by reusing proven patterns (descriptor in index.ts, implementation file, and centralized registration) to reduce boilerplate and ensure consistency across commands.

Core Features & Use Cases

  • Reuse command skeletons to accelerate the creation of new slash commands, ensuring standard interfaces and lifecycle.
  • Enforce a clean architecture: descriptor (index.ts), implementation (my-command.ts), and registration (commands.ts) with lazy loading.
  • Use context-aware patterns for setMessages, onDone, resume, and command flow to enable reliable interactions within the REPL or UI.

Quick Start

Create a new command by following the index.ts descriptor pattern, implement its logic in the implementation file, and register it in the central command registry.

Frequently Asked Questions about slash-command-creation-reuse

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create a new slash command in TypeScript without writing boilerplate?

To reduce boilerplate when creating slash commands, reuse established skeletons for the descriptor in index.ts, the implementation file, and centralized registration. This enforces consistent context usage and lifecycle management across your command architecture.

What is the standard architecture for registering slash commands?

The standard architecture for registering slash commands involves separating the descriptor in index.ts, the implementation in a dedicated file, and centralized registration in commands.ts. This structure uses lazy loading and enforces clean separation of concerns.

How do I use context-aware patterns like setMessages and onDone in command development?

Context-aware patterns for setMessages, onDone, and resume are applied to enable reliable interactions within the REPL or UI. Composing components that align with the project’s command architecture ensures the command flow handles these lifecycle hooks consistently.

Can I use this slash command pattern for my existing TypeScript project?

You can apply this pattern to any TypeScript command development workflow where you define a descriptor, implement the call function, and register the command in the global registry. It requires no external dependencies to integrate into your existing project.

What's the best way to ensure consistency across multiple slash commands?

The best way to ensure consistency is to impose a standard structure by reusing proven command skeletons. By centralizing registration and enforcing clean architecture for descriptors and implementations, teams can accelerate development while maintaining standard interfaces.