voice-subsystem-keeper
Skill1.1k starsChanged 35 days agoMITView on GitHub
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.
Trending
More talk lately.about the whole repository
Who's talking about discord-php/DiscordPHP
- @throwable.bsky.social“📦 team-reflex/discord-php v10.45.21 An unofficial API to interact with the voice and text service Discord. …”Bluesky · Feb 27, 2026 · 1 likes
- crimsonstrife/streamer.live“Bump team-reflex/discord-php from 10.18.24 to 10.18.45”GitHub · Aug 19, 2025 · 1 reactions
- crimsonstrife/streamer.live“Bump team-reflex/discord-php from 10.18.0 to 10.18.5”GitHub · Jul 8, 2025 · 1 reactions
- crimsonstrife/streamer.live“build(deps): bump team-reflex/discord-php from 10.17.0 to 10.17.3”GitHub · Jun 16, 2025 · 1 reactions
- crimsonstrife/streamer.live“build(deps): bump team-reflex/discord-php from 10.13.1 to 10.14.0”GitHub · Jun 9, 2025 · 1 reactions
The biggest 5 of 52 mentions linking to the repository that our crawl found. Each line is their own headline.
See all 52
Talked about on GitHub and Bluesky (52 times).
On GitHub · 50
- Aug 19, 2025Bump team-reflex/discord-php from 10.18.24 to 10.18.45 — crimsonstrife/streamer.live1 reaction · 2 comments
- Jul 8, 2025Bump team-reflex/discord-php from 10.18.0 to 10.18.5 — crimsonstrife/streamer.live1 reaction · 3 comments
- Jun 16, 2025build(deps): bump team-reflex/discord-php from 10.17.0 to 10.17.3 — crimsonstrife/streamer.live1 reaction · 3 comments
- Jun 9, 2025build(deps): bump team-reflex/discord-php from 10.13.1 to 10.14.0 — crimsonstrife/streamer.live1 reaction · 3 comments
- Jun 2, 2025build(deps): bump team-reflex/discord-php from 10.10.12 to 10.11.6 — crimsonstrife/streamer.live1 reaction · 3 comments
45 more on GitHub
- May 26, 2025build(deps): bump team-reflex/discord-php from 10.10.0 to 10.10.6 — crimsonstrife/streamer.live1 reaction · 2 comments
- May 19, 2025build(deps): bump team-reflex/discord-php from 10.7.3 to 10.8.5 — crimsonstrife/streamer.live1 reaction · 2 comments
- May 5, 2025build(deps): bump team-reflex/discord-php from 10.7.1 to 10.7.2 — crimsonstrife/streamer.live1 reaction · 2 comments
- Apr 28, 2025build(deps): bump team-reflex/discord-php from 10.4.7 to 10.7.1 — crimsonstrife/streamer.live1 reaction · 3 comments
- Mar 25, 2025build(deps): bump team-reflex/discord-php from 10.4.3 to 10.4.4 — crimsonstrife/streamer.live1 reaction · 3 comments
- Jul 18, 2024✨ Add support for polls — laracord/framework1 reaction
- May 11, 2024update d.py/d.php polls — advaith1/libs1 reaction · 1 comment
- Nov 2, 2026build(deps): update team-reflex/discord-php requirement from 10.66.* to 10.71.* — smrealms/smr0 reactions
- Oct 26, 2026build(deps): update team-reflex/discord-php requirement from 10.66.* to 10.69.* — smrealms/smr0 reactions · 1 comment
- Oct 20, 2026build(deps): update team-reflex/discord-php requirement from 10.66.* to 10.68.* — smrealms/smr0 reactions · 1 comment
- Oct 19, 2026Bump team-reflex/discord-php from 10.59.0 to 10.67.0 — omnicolor/commlink0 reactions · 1 comment
- Oct 14, 2026build(deps): update team-reflex/discord-php requirement from 10.66.* to 10.67.* — smrealms/smr0 reactions · 1 comment
- Oct 13, 2026Bump team-reflex/discord-php from 10.59.0 to 10.66.3 — omnicolor/commlink0 reactions · 1 comment
- Oct 6, 2026Bump team-reflex/discord-php from 10.59.0 to 10.66.1 — omnicolor/commlink0 reactions · 1 comment
- Oct 5, 2026Bump team-reflex/discord-php from 10.59.0 to 10.65.0 — omnicolor/commlink0 reactions · 1 comment
- Oct 1, 2026build(deps): update team-reflex/discord-php requirement from 10.49.* to 10.66.* — smrealms/smr0 reactions
- Oct 1, 2026Bump team-reflex/discord-php from 10.57.0 to 10.59.0 — omnicolor/commlink0 reactions
- Sep 30, 2026build(deps): update team-reflex/discord-php requirement from 10.49.* to 10.62.* — smrealms/smr0 reactions · 1 comment
- Sep 29, 2026Bump team-reflex/discord-php from 10.57.0 to 10.58.0 — omnicolor/commlink0 reactions · 1 comment
- Sep 28, 2026build(deps): update team-reflex/discord-php requirement from 10.49.* to 10.59.* — smrealms/smr0 reactions · 1 comment
- Sep 25, 2026build(deps): update team-reflex/discord-php requirement from 10.49.* to 10.58.* — smrealms/smr0 reactions · 1 comment
- Sep 25, 2026Bump team-reflex/discord-php from 10.56.18 to 10.57.0 — omnicolor/commlink0 reactions
- Sep 23, 2026Bump team-reflex/discord-php from 10.56.17 to 10.56.18 — omnicolor/commlink0 reactions
- Sep 21, 2026build(deps): update team-reflex/discord-php requirement from 10.49.* to 10.57.* — smrealms/smr0 reactions · 1 comment
- Sep 14, 2026Bump team-reflex/discord-php from 10.56.15 to 10.56.17 — omnicolor/commlink0 reactions
- Sep 7, 2026Bump team-reflex/discord-php from 10.56.10 to 10.56.15 — omnicolor/commlink0 reactions
- Sep 7, 2026build: Bump team-reflex/discord-php from 10.48.14 to 10.56.15 — VATSIM-UK/core0 reactions
- Sep 4, 2026Bump team-reflex/discord-php from 10.56.10 to 10.56.13 — omnicolor/commlink0 reactions · 1 comment
- Sep 2, 2026Bump team-reflex/discord-php from 10.56.8 to 10.56.10 — omnicolor/commlink0 reactions
- Sep 1, 2026Bump team-reflex/discord-php from 10.56.8 to 10.56.9 — omnicolor/commlink0 reactions · 1 comment
- Aug 26, 2026Bump team-reflex/discord-php from 10.55.1 to 10.56.5 — omnicolor/commlink0 reactions
- Aug 25, 2026Bump team-reflex/discord-php from 10.55.1 to 10.56.3 — omnicolor/commlink0 reactions · 1 comment
- Aug 18, 2026build(deps): update team-reflex/discord-php requirement from 10.49.* to 10.56.* — smrealms/smr0 reactions · 1 comment
- Apr 20, 2026Bump team-reflex/discord-php from 10.47.12 to 10.48.1 — crimsonstrife/streamer.live0 reactions · 1 comment
- Feb 10, 2026Bump team-reflex/discord-php from 10.45.15 to 10.45.16 — crimsonstrife/streamer.live0 reactions · 3 comments
- Nov 4, 2025Add Discord Announcement Bot System — k33bz/lastwar-server15860 reactions · 4 comments
- Oct 20, 2025Tag "@property" has error when both ? and null types are included — phpDocumentor/phpDocumentor0 reactions · 1 comment
- Nov 15, 2024Update dependency team-reflex/discord-php to v10 — System3-2/discord-bot0 reactions
- Feb 11, 2024Thread gets terminated when using a slash command with options. — DiscordBot-PMMP/DiscordBot0 reactions · 3 comments
- Jan 14, 2024Update dependency team-reflex/discord-php to v7.3.5 — Karhal/discord-gpt0 reactions
- Jan 14, 2024Update dependency team-reflex/discord-php to v7.3.5 — System3-2/discord-bot0 reactions
- Jan 31, 2023Invalid Activity URL — DiscordBot-PMMP/DiscordBot0 reactions · 3 comments
- Dec 20, 2022Another message type not supported when delete the message — DiscordBot-PMMP/DiscordBot0 reactions · 6 comments
- Aug 19, 2022[Egg Request]: DiscordPHP — pelican-eggs/eggs0 reactions · 1 comment
- Apr 17, 2022Intents help — DiscordBot-PMMP/DiscordBot0 reactions · 4 comments
On Bluesky · 2
- Feb 27, 2026📦 team-reflex/discord-php v10.45.21 An unofficial API to interact with the voice and text service Discord. 🔗… — @throwable.bsky.social1 likes and repost
- Aug 10, 2026📦 team-reflex/discord-php v10.55.0 An unofficial API to interact with the voice and text service Discord. 🔗… — @throwable.bsky.social0 likes and reposts · 1 reply
In this repository14 other files it gives its agents.
- AGENTS.mdAGENTS.md
- async-test-and-doc-syncSkill
- builder-payload-smithSkill
- gateway-cache-sync-keeperSkill
- helpers-and-infra-keeperSkill
- interaction-flow-keeperSkill
- legacy-command-client-keeperSkill
- part-model-maintainerSkill
- repository-cache-keeperSkill
- runtime-bootstrap-keeperSkill
- type-map-keeperSkill
- discord-php-bot-securitySkill
- discord-php-extensionSkill
- discord-php-interactionsSkill
The file
We split this skill into the rules it gives an agent
11 rules. About 0 are common, 4 are distinctive, and 7 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈4
Distinctive · estimate
This author's own choices. Worth a look.
7
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 12
Use this skill when work touches src/Discord/Voice/*, Discord::joinVoiceChannel(), voice event handlers in Discord.php, or anything …
- Very specific: line 24
Rule: do not blur these boundaries.
- Very specific: line 75
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. - Distinctive: line 85
When touching voice code, also inspect:
- Very specific: line 97
Add the mode constant to SessionDescription.
- Very specific: line 100
Update VoiceGroupCryptoInterface if the contract changes.
- Very specific: line 101
Verify libsodium function availability — throw LibSodiumNotFoundException if missing.
- Distinctive: line 102
Add tests for encrypt/decrypt round-trip.
- Very specific: line 106
Create a typed value class under src/Discord/Voice/ mirroring the Discord voice gateway docs.
- Distinctive: line 108
Document the opcode sequence in the class docblock.
- Distinctive: line 109
Do not put audio I/O logic in the opcode class — keep it as a typed payload.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
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:
| Location | What 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.php | Runtime 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
src/Discord/Voice/VoiceGroupCrypto.php— encryption/decryption base classsrc/Discord/Voice/VoiceGroupCryptoTrait.php— mixin providing group-based AEAD cryptosrc/Discord/Voice/VoiceGroupCryptoInterface.php— contractsrc/Discord/Voice/VoicePacket.php— encrypted RTP packet encapsulationsrc/Discord/Voice/SessionDescription.php— session key and mode negotiationsrc/Discord/Voice/Speaking.php,src/Discord/Voice/Hello.php,src/Discord/Voice/Ready.php,src/Discord/Voice/Resumed.php— voice gateway opcodessrc/Discord/Voice/Platform.php,src/Discord/Voice/Region.php— enum helperssrc/Discord/Discord.php— search forjoinVoiceChannel,VOICE_STATE_UPDATE,VOICE_SERVER_UPDATEsrc/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:
Hello— server sends heartbeat intervalIdentify— client sends token + sessionReady— server sends UDP endpoint + SSRCSelect Protocol— client sends chosen encryption modeSession Description— server sends secret keySpeaking— 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).
LibSodiumNotFoundExceptionis 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.
Companion surfaces
When touching voice code, also inspect:
| Touching | Also inspect |
VoiceGroupCrypto or crypto mode | SessionDescription, VoicePacket, VoiceGroupCryptoInterface, LibSodiumNotFoundException |
Speaking or voice gateway opcode | Hello, Ready, Resumed, SessionDescription — full handshake chain |
Discord.php voice handlers | Voice gateway opcodes, Buffer, external voice package Manager |
Buffer.php | Multipart.php (similar streaming pattern), external voice package stream classes |
| Any new voice encryption mode | VoiceGroupCryptoInterface, crypto trait, SessionDescription mode list |
Playbook: adding a new voice encryption mode
- Add the mode constant to
SessionDescription. - Implement the mode in a class using
VoiceGroupCryptoTraitor extendingVoiceGroupCrypto. - Register the mode in the external voice package's cipher negotiation if needed.
- Update
VoiceGroupCryptoInterfaceif the contract changes. - Verify libsodium function availability — throw
LibSodiumNotFoundExceptionif missing. - Add tests for encrypt/decrypt round-trip.
Playbook: adding a voice gateway opcode
- Create a typed value class under
src/Discord/Voice/mirroring the Discord voice gateway docs. - Wire the opcode handler in
Discord.php(find the voice WebSocket message handler). - Document the opcode sequence in the class docblock.
- 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
LibSodiumNotFoundExceptionsilently instead of surfacing it to the caller
Reference files
src/Discord/Voice/VoiceGroupCrypto.php— encryption basesrc/Discord/Voice/VoicePacket.php— RTP packet wrappersrc/Discord/Voice/SessionDescription.php— session key/modesrc/Discord/Voice/Speaking.php— voice speaking opcodesrc/Discord/Helpers/Buffer.php— writable stream helpersrc/Discord/Exceptions/LibSodiumNotFoundException.php— crypto dependency guardsrc/Discord/Exceptions/OpusNotFoundException.php— codec dependency guardsrc/Discord/Exceptions/FFmpegNotFoundException.php— audio tool dependency guard
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

