Agent skill

Helpers And Infra Keeper

by discord-php in discord-php/DiscordPHP

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

MITAuto-check passedBackend & APIs

Install Helpers And Infra Keeper

skills CLI
$ npx skills add discord-php/DiscordPHP --skill helpers-and-infra-keeper -a claude-code

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

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

At a glance

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

  • Works in 7 steps: src/Discord/Helpers/CacheWrapper.php —… → src/Discord/Helpers/CacheConfig.php —… → src/Discord/Helpers/LegacyCacheWrapper.ph… → …
  • Changing cache behavior
  • SKILL.md covers Read in this order, Cache infrastructure, Endpoint::bind() — URL… and Collection base class, plus 6 more sections
  • Calls composer

What it does

Helpers And Infra Keeper is an agent skill from discord-php/DiscordPHP. Work with DiscordPHP's infrastructure utilities — CacheWrapper, CacheConfig, BigInt, Multipart, Endpoint::bind URL templates, Collection base class, and domain Exceptions. Use when changing cache behavior, REST endpoint routing, file uploads, big-integer ID math, or adding/modifying exceptions.

Its SKILL.md is about 2.2k 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 Backend & APIs, covering REST APIs and File uploads and storage. It works with Discord, PHP and React. The repository describes itself as: An API to interact with the popular messaging app Discord. The licence is MIT.

When your agent uses it

  • Changing cache behavior
  • REST endpoint routing
  • Big-integer ID math
  • Adding/modifying exceptions

Example prompts

  • “/helpers-and-infra-keeper”

Workflow steps

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

  1. src/Discord/Helpers/CacheWrapper.php — PSR-16 + React cache bridge
  2. src/Discord/Helpers/CacheConfig.php — cache options (compression, sweep, TTL)
  3. src/Discord/Helpers/LegacyCacheWrapper.php — fallback for older cache implementations
  4. src/Discord/Helpers/BigInt.php — 32-bit PHP GMP polyfill for snowflake IDs and permission bitfields
  5. src/Discord/Helpers/Multipart.php — multipart/form-data builder for file uploads
  6. src/Discord/Repository/AbstractRepository.php — how repositories consume CacheWrapper and $endpoints
  7. src/Discord/Discord.php — options['cache'] wiring to CacheWrapper/CacheConfig

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

    Shell commands in SKILL.md call:

    • composer

    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

Helpers And Infra Keeper loads about 2.2k tokens when it runs. Until then it costs about 80 tokens; SKILL.md has 913 words of instructions outside code blocks.

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

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). 913 words, ~2,166 tokens.

Download SKILL.mdSave it as .claude/skills/helpers-and-infra-keeper/SKILL.md (or your agent's skills folder).
name
helpers-and-infra-keeper
description
Work with DiscordPHP's infrastructure utilities — CacheWrapper, CacheConfig, BigInt, Multipart, Endpoint::bind URL templates, Collection base class, and domain Exceptions. Use when changing cache behavior, REST endpoint routing, file uploads, big-integer ID math, or adding/modifying exceptions.

Skill: helpers-and-infra-keeper

Use this skill when work touches src/Discord/Helpers/*, src/Discord/Exceptions/*, Endpoint::bind() patterns, or the external Collection / discord-php/http packages.

These are cross-cutting infrastructure utilities. They have no domain logic, but nearly every other layer depends on them.

Read in this order

  1. src/Discord/Helpers/CacheWrapper.php — PSR-16 + React cache bridge
  2. src/Discord/Helpers/CacheConfig.php — cache options (compression, sweep, TTL)
  3. src/Discord/Helpers/LegacyCacheWrapper.php — fallback for older cache implementations
  4. src/Discord/Helpers/BigInt.php — 32-bit PHP GMP polyfill for snowflake IDs and permission bitfields
  5. src/Discord/Helpers/Multipart.php — multipart/form-data builder for file uploads
  6. src/Discord/Repository/AbstractRepository.php — how repositories consume CacheWrapper and $endpoints
  7. src/Discord/Discord.php — options['cache'] wiring to CacheWrapper/CacheConfig

Cache infrastructure

Three-class hierarchy
ClassRole
CacheConfigValue object holding cache options passed in Discord::__construct() options['cache']
CacheWrapperMain wrapper: bridges React's async cache (PSR-16 + react/cache) to repository storage. Handles compression if configured.
LegacyCacheWrapperDefault when no external cache is configured. Wraps an in-memory store. Used by default.

Rule: repositories do not interact with cache stores directly. They always go through CacheWrapper. Do not bypass it.

When to use CacheConfig

If a feature needs configurable cache behavior (TTL, compression, sweep interval), add it as a property on CacheConfig. Do not scatter cache tuning across individual repositories.

Cache coherence rule

When a REST write succeeds, the cache write must happen in the same promise chain — not after a refetch. This is enforced by convention, not framework. Break the chain and you get stale cache.

Endpoint::bind() — URL template pattern

All REST endpoints are defined as Endpoint constants in the external discord-php/http package:

php
use Discord\Http\Endpoint;

protected $endpoints = [
    'get'    => Endpoint::CHANNEL,
    'update' => Endpoint::CHANNEL,
    'delete' => Endpoint::CHANNEL,
];

Routes with parameters use :param placeholders. Binding happens via Endpoint::bind($endpoint, $params) where $params is a key-value map matching the placeholders.

Rule: never build URL strings by hand. Always use Endpoint::bind() or assign a named Endpoint constant. Raw string concatenation bypasses rate-limit bucket identification.

Finding endpoint constants

Browse vendor/discord-php/http/src/Endpoint.php for available constants. If a Discord API endpoint is missing, add it to the external package — do not define it inline in DiscordPHP source.

Checking against Discord's OpenAPI description

composer openapi (scripts/openapi-check.php) compares the library with the live preview of Discord's OpenAPI description. It lists the operations DiscordPHP never sends a request for, and routes with no Endpoint constant. It also lists what Discord has changed since the commit recorded in scripts/openapi-baseline.json: endpoints added or removed, parameters and responses, schema properties and enum values. It reads the library's source to see which request each constant is sent with. It recognises a repository's $endpoints table (all/get send GET, create POST, update PATCH, delete DELETE, and other keys whatever method sends $this->endpoints['key']), a direct call like ->post(Endpoint::bind(Endpoint::X, …)), or a variable assigned the endpoint and sent later in the same method. Keep new request code in one of those shapes, or the check will report the operation as unsent.

After implementing an operation, or deciding not to, run composer openapi:update and commit the baseline. Record the reason for every gap that remains in its unimplemented map. A daily workflow (.github/workflows/openapi.yml) runs the same check and opens an issue labelled openapi when it finds something new.

Collection base class

All repositories extend Collection from discord-php-helpers/collection. Key behaviors inherited:

  • discriminator-keyed storage ($discrim — defaults to 'id')
  • typed item enforcement ($class)
  • get($key), has($key), first(), find(callable), filter(callable)
  • JSON serialization

AbstractRepository adds REST/cache behavior on top. Do not re-implement collection operations in repositories — use the inherited helpers.

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

BigInt

BigInt provides GMP-based arithmetic for environments where PHP is compiled as 32-bit, where Discord snowflake IDs and 64-bit permission bitfields overflow native integers.

Usage pattern:

php
use Discord\Helpers\BigInt;

$perms = BigInt::bitAnd($memberPerms, $requiredPerm);

Rule: use BigInt for any permission flag arithmetic or snowflake comparison that could run on 32-bit PHP. Do not assume PHP_INT_SIZE === 8.

Multipart

Multipart builds multipart/form-data request bodies for file attachment uploads. It is used by MessageBuilder and similar builders when attachments are present.

It has no cache or domain logic — treat it as a serialization helper.

Exception hierarchy

src/Discord/Exceptions/ contains domain-specific exceptions. Do not use generic \RuntimeException or \InvalidArgumentException when a typed exception already exists:

ExceptionWhen to throw
IntentExceptionInvalid or missing gateway intents at startup
PartRequestFailedExceptionA part fetch or REST operation failed
InvalidOverwriteExceptionA permission overwrite is malformed
AttachmentSizeExceptionAttachment exceeds size limit
FileNotFoundExceptionFile path not found for upload
BufferTimedOutExceptionAudio buffer read timed out
LibSodiumNotFoundExceptionext-sodium not available (voice)
OpusNotFoundExceptionOpus codec binary not available
FFmpegNotFoundExceptionFFmpeg binary not found
DCANotFoundExceptionDCA tool not found

When adding a new typed exception: extend \Exception or the nearest domain parent, keep the name *Exception, and put it in src/Discord/Exceptions/.

Companion surfaces

TouchingAlso inspect
CacheWrapper or CacheConfigDiscord.php options['cache'] wiring, AbstractRepository cache usage, LegacyCacheWrapper fallback
Endpoint constants$endpoints arrays in all affected repositories, rate-limit bucket behavior
BigIntPermission parts (Permission, RolePermission, ChannelPermission), snowflake comparison sites
MultipartMessageBuilder attachment handling, HTTP client request formation
An exception classCallers that catch the specific type, docs/guide if it's user-facing

Design tripwires

  • Building REST URL strings by hand instead of using Endpoint::bind()
  • Writing to a cache store directly inside a repository, bypassing CacheWrapper
  • Re-implementing collection iteration helpers that Collection already provides
  • Using PHP_INT_SIZE === 8 as a safe assumption for permission arithmetic — use BigInt
  • Throwing \RuntimeException when a typed domain exception already exists
  • Adding domain logic (Discord resource rules) to any class in Helpers/ or Exceptions/
  • Putting new audio stream or voice crypto helpers in Helpers/ — those belong in Voice/* or the external voice package

Reference files

  • src/Discord/Helpers/CacheWrapper.php — main cache bridge
  • src/Discord/Helpers/CacheConfig.php — cache options value object
  • src/Discord/Helpers/LegacyCacheWrapper.php — default in-memory cache
  • src/Discord/Helpers/BigInt.php — 32-bit PHP GMP polyfill
  • src/Discord/Helpers/Multipart.php — file upload form builder
  • src/Discord/Repository/AbstractRepository.php — how CacheWrapper and Endpoint are consumed
  • src/Discord/Exceptions/IntentException.php — representative typed exception
  • src/Discord/Exceptions/PartRequestFailedException.php — REST failure exception
  • vendor/discord-php/http/src/Endpoint.php — all REST endpoint constants

© 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/helpers-and-infra-keeper of discord-php/DiscordPHP.

Open the folder on GitHubat commit 580c66a

Compare with similar skills

Helpers And Infra 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.

Helpers And Infra Keeper compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Helpers And Infra Keeper this skilldiscord-php/DiscordPHP1.1k—~2.2kAutomated safety check: PassMIT
Livewire Developmentcoollabsio/coolify63k—~964Automated safety check: PassMIT
Laravel SpecialistJeffallan/claude-skills12k1 repos~2.1kAutomated safety check: PassMIT
Livewire Developmentyungifez/skuul4091 repos~1.9kAutomated safety check: PassMIT
Databuddydatabuddy-analytics/Databuddy1.2k—~2.1kAutomated safety check: PassAGPL-3.0
Edgestore Setupedgestorejs/edgestore454—~1.8kAutomated safety check: PassMIT

Similar skills

  • Livewire Development

    coollabsio/coolify

    A skill your agent uses for any task or question involving Livewire.

    63k GitHub stars~964 tokensUpdated yesterday
    Backend & APIsAuto-check passed
  • Laravel Specialist

    Jeffallan/claude-skills

    Builds Laravel 10+ applications with Eloquent models, Sanctum authentication, Horizon queues, API resources and Livewire components, tested with Pest or PHPUnit.

    12k GitHub starsUsed in 1 repo~2.1k tokens
    Backend & APIsAuto-check passed
  • Livewire Development

    yungifez/skuul

    A skill your agent uses for any task or question involving Livewire.

    409 GitHub starsUsed in 1 repo~1.9k tokens
    Backend & APIsAuto-check passed
  • Databuddy

    databuddy-analytics/Databuddy

    Integrate Databuddy analytics using the SDK, REST API, or MCP.

    1.2k GitHub stars~2.1k tokensUpdated yesterday
    Backend & APIsAuto-check passed
  • Edgestore Setup

    edgestorejs/edgestore

    A skill your agent uses when adding, extending, or troubleshooting EdgeStore file uploads, upload UI, or bucket access policies in a TypeScript/React application.

    454 GitHub stars~1.8k tokensUpdated yesterday
    Backend & APIsAuto-check passed
  • Build a new channel Connect button (e.g. An agent skill from novuhq/novu.

    40k GitHub stars~1.6k tokensUpdated yesterday
    Backend & APIsAuto-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 4 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 4 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 4 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 4 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 4 days ago
    Auto-check passed
  • Runtime Bootstrap Keeper

    discord-php/DiscordPHP

    Maintain Discord.php runtime bootstrapping, startup options, event loop, gateway connection, reconnection, member chunking, cache configuration, and process lifecycle.

    1.1k GitHub stars~4k tokensUpdated 4 days ago
    Auto-check passed

Works with

Categories

Questions about Helpers And Infra Keeper

What does Helpers And Infra Keeper do?

Work with DiscordPHP's infrastructure utilities — CacheWrapper, CacheConfig, BigInt, Multipart, Endpoint::bind URL templates, Collection base class, and domain Exceptions. Helpers And Infra Keeper is an agent skill from discord-php/DiscordPHP. Work with DiscordPHP's infrastructure utilities — CacheWrapper, CacheConfig, BigInt, Multipart, Endpoint::bind URL templates, Collection base class, and domain Exceptions.

When should I use Helpers And Infra Keeper?

Helpers And Infra Keeper fits situations like: changing cache behavior; REST endpoint routing; big-integer ID math; adding/modifying exceptions.

How do I install Helpers And Infra Keeper in Claude Code?

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

How do I install Helpers And Infra Keeper in Codex?

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

Can I use Helpers And Infra 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 helpers-and-infra-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/helpers-and-infra-keeper, .gemini/skills/helpers-and-infra-keeper, .github/skills/helpers-and-infra-keeper and .opencode/skills/helpers-and-infra-keeper in your project.

What does Helpers And Infra Keeper need to run?

Going by SKILL.md and its folder, Helpers And Infra Keeper needs the command-line tools its instructions call (composer).

Does Helpers And Infra 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 Helpers And Infra 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 Helpers And Infra Keeper use?

Helpers And Infra 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 Helpers And Infra Keeper use?

About 2.2k tokens (SKILL.md is roughly 8.7k 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 Helpers And Infra Keeper?

Skills that share tags, products or a category with Helpers And Infra Keeper: Livewire Development (coollabsio/coolify, 63k stars), Laravel Specialist (Jeffallan/claude-skills, 12k stars), Livewire Development (yungifez/skuul, 409 stars) and Databuddy (databuddy-analytics/Databuddy, 1.2k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Helpers And Infra Keeper?

discord-php (a GitHub organization) maintains it in discord-php/DiscordPHP, which has 1,081 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.