Agent skill

Voice Subsystem Keeper

by discord-php in discord-php/DiscordPHP

Work with DiscordPHP's voice subsystem — voice gateway protocol opcodes, encryption (VoiceGroupCrypto), voice packets, audio streaming, and Discord.php voice integration.

MITAuto-check passed

Install Voice Subsystem Keeper

skills CLI
$ npx skills add discord-php/DiscordPHP --skill voice-subsystem-keeper -a claude-code

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

GitHub CLI
$ gh skill install discord-php/DiscordPHP voice-subsystem-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/voice-subsystem-keeper .claude/skills/voice-subsystem-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
voice-subsystem-keeper
GitHub stars
1.1k
Token cost
~1.7k tokens
SKILL.md length
718 words
Files
1
Skills in repo
14
Repo updated
First seen
Licence
MIT

At a glance

Work with DiscordPHP's voice subsystem — voice gateway protocol opcodes, encryption (VoiceGroupCrypto), voice packets, audio streaming, and Discord.php voice integration.

  • Works in 9 steps: src/Discord/Voice/VoiceGroupCrypto.php —… → src/Discord/Voice/VoiceGroupCryptoTrait.p… → src/Discord/Voice/VoiceGroupCryptoInterfa… → …
  • Touching Voice/
  • SKILL.md covers Architecture overview, Read in this order, Core concepts and Companion surfaces, plus 4 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Voice Subsystem Keeper is an agent skill from discord-php/DiscordPHP. Work with DiscordPHP's voice subsystem — voice gateway protocol opcodes, encryption (VoiceGroupCrypto), voice packets, audio streaming, and Discord.php voice integration. Use when touching Voice/, joinVoiceChannel, or voice encryption/packet logic.

Its SKILL.md is about 1.7k 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 Voice/
  • JoinVoiceChannel
  • Voice encryption/packet logic

Example prompts

  • “/voice-subsystem-keeper”

Workflow steps

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

  1. src/Discord/Voice/VoiceGroupCrypto.php — encryption/decryption base class
  2. src/Discord/Voice/VoiceGroupCryptoTrait.php — mixin providing group-based AEAD crypto
  3. src/Discord/Voice/VoiceGroupCryptoInterface.php — contract
  4. src/Discord/Voice/VoicePacket.php — encrypted RTP packet encapsulation
  5. src/Discord/Voice/SessionDescription.php — session key and mode negotiation
  6. src/Discord/Voice/Speaking.php, src/Discord/Voice/Hello.php, src/Discord/Voice/Ready.php, src/Discord/Voice/Resumed.php — voice gateway…
  7. src/Discord/Voice/Platform.php, src/Discord/Voice/Region.php — enum helpers
  8. src/Discord/Discord.php — search for joinVoiceChannel, VOICE_STATE_UPDATE, VOICE_SERVER_UPDATE
  9. src/Discord/Helpers/Buffer.php — writable stream for audio buffering (extends EventEmitter)

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

Voice Subsystem Keeper loads about 1.7k tokens when it runs. Until then it costs about 68 tokens; SKILL.md has 718 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~68
When it runs · the whole SKILL.md, loaded when a task matches
~1.7k

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). 718 words, ~1,704 tokens.

Download SKILL.mdSave it as .claude/skills/voice-subsystem-keeper/SKILL.md (or your agent's skills folder).
name
voice-subsystem-keeper
description
Work with DiscordPHP's voice subsystem — voice gateway protocol opcodes, encryption (VoiceGroupCrypto), voice packets, audio streaming, and Discord.php voice integration. Use when touching Voice/*, joinVoiceChannel, or voice encryption/packet logic.

Skill: voice-subsystem-keeper

Use this skill when work touches src/Discord/Voice/*, Discord::joinVoiceChannel(), voice event handlers in Discord.php, or anything involving audio encryption and packets.

Architecture overview

Voice support is split across three locations. Understand the boundary before touching any of them:

LocationWhat lives here
src/Discord/Voice/*Internal protocol types: opcodes (Hello, Ready, Speaking), session description, voice packets, encryption classes and traits. These are pure data/crypto — no audio I/O.
src/Discord/Discord.phpRuntime integration: joinVoiceChannel(), voice state update handlers, voice server update handlers. This is where the external voice client is wired to gateway events.
discord-php-helpers/voice (external package)Manager and VoiceClient: actual audio I/O, Opus encoding, UDP transport, stream management. DiscordPHP delegates audio work here.

Rule: do not blur these boundaries. Protocol types belong in Voice/*, audio I/O belongs in the external package, and wiring belongs in Discord.php.

Read in this order

  1. src/Discord/Voice/VoiceGroupCrypto.php — encryption/decryption base class
  2. src/Discord/Voice/VoiceGroupCryptoTrait.php — mixin providing group-based AEAD crypto
  3. src/Discord/Voice/VoiceGroupCryptoInterface.php — contract
  4. src/Discord/Voice/VoicePacket.php — encrypted RTP packet encapsulation
  5. src/Discord/Voice/SessionDescription.php — session key and mode negotiation
  6. src/Discord/Voice/Speaking.php, src/Discord/Voice/Hello.php, src/Discord/Voice/Ready.php, src/Discord/Voice/Resumed.php — voice gateway opcodes
  7. src/Discord/Voice/Platform.php, src/Discord/Voice/Region.php — enum helpers
  8. src/Discord/Discord.php — search for joinVoiceChannel, VOICE_STATE_UPDATE, VOICE_SERVER_UPDATE
  9. src/Discord/Helpers/Buffer.php — writable stream for audio buffering (extends EventEmitter)

Core concepts

Voice gateway protocol

Discord voice uses a separate WebSocket gateway from the main gateway. The handshake sequence is:

  1. Hello — server sends heartbeat interval
  2. Identify — client sends token + session
  3. Ready — server sends UDP endpoint + SSRC
  4. Select Protocol — client sends chosen encryption mode
  5. Session Description — server sends secret key
  6. Speaking — sent before/after transmitting audio

The classes in src/Discord/Voice/ model these protocol steps as typed value objects.

Encryption

VoiceGroupCrypto provides AEAD encryption for RTP packets. It depends on libsodium (ext-sodium). The trait VoiceGroupCryptoTrait provides the implementation; concrete classes select the cipher mode (e.g., aead_xchacha20poly1305_ietf).

  • LibSodiumNotFoundException is thrown at runtime if the extension is absent — do not suppress it
  • Cipher mode is negotiated via SessionDescription
VoicePacket

VoicePacket encapsulates an encrypted RTP packet:

  • SSRC identifies the audio source
  • Sequence number and timestamp are required for RTP ordering
  • The packet is encrypted before transmission using the session secret key
Audio I/O (external package)

discord-php-helpers/voice owns all audio work:

  • Opus codec encoding/decoding
  • UDP socket management
  • OGG/Opus stream handling
  • FFmpeg process integration

Do not replicate any of this in src/Discord/Voice/. If you need to add audio capability, contribute to the external package or wrap it.

Old* files

OldVoiceClient.php, OldBuffer.php, OldOggStream.php, OldOggPage.php, OldOpusHead.php, OldOpusTags.php, OldReceiveStream.php are legacy implementations. They are preserved for compatibility only.

Do not extend, copy patterns from, or add new features to any Old* class. Fix bugs in them only when the fix is isolated and does not require architectural change.

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

Companion surfaces

When touching voice code, also inspect:

TouchingAlso inspect
VoiceGroupCrypto or crypto modeSessionDescription, VoicePacket, VoiceGroupCryptoInterface, LibSodiumNotFoundException
Speaking or voice gateway opcodeHello, Ready, Resumed, SessionDescription — full handshake chain
Discord.php voice handlersVoice gateway opcodes, Buffer, external voice package Manager
Buffer.phpMultipart.php (similar streaming pattern), external voice package stream classes
Any new voice encryption modeVoiceGroupCryptoInterface, crypto trait, SessionDescription mode list

Playbook: adding a new voice encryption mode

  1. Add the mode constant to SessionDescription.
  2. Implement the mode in a class using VoiceGroupCryptoTrait or extending VoiceGroupCrypto.
  3. Register the mode in the external voice package's cipher negotiation if needed.
  4. Update VoiceGroupCryptoInterface if the contract changes.
  5. Verify libsodium function availability — throw LibSodiumNotFoundException if missing.
  6. Add tests for encrypt/decrypt round-trip.

Playbook: adding a voice gateway opcode

  1. Create a typed value class under src/Discord/Voice/ mirroring the Discord voice gateway docs.
  2. Wire the opcode handler in Discord.php (find the voice WebSocket message handler).
  3. Document the opcode sequence in the class docblock.
  4. Do not put audio I/O logic in the opcode class — keep it as a typed payload.

Design tripwires

  • Adding audio codec, UDP, or FFmpeg logic inside src/Discord/Voice/ — that belongs in the external voice package
  • Extending any Old* class for new features
  • Skipping libsodium availability check before using sodium functions
  • Hard-coding a cipher mode instead of reading it from SessionDescription
  • Blocking I/O inside voice packet or stream handlers — everything must be async/Promise-based
  • Catching LibSodiumNotFoundException silently instead of surfacing it to the caller

Reference files

  • src/Discord/Voice/VoiceGroupCrypto.php — encryption base
  • src/Discord/Voice/VoicePacket.php — RTP packet wrapper
  • src/Discord/Voice/SessionDescription.php — session key/mode
  • src/Discord/Voice/Speaking.php — voice speaking opcode
  • src/Discord/Helpers/Buffer.php — writable stream helper
  • src/Discord/Exceptions/LibSodiumNotFoundException.php — crypto dependency guard
  • src/Discord/Exceptions/OpusNotFoundException.php — codec dependency guard
  • src/Discord/Exceptions/FFmpegNotFoundException.php — audio tool dependency guard

© 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/voice-subsystem-keeper of discord-php/DiscordPHP.

Open the folder on GitHubat commit 580c66a

Compare with similar skills

Voice Subsystem 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.

Voice Subsystem Keeper compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Voice Subsystem Keeper this skilldiscord-php/DiscordPHP1.1k—~1.7kAutomated 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 2 days ago
    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 2 days ago
    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 2 days ago
    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 2 days ago
    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 2 days ago
    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 2 days ago
    Auto-check passed

Works with

Questions about Voice Subsystem Keeper

What does Voice Subsystem Keeper do?

Work with DiscordPHP's voice subsystem — voice gateway protocol opcodes, encryption (VoiceGroupCrypto), voice packets, audio streaming, and Discord.php voice integration. Voice Subsystem Keeper is an agent skill from discord-php/DiscordPHP.php voice integration.

When should I use Voice Subsystem Keeper?

Voice Subsystem Keeper fits situations like: touching Voice/; joinVoiceChannel; voice encryption/packet logic.

How do I install Voice Subsystem Keeper in Claude Code?

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

How do I install Voice Subsystem Keeper in Codex?

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

Can I use Voice Subsystem 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 voice-subsystem-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/voice-subsystem-keeper, .gemini/skills/voice-subsystem-keeper, .github/skills/voice-subsystem-keeper and .opencode/skills/voice-subsystem-keeper in your project.

What does Voice Subsystem Keeper need to run?

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

Does Voice Subsystem 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 Voice Subsystem 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 Voice Subsystem Keeper use?

Voice Subsystem 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 Voice Subsystem Keeper use?

About 1.7k tokens (SKILL.md is roughly 6.8k 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 Voice Subsystem Keeper?

Skills that share tags, products or a category with Voice Subsystem 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 Voice Subsystem 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.