Agent skill

Legacy Command Client Keeper

by discord-php in discord-php/DiscordPHP

Maintain the optional prefix-command layer — DiscordCommandClient, Command class, parsing, aliases, cooldowns, and help system.

MITAuto-check passed

Install Legacy Command Client Keeper

skills CLI
$ npx skills add discord-php/DiscordPHP --skill legacy-command-client-keeper -a claude-code

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

GitHub CLI
$ gh skill install discord-php/DiscordPHP legacy-command-client-keeper --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/discord-php/DiscordPHP.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/legacy-command-client-keeper .claude/skills/legacy-command-client-keeper && 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
legacy-command-client-keeper
GitHub stars
1.1k
Token cost
~1.4k tokens
SKILL.md length
619 words
Files
1
Skills in repo
14
Repo updated
First seen
Licence
MIT

At a glance

Maintain the optional prefix-command layer — DiscordCommandClient, Command class, parsing, aliases, cooldowns, and help system.

  • Works in 4 steps: src/Discord/DiscordCommandClient.php → src/Discord/CommandClient/Command.php → Example or guide material using command… → …
  • Touching message-based command handling
  • SKILL.md covers Goal, Read in this order, Core contract and Main responsibilities by class, plus 10 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Legacy Command Client Keeper is an agent skill from discord-php/DiscordPHP. Maintain the optional prefix-command layer — DiscordCommandClient, Command class, parsing, aliases, cooldowns, and help system. Use when touching message-based command handling.

Its SKILL.md is about 1.4k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It works with Discord and PHP. The repository describes itself as: An API to interact with the popular messaging app Discord. The licence is MIT.

When your agent uses it

  • Touching message-based command handling

Example prompts

  • “/legacy-command-client-keeper”

Workflow steps

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

  1. src/Discord/DiscordCommandClient.php
  2. src/Discord/CommandClient/Command.php
  3. Example or guide material using command client, if public behavior changes
  4. Interaction command path only if change risks cross-layer leakage

What it can do on your machine

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

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    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

    No URLs in SKILL.md.

    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

Legacy Command Client Keeper loads about 1.4k tokens when it runs. Until then it costs about 52 tokens; SKILL.md has 619 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~52
When it runs · the whole SKILL.md, loaded when a task matches
~1.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 discord-php/DiscordPHP at commit 580c66a, republished under its MIT licence (© discord-php). 619 words, ~1,385 tokens.

Download SKILL.mdSave it as .claude/skills/legacy-command-client-keeper/SKILL.md (or your agent's skills folder).
name
legacy-command-client-keeper
description
Maintain the optional prefix-command layer — DiscordCommandClient, Command class, parsing, aliases, cooldowns, and help system. Use when touching message-based command handling.

Skill: legacy-command-client-keeper

Use this skill when work touches:

  • src/Discord/DiscordCommandClient.php
  • src/Discord/CommandClient/Command.php

This is optional-prefix-command skill. Load it when maintaining the message-command layer built on top of core Discord.

Goal

Keep prefix-command behavior as a clean optional layer:

  • built on top of Discord
  • driven by message events
  • owning its own parsing, aliases, subcommands, cooldowns, and help behavior
  • separate from application-command interaction flow

Read in this order

  1. src/Discord/DiscordCommandClient.php
  2. src/Discord/CommandClient/Command.php
  3. Example or guide material using command client, if public behavior changes
  4. Interaction command path only if change risks cross-layer leakage:
    • src/Discord/Helpers/RegisteredCommand.php
    • src/Discord/WebSockets/Events/InteractionCreate.php

Core contract

DiscordCommandClient extends Discord, but it does not replace core client architecture. It layers:

  • command-specific options
  • prefix detection
  • alias maps
  • command registry
  • default help command
  • message event routing into command callbacks

The command layer should stay optional and message-driven.

Main responsibilities by class

DiscordCommandClient

Owns:

  • command-client option resolution
  • wiring message event listeners during init
  • prefix and mention-prefix expansion
  • top-level command and alias registry
  • default help command behavior
CommandClient\Command

Owns:

  • one command's callback
  • subcommand tree
  • alias mapping for subcommands
  • help metadata
  • cooldown tracking and cooldown messaging

If code does not clearly belong to one of those two, re-check whether it belongs in core Discord instead.

Option rules

DiscordCommandClient uses OptionsResolver for its own layer. Preserve existing semantics around:

  • prefix
  • prefixes
  • name
  • description
  • defaultHelpCommand
  • discordOptions
  • caseInsensitiveCommands
  • internalRejectedPromiseHandler

Command-client options are not core runtime options. Keep them isolated unless a true cross-layer dependency exists.

Parsing rules

Message-command flow today:

  1. command client listens on init
  2. prefix strings get mention placeholders expanded
  3. on message event, ignore self messages
  4. checkForPrefix() strips prefix
  5. args parsed via str_getcsv(..., ' ', '\"', '\\\\')
  6. command name resolved through commands then aliases
  7. command callback invoked
  8. string return values become reply messages

If changing parsing, preserve expectations around:

  • mention prefixes
  • quoted arguments
  • alias lookup
  • case-insensitive mode

Help-system rules

The default help command is not incidental. It is part of command-client feature set.

Preserve:

  • per-command descriptions and long descriptions
  • usage text
  • alias display
  • subcommand display
  • embed-based help formatting

If help behavior changes, inspect both top-level help and per-command help.

Cooldown and subcommand rules

CommandClient\Command carries its own operational semantics:

  • cooldowns keyed by author id
  • subcommands recurse
  • alias lookup for subcommands
  • help visibility controlled by option metadata

Do not move cooldown logic into unrelated core message or user models.

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

Boundaries with interaction commands

This layer is not the same as application commands.

Keep these separate:

  • prefix commands use DiscordCommandClient + CommandClient\Command
  • application commands use Discord::listenCommand() + RegisteredCommand + interaction events

Do not try to force one abstraction to power both unless you intend a broad architectural redesign.

Shared naming concepts are fine. Shared execution path is not current repo design.

Error-handling rules

Internal rejected promises use internalRejectedPromiseHandler. Preserve that pattern rather than sprinkling silent catches or inconsistent logger behavior through callbacks.

If user-facing callback returns string, reply behavior should remain simple and unsurprising.

Existing patterns worth copying

  • top-level command registration through registerCommand()
  • alias registration separated from command registration
  • subcommand tree managed inside Command
  • command options resolved once, then carried as help/cooldown metadata

Smells

Stop if you see:

  • prefix-command concerns moving into Message, Channel, Discord, or interaction code
  • alias or cooldown state stored outside command layer
  • parsing changes that break quoted args or mention prefixes without explicit intent
  • help system logic duplicated in multiple places
  • interaction-command abstractions merged into prefix-command path

Checklist before commit

  • command-client options still resolve cleanly
  • prefix expansion and parsing still intentional
  • command and alias registry behavior still coherent
  • subcommand recursion still works
  • cooldown behavior still belongs to command objects
  • default help command still reflects command metadata
  • no leakage into interaction command layer unless explicitly intended

Bottom line

Legacy command client is convenience layer, not core runtime. Keep it self-contained, predictable, and clearly separate from slash-command interactions.

© discord-php, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .agents/skills/legacy-command-client-keeper of discord-php/DiscordPHP.

Open the folder on GitHubat commit 580c66a

Compare with similar skills

Legacy Command Client Keeper 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.

Legacy Command Client Keeper compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Legacy Command Client Keeper this skilldiscord-php/DiscordPHP1.1k—~1.4kAutomated safety check: PassMIT
Agent Browser CLIvercel-labs/agent-browser44k24 repos~864Automated safety check: PassApache-2.0
Configuring Horizoncoollabsio/coolify63k4 repos~898Automated safety check: PassMIT
Tailwindcss Developmentanonaddy/anonaddy4.9k10 repos~865Automated safety check: PassMIT
Fortify Developmentcoollabsio/coolify63k4 repos~1.9kAutomated safety check: PassMIT
MCP Developmentcoollabsio/coolify63k1 repos~949Automated safety check: PassMIT

Similar skills

  • Agent Browser CLI

    vercel-labs/agent-browser

    Official

    Browser automation CLI for AI agents. Use when the user needs to interact with websites, including navigating pages, filling forms, clicking buttons, taking…

    44k GitHub starsUsed in 24 repos~864 tokens
    Productivity & AutomationAuto-check passed
  • Configuring Horizon

    coollabsio/coolify

    A skill your agent uses whenever the user mentions Horizon by name in a Laravel context.

    63k GitHub starsUsed in 4 repos~898 tokens
    Backend & APIsAuto-check passed
  • Tailwindcss Development

    anonaddy/anonaddy

    Always invoke when the user's message includes 'tailwind' in any form.

    4.9k GitHub starsUsed in 10 repos~865 tokens
    Frontend & DesignAuto-check passed
  • Fortify Development

    coollabsio/coolify

    ACTIVATE when the user works on authentication in Laravel. An agent skill from coollabsio/coolify.

    63k GitHub starsUsed in 4 repos~1.9k tokens
    Backend & APIsAuto-check passed
  • MCP Development

    coollabsio/coolify

    A skill your agent uses for Laravel MCP development. An agent skill from coollabsio/coolify.

    63k GitHub starsUsed in 1 repo~949 tokens
    Frontend & DesignAuto-check passed
  • Electron App Automation

    vercel-labs/agent-browser

    Official

    Automates Electron desktop apps such as VS Code, Slack or Discord by connecting agent-browser to their Chrome DevTools Protocol port.

    44k GitHub starsUsed in 5 repos~1.7k tokens
    Productivity & AutomationAuto-check passed

More from discord-php/DiscordPHP

All 14 skills in this repo
  • Async Test And Doc Sync

    discord-php/DiscordPHP

    Maintain test and documentation alignment — PHPUnit tests, async testing patterns, PHPDoc contracts, guide pages, and documentation workflow.

    1.1k GitHub stars~3.4k tokensUpdated yesterday
    Auto-check: notes
  • Discord Php Bot Security

    discord-php/DiscordPHP

    Audit checklist for DiscordPHP bots and API libraries — stop the bot token leaking to third-party APIs or logs, keep secrets out of customids and exception messages, use constant-time comparison and…

    1.1k GitHub stars~1.2k tokensUpdated yesterday
    Auto-check: notes
  • Discord Php Extension

    discord-php/DiscordPHP

    Scaffold and maintain a DiscordPHP-based bot or an API-library-on-DiscordPHP (the DiscordPHP-MTG / DiscordPHP-NHA / DiscordPHP-Sabacc pattern) — client subclass, third-party HTTP layer, Parts…

    1.1k GitHub stars~1.7k tokensUpdated yesterday
    Auto-check passed
  • Discord Php Interactions

    discord-php/DiscordPHP

    Build DiscordPHP slash commands and message components — global command trees with subcommands, user- AND guild-installable commands usable in DMs / group DMs / guild channels, Components V2…

    1.1k GitHub stars~1.5k tokensUpdated yesterday
    Auto-check passed
  • Helpers And Infra Keeper

    discord-php/DiscordPHP

    Work with DiscordPHP's infrastructure utilities — CacheWrapper, CacheConfig, BigInt, Multipart, Endpoint::bind URL templates, Collection base class, and domain Exceptions.

    1.1k GitHub stars~2.2k tokensUpdated yesterday
    Auto-check passed
  • Part Model Maintainer

    discord-php/DiscordPHP

    Maintain Part domain models — fillable attributes, mutators, typed nested data, save/fetch behavior, permission checks, PHPDoc, and repository bindings.

    1.1k GitHub stars~3.4k tokensUpdated yesterday
    Auto-check passed

Works with

Questions about Legacy Command Client Keeper

What does Legacy Command Client Keeper do?

Maintain the optional prefix-command layer — DiscordCommandClient, Command class, parsing, aliases, cooldowns, and help system. Legacy Command Client Keeper is an agent skill from discord-php/DiscordPHP. Maintain the optional prefix-command layer — DiscordCommandClient, Command class, parsing, aliases, cooldowns, and help system.

When should I use Legacy Command Client Keeper?

Legacy Command Client Keeper fits situations like: touching message-based command handling.

How do I install Legacy Command Client Keeper in Claude Code?

Run `npx skills add discord-php/DiscordPHP --skill legacy-command-client-keeper -a claude-code`. Or copy the skill folder (.agents/skills/legacy-command-client-keeper in discord-php/DiscordPHP) into .claude/skills/legacy-command-client-keeper in your project. Claude Code loads it when a task matches its description.

How do I install Legacy Command Client Keeper in Codex?

Run `npx skills add discord-php/DiscordPHP --skill legacy-command-client-keeper -a codex`. Or copy the skill folder (.agents/skills/legacy-command-client-keeper in discord-php/DiscordPHP) into .agents/skills/legacy-command-client-keeper in your project. Codex loads it when a task matches its description.

Can I use Legacy Command Client Keeper 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 discord-php/DiscordPHP --skill legacy-command-client-keeper -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/legacy-command-client-keeper, .gemini/skills/legacy-command-client-keeper, .github/skills/legacy-command-client-keeper and .opencode/skills/legacy-command-client-keeper in your project.

What does Legacy Command Client Keeper need to run?

SKILL.md names no scripts, command-line tools or credentials: Legacy Command Client Keeper is instructions for the agent only.

Does Legacy Command Client Keeper access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Legacy Command Client Keeper 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 Legacy Command Client Keeper use?

Legacy Command Client Keeper is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Legacy Command Client Keeper 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.

What are the alternatives to Legacy Command Client Keeper?

Skills that share tags, products or a category with Legacy Command Client Keeper: Agent Browser CLI (vercel-labs/agent-browser, 44k stars), Configuring Horizon (coollabsio/coolify, 63k stars), Tailwindcss Development (anonaddy/anonaddy, 4.9k stars) and Fortify Development (coollabsio/coolify, 63k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Legacy Command Client Keeper?

discord-php (a GitHub organization) maintains it in discord-php/DiscordPHP, which has 1,080 GitHub stars. The repository holds 14 skills in this directory. The repository was last updated on October 6, 2026.

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