Slash commands

From Esposter/Esposter · View interactive version

Slash commands is an AI agent skill from the GitHub repository Esposter/Esposter. Apply when writing or modifying slash commands, executeSlashCommand, SlashCommandDefinitionMap, or the SlashCommandParameters components. Esposter's slash commands — a command's definition, how it runs and how its parameters are entered as chips.

How to use this skill

Skill file

Slash Command Conventions

Core Types

Message Format

A posting case assigns markdown to message and nothing else — marked.parse and sendMessage run once after the switch, never a sanitize call, and /me is italic text rather than a MessageType (references/messages.md).

Parameterized Command UI — Discord-style chips

Parameters are inline chips over raw inputs, validated by safeParse into the store's setErrors — no UiForm, no UiRules; focusedIndex is the one focus source, and Escape collapses to text rather than discarding (references/parameter-ui.md).

Execution Modes

A command with no parameters runs at once, one with parameters goes pending; the one switch over SlashCommandType is in executeSlashCommand, closed by exhaustiveGuard (references/execution.md).

Adding a New Command

Value-set member, map entry, switch case — the map's satisfies and the switch's guard fail typecheck until all three agree (references/execution.md).

The registry is the list, not this page

The value set, the map and the switch must stay in sync — satisfies Record<SlashCommandType, SlashCommand> enforces the map and exhaustiveGuard enforces the switch — so SlashCommandDefinitionMap is the readable inventory of what exists and what each command does. Never mirror it here: a copy is one command behind from the first addition.

Two shapes are worth knowing before reading it, because neither is guessable from the map alone:

Reference pages

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.