Chat SDK
databuddy-analytics/Databuddy
Build multi-platform chat bots with Chat SDK (chat npm package).
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…
$ npx skills add discord-php/DiscordPHP --skill discord-php-interactions -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install discord-php/DiscordPHP discord-php-interactions --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/discord-php/DiscordPHP.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.github/skills/discord-php-interactions .claude/skills/discord-php-interactions && rm -rf skills-srcUse ~/.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/
Install the "discord-php-interactions" agent skill from https://github.com/discord-php/DiscordPHP/tree/master/.github/skills/discord-php-interactions into .claude/skills/discord-php-interactions/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "discord-php-interactions", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/discord-php/DiscordPHP/tree/master/.github/skills/discord-php-interactionsType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add discord-php/DiscordPHP --skill discord-php-interactions -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install discord-php/DiscordPHP discord-php-interactions --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/discord-php/DiscordPHP.git skills-src && mkdir -p .agents/skills && cp -r skills-src/.github/skills/discord-php-interactions .agents/skills/discord-php-interactions && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "discord-php-interactions" agent skill from https://github.com/discord-php/DiscordPHP/tree/master/.github/skills/discord-php-interactions into .agents/skills/discord-php-interactions/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "discord-php-interactions", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add discord-php/DiscordPHP --skill discord-php-interactions -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install discord-php/DiscordPHP discord-php-interactions --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/discord-php/DiscordPHP.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/.github/skills/discord-php-interactions .cursor/skills/discord-php-interactions && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "discord-php-interactions" agent skill from https://github.com/discord-php/DiscordPHP/tree/master/.github/skills/discord-php-interactions into .cursor/skills/discord-php-interactions/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "discord-php-interactions", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/discord-php/DiscordPHP.git --path .github/skills/discord-php-interactions--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add discord-php/DiscordPHP --skill discord-php-interactions -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install discord-php/DiscordPHP discord-php-interactions --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/discord-php/DiscordPHP.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/.github/skills/discord-php-interactions .gemini/skills/discord-php-interactions && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "discord-php-interactions" agent skill from https://github.com/discord-php/DiscordPHP/tree/master/.github/skills/discord-php-interactions into .gemini/skills/discord-php-interactions/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "discord-php-interactions", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install discord-php/DiscordPHP discord-php-interactionsInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add discord-php/DiscordPHP --skill discord-php-interactions -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/discord-php/DiscordPHP.git skills-src && mkdir -p .github/skills && cp -r skills-src/.github/skills/discord-php-interactions .github/skills/discord-php-interactions && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "discord-php-interactions" agent skill from https://github.com/discord-php/DiscordPHP/tree/master/.github/skills/discord-php-interactions into .github/skills/discord-php-interactions/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "discord-php-interactions", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add discord-php/DiscordPHP --skill discord-php-interactions -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install discord-php/DiscordPHP discord-php-interactions --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/discord-php/DiscordPHP.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/.github/skills/discord-php-interactions .opencode/skills/discord-php-interactions && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "discord-php-interactions" agent skill from https://github.com/discord-php/DiscordPHP/tree/master/.github/skills/discord-php-interactions into .opencode/skills/discord-php-interactions/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "discord-php-interactions", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
discord-php-interactionsBuild 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…
Discord Php Interactions is an agent skill from 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 (Container / TextDisplay / ActionRow / Button / StringSelect), the two ways to route component clicks, and keeping every reply permission-safe. Use when adding or changing any /command, button, or select.
Its SKILL.md is about 1.5k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.
It sits in Agent Workflows, covering Messaging and chat bots and Hooks and plugins. 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.
Read from SKILL.md and the folder at commit 580c66a. It shows what the files ask for, not the result of running them.
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.
No scripts in the folder and no shell commands in SKILL.md (its code samples are php).
From the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Discord Php Interactions loads about 1.5k tokens when it runs. Until then it costs about 106 tokens; SKILL.md has 353 words of instructions outside code blocks.
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.
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.
The full file from discord-php/DiscordPHP at commit 580c66a, republished under its MIT licence (© discord-php). 353 words, ~1,544 tokens.
.claude/skills/discord-php-interactions/SKILL.md (or your agent's skills folder).Verified against team-reflex/discord-php dev-master (Discord API v10) while
building DiscordPHP-Sabacc and reviewing DiscordPHP-MTG.
use Discord\Builders\CommandBuilder;
use Discord\Parts\Interactions\Command\{Command, Option, Choice};
use Discord\Parts\Interactions\Interaction;
use Discord\Parts\OAuth\Application;
$sub = fn (string $n, string $d) => (new Option($bot))->setName($n)->setDescription($d)->setType(Option::SUB_COMMAND);
$opt = fn (string $n, string $d, int $t, bool $req = false) => (new Option($bot))->setName($n)->setDescription($d)->setType($t)->setRequired($req);
$builder = CommandBuilder::new()
->setName('foo')->setType(Command::CHAT_INPUT)->setDescription('…')
->setContext([ // where it can be used
Interaction::CONTEXT_TYPE_GUILD, // 0
Interaction::CONTEXT_TYPE_BOT_DM, // 1
Interaction::CONTEXT_TYPE_PRIVATE_CHANNEL, // 2 (group DMs)
])
->addIntegrationType(Application::INTEGRATION_TYPE_GUILD_INSTALL) // 0
->addIntegrationType(Application::INTEGRATION_TYPE_USER_INSTALL) // 1
->addOption(
$sub('play', 'Start a game.')
->addOption($opt('opponent', 'Challenge a member.', Option::USER))
->addOption(
(new Option($bot))->setName('difficulty')->setDescription('…')->setType(Option::STRING)
->addChoice((new Choice($bot))->setName('Easy')->setValue('easy'))
)
)
->addOption($sub('wallet', 'Show your balance.'));
// Only create if missing (creating is a rate-limited write):
if ($commandRepo->get('name', 'foo') === null) {
$builder->create($commandRepo)->save('foo command');
}
$bot->listenCommand('foo', fn (Interaction $i) => $handler->dispatch($i));Option type constants: SUB_COMMAND=1, SUB_COMMAND_GROUP=2, STRING=3,
INTEGER=4, BOOLEAN=5, USER=6, NUMBER=10. Parts are constructed
new Option($discord) / new Choice($discord) (or $bot->getFactory()->part(...)).
Enabling User Install: also toggle User Install under Installation in the
Developer Portal, or the INTEGRATION_TYPE_USER_INSTALL on the command is
ignored.
$sub = $interaction->data->options->first();
$name = $sub?->name;
$args = [];
foreach ($sub?->options ?? [] as $o) { $args[$o->name] = $o->value; }A user-installed command can run in a channel the app is not a member of. Only interaction-scoped responses work there, and they inherently respect what the invoking user can do. Use:
| Method | Use for |
|---|---|
$interaction->respondWithMessage($builder, ephemeral: true) | first reply to a slash command |
$interaction->updateMessage($builder) | edit the message a button/select is on |
$interaction->sendFollowUpMessage($builder, ephemeral: true) | extra messages after the first |
$interaction->acknowledgeWithResponse(true) then updateOriginalResponse(...) | when the work takes >3s |
Do not try to $channel->sendMessage(...) for gameplay output in a
user-install context — front everything through the interaction. Constrain
mentions with MessageBuilder::new()->setAllowedMentions(AllowedMentions::new()->setParse(['users']))
(or AllowedMentions::none()), never let role/@everyone pings through.
Available builders (Discord\Builders\Components\*): Container, TextDisplay,
Separator, Section, ActionRow, Button, StringSelect (+ Option),
MediaGallery, Thumbnail, File. Compose:
$builder->addComponent(
Container::new()
->addComponent(TextDisplay::new("## Board\n…"))
->addComponent(Separator::new())
);
$builder->addComponent(ActionRow::new()->addComponents([
Button::new(Button::STYLE_PRIMARY, $customId)->setLabel('Draw'),
Button::new(Button::STYLE_DANGER, $forfeitId)->setLabel('Forfeit'),
]));Button styles: STYLE_PRIMARY=1, SECONDARY=2, SUCCESS=3, DANGER=4,
LINK=5, PREMIUM=6.
A. Per-component listener (Button::setListener / SelectMenu::setListener):
->setListener(callable $cb, Discord $discord, bool $oneOff = false, ?float $timeout = null).
Simple, but each render attaches a fresh INTERACTION_CREATE listener; with a
long-lived interactive message you accumulate listeners. Good for one-shot
buttons (MTG uses it with oneOff: true, timeout: 300).
B. Stable custom_ids + one dispatcher (Sabacc uses this): give components ids
like "foo|<matchId>|draw" and route centrally:
$bot->on(Discord\WebSockets\Event::INTERACTION_CREATE, function (Interaction $i) use ($bot) {
if ($i->type !== Interaction::TYPE_MESSAGE_COMPONENT) return;
$id = (string) ($i->data->custom_id ?? '');
if (! str_starts_with($id, 'foo|')) return;
$bot->session(explode('|', $id)[1])?->handle($i);
});No listener leak; survives re-renders. For a select, fold every choice into the
option value ("handIndex:sign:magnitude") so one interaction carries the whole
move and you need no follow-up prompt. $i->data->values[0] holds it.
Never put a secret in a custom_id — it is sent to Discord and visible in the
client. Capture tokens in the server-side listener closure instead.
Buttons are clickable by anyone who can see the message. In every handler check
$match->seatOf($interaction->user->id) (or equivalent) and reply ephemerally
"not your turn" / "you are not in this match" rather than assuming the clicker is
authorised.
© 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
Just SKILL.md in .github/skills/discord-php-interactions of discord-php/DiscordPHP.
Open the folder on GitHubat commit 580c66a
Discord Php Interactions 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.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Discord Php Interactions this skilldiscord-php/DiscordPHP | 1.1k | — | ~1.5k | Automated safety check: Pass | MIT | |
| Chat SDKdatabuddy-analytics/Databuddy | 1.2k | — | ~2.6k | Automated safety check: Pass | AGPL-3.0 | |
| Discord Bot Helpershepherdjerred/monorepo | 112 | — | ~4.3k | Automated safety check: Pass | GPL-3.0 | |
| Discord Bot Architectdavila7/claude-code-templates | 32k | 6 repos | ~2k | Automated safety check: Pass | MIT | |
| Test Ocas Openclawpwrdrvr/openclaw-codex-app-server | 265 | — | ~4k | Automated safety check: Pass | MIT | |
| Tlon Product Guidetloncorp/tlon-apps | 107 | — | ~11k | Automated safety check: Pass | MIT |
databuddy-analytics/Databuddy
Build multi-platform chat bots with Chat SDK (chat npm package).
shepherdjerred/monorepo
Discord.js v14 for building Discord bots - slash commands, events, components, embeds, and permissions When user works with Discord bots, discord.js, slash commands, Discord API, or mentions…
davila7/claude-code-templates
Specialized skill for building production-ready Discord bots.
pwrdrvr/openclaw-codex-app-server
Regression test the OpenClaw Codex App Server plugin against a live local OpenClaw instance in Telegram or Discord.
tloncorp/tlon-apps
Answer questions about Tlon, Urbit, Tlon Messenger, Tlonbot, and OpenClaw — what they are, how they work, and how to use them.
baserproject/basercms
baserCMS 5系(CakePHP 5.0.5系)+ jQuery プロジェクトの共通ルール(環境・ディレクトリ構成・命名規則・ログ/エラーハンドリング・コアハック禁止・サーバ制約)を定めた基底スキル。「baserCMS 5 で開発」「5系プロジェクトの構成・規約を確認」「htdocs/plugins 配下の配置」「CakeLog…
discord-php/DiscordPHP
Maintain test and documentation alignment — PHPUnit tests, async testing patterns, PHPDoc contracts, guide pages, and documentation workflow.
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…
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…
discord-php/DiscordPHP
Work with DiscordPHP's infrastructure utilities — CacheWrapper, CacheConfig, BigInt, Multipart, Endpoint::bind URL templates, Collection base class, and domain Exceptions.
discord-php/DiscordPHP
Maintain Part domain models — fillable attributes, mutators, typed nested data, save/fetch behavior, permission checks, PHPDoc, and repository bindings.
discord-php/DiscordPHP
Maintain Discord.php runtime bootstrapping, startup options, event loop, gateway connection, reconnection, member chunking, cache configuration, and process lifecycle.
Categories
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…. Discord Php Interactions is an agent skill from 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 (Container / TextDisplay / ActionRow / Button / StringSelect), the two ways to route component clicks, and keeping every reply permission-safe.
Discord Php Interactions fits situations like: changing any /command; tasks that involve Messaging and chat bots; tasks that involve Hooks and plugins.
Run `npx skills add discord-php/DiscordPHP --skill discord-php-interactions -a claude-code`. Or copy the skill folder (.github/skills/discord-php-interactions in discord-php/DiscordPHP) into .claude/skills/discord-php-interactions in your project. Claude Code loads it when a task matches its description.
Run `npx skills add discord-php/DiscordPHP --skill discord-php-interactions -a codex`. Or copy the skill folder (.github/skills/discord-php-interactions in discord-php/DiscordPHP) into .agents/skills/discord-php-interactions in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add discord-php/DiscordPHP --skill discord-php-interactions -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/discord-php-interactions, .gemini/skills/discord-php-interactions, .github/skills/discord-php-interactions and .opencode/skills/discord-php-interactions in your project.
SKILL.md names no scripts, command-line tools or credentials: Discord Php Interactions is instructions for the agent only.
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.
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.
Discord Php Interactions is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 1.5k tokens (SKILL.md is roughly 6.2k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with Discord Php Interactions: Chat SDK (databuddy-analytics/Databuddy, 1.2k stars), Discord Bot Helper (shepherdjerred/monorepo, 112 stars), Discord Bot Architect (davila7/claude-code-templates, 32k stars) and Test Ocas Openclaw (pwrdrvr/openclaw-codex-app-server, 265 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
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.