Agent skill

Interaction Flow Keeper

by discord-php in discord-php/DiscordPHP

Maintain interaction flow — Interaction typing, resolved data caching, command routing, autocomplete, modal responses, and interaction builders.

MITAuto-check passedAgent Workflows

Install Interaction Flow Keeper

skills CLI
$ npx skills add discord-php/DiscordPHP --skill interaction-flow-keeper -a claude-code

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

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

At a glance

Maintain interaction flow — Interaction typing, resolved data caching, command routing, autocomplete, modal responses, and interaction builders.

  • Works in 6 steps: src/Discord/Parts/Interactions/Interactio… → src/Discord/WebSockets/Events/Interaction… → src/Discord/Helpers/RegisteredCommand.php → …
  • Touching Interactions
  • SKILL.md covers Goal, Read in this order, Core contract and Typing rules, plus 9 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Interaction Flow Keeper is an agent skill from discord-php/DiscordPHP. Maintain interaction flow — Interaction typing, resolved data caching, command routing, autocomplete, modal responses, and interaction builders. Use when touching Interactions or slash command handling.

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 sits in Agent Workflows, covering Hooks and plugins and Caching. 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 Interactions
  • Slash command handling

Example prompts

  • “/interaction-flow-keeper”

Workflow steps

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

  1. src/Discord/Parts/Interactions/Interaction.php
  2. src/Discord/WebSockets/Events/InteractionCreate.php
  3. src/Discord/Helpers/RegisteredCommand.php
  4. Related request data parts under src/Discord/Parts/Interactions/Request/*
  5. Outbound builders
  6. Command repositories

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

Interaction Flow Keeper loads about 1.7k tokens when it runs. Until then it costs about 57 tokens; SKILL.md has 746 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~57
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). 746 words, ~1,677 tokens.

Download SKILL.mdSave it as .claude/skills/interaction-flow-keeper/SKILL.md (or your agent's skills folder).
name
interaction-flow-keeper
description
Maintain interaction flow — Interaction typing, resolved data caching, command routing, autocomplete, modal responses, and interaction builders. Use when touching Interactions or slash command handling.

Skill: interaction-flow-keeper

Use this skill when work touches:

  • src/Discord/Parts/Interactions/*
  • src/Discord/WebSockets/Events/InteractionCreate.php
  • application command registration or autocomplete routing
  • modal or component interaction response behavior

This is typed-interaction flow skill. Load it when work affects how interactions are received, interpreted, routed, or answered.

Goal

Keep interactions as a coherent pipeline:

  • gateway payload enters through InteractionCreate
  • payload is typed into correct interaction subclass
  • resolved data warms caches
  • registered command callbacks route correctly
  • response builders and helpers stay aligned with interaction protocol

Read in this order

  1. src/Discord/Parts/Interactions/Interaction.php
  2. src/Discord/WebSockets/Events/InteractionCreate.php
  3. src/Discord/Helpers/RegisteredCommand.php
  4. Related request data parts under src/Discord/Parts/Interactions/Request/*
  5. Outbound builders:
    • src/Discord/Builders/CommandBuilder.php
    • src/Discord/Builders/ModalBuilder.php
    • component builders when component responses matter
  6. Command repositories:
    • src/Discord/Repository/Interaction/GlobalCommandRepository.php
    • src/Discord/Repository/Guild/GuildCommandRepository.php

Core contract

Interaction flow in this repo has two distinct sides:

Inbound
  • gateway dispatch handled by InteractionCreate
  • Interaction::TYPES chooses concrete subtype
  • nested data is exposed as typed interaction request parts
  • resolved users/members/entitlements are cached
Outbound
  • interaction response helpers or builders produce protocol-correct payloads
  • commands are declared with command builders/repositories
  • autocomplete and modal flows use interaction response types and component/modals builders

Do not mix inbound part modeling with outbound builder modeling.

Typing rules

Interaction::TYPES is central

If Discord adds or repo adds support for new interaction type:

  1. update Interaction::TYPES
  2. add subtype class if needed
  3. inspect InteractionCreate
  4. inspect builder/response paths if outbound behavior changes too
Resolved data should not stay loose if typed part exists

Interaction and its request data parts should expose:

  • users
  • members
  • channels
  • roles
  • options

through typed parts or typed collections where repo already has models.

InteractionCreate rules

This handler is latency-sensitive and still responsible for cache correctness.

Preserve these patterns:

  • type interaction early
  • cache resolved users
  • cache resolved members when guild/member context exists
  • avoid unnecessarily slow cache lookups that delay interaction handling
  • cache entitlements
  • route registered command execution/autocomplete callbacks

The handler already overrides some cache behavior to stay fast. Do not "clean it up" into slower generic behavior without understanding timing tradeoffs.

Registered command routing rules

There is an interaction-specific registered command tree in RegisteredCommand.

Keep these facts straight:

  • this is separate from prefix-command CommandClient\Command
  • Discord::listenCommand() populates application_commands
  • InteractionCreate routes slash/autocomplete events into that tree
  • RegisteredCommand supports nested subcommand trees
  • autocomplete uses suggest()
  • execution uses execute()

If change touches application command routing, inspect both:

  • Discord::listenCommand() path
  • InteractionCreate callback routing path

Resolved data and cache rules

When payload provides users or members:

  • warm global user cache
  • warm guild member cache when guild is present
  • preserve interaction speed by preferring cheap access patterns

When payload provides entitlements:

  • sync them into application entitlements repo

Do not assume interaction payload is only for immediate response. It also updates local state for later code.

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

Performance rules

Interaction code has less patience for extra work than many other gateway paths.

Prefer:

  • type from payload
  • cache from payload
  • direct route to callback

Avoid:

  • broad cache scans
  • avoidable REST fetches
  • generic helper usage if it adds measurable delay in hot path

Outbound response rules

Use builders where they exist
  • command definitions: CommandBuilder
  • modals: ModalBuilder
  • message/component payloads: message/component builders
Keep response type constants as public vocabulary

Interaction defines response type constants. Use them to keep protocol semantics readable.

Modal and component usage constraints matter

If interaction response uses components or modals:

  • validate allowed component contexts
  • preserve nested type + data response shape

Boundaries to preserve

Interaction system vs prefix command system

They are different layers:

  • application commands / autocomplete / modals route through RegisteredCommand and interaction parts
  • message-prefix commands route through DiscordCommandClient and CommandClient\Command

Do not unify them by shoving shared semantics into wrong layer. Shared ideas may exist, but execution paths are different.

Interaction part vs message part

An interaction may reference a message, but it is not a message event. Keep response and request semantics on interaction types.

Smells

Stop if you see:

  • new interaction type added without Interaction::TYPES update
  • resolved data left raw even though typed parts already exist
  • application command routing pushed into prefix-command code
  • autocomplete logic mixed with normal execute flow in confusing ways
  • interaction handler slowed down by broad cache or REST work
  • builders bypassed in favor of new raw response arrays for complex payloads

Checklist before commit

  • Interaction::TYPES still complete for supported types
  • InteractionCreate still types, caches, and routes correctly
  • resolved users/members/entitlements handled intentionally
  • registered command execution and autocomplete still work through existing tree
  • modal/component response behavior stays builder-friendly and protocol-correct
  • boundaries with prefix command layer preserved
  • docs/tests updated if public interaction behavior changed

Bottom line

Interaction code in this repo is both protocol parsing and fast command routing. Keep it typed, cache-aware, and quick.

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

Open the folder on GitHubat commit 580c66a

Compare with similar skills

Interaction Flow 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.

Interaction Flow Keeper compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Interaction Flow Keeper this skilldiscord-php/DiscordPHP1.1k—~1.7kAutomated safety check: PassMIT
Chat SDKdatabuddy-analytics/Databuddy1.2k—~2.6kAutomated safety check: PassAGPL-3.0
Test Ocas Openclawpwrdrvr/openclaw-codex-app-server265—~4kAutomated safety check: PassMIT
Discord Bot Architectdavila7/claude-code-templates32k6 repos~2kAutomated safety check: PassMIT
Basercms5 Developmentbaserproject/basercms190—~1.1kAutomated safety check: NotesMIT
Basercms5 Plugin Developmentbaserproject/basercms190—~4.9kAutomated safety check: PassMIT

Similar skills

  • Chat SDK

    databuddy-analytics/Databuddy

    Build multi-platform chat bots with Chat SDK (chat npm package).

    1.2k GitHub stars~2.6k tokensUpdated today
    Agent WorkflowsAuto-check passed
  • Test Ocas Openclaw

    pwrdrvr/openclaw-codex-app-server

    Regression test the OpenClaw Codex App Server plugin against a live local OpenClaw instance in Telegram or Discord.

    265 GitHub stars~4k tokensUpdated 1 mo ago
    Agent WorkflowsAuto-check passed
  • Discord Bot Architect

    davila7/claude-code-templates

    Specialized skill for building production-ready Discord bots.

    32k GitHub starsUsed in 6 repos~2k tokens
    Productivity & AutomationAuto-check passed
  • Basercms5 Development

    baserproject/basercms

    baserCMS 5系(CakePHP 5.0.5系)+ jQuery プロジェクトの共通ルール(環境・ディレクトリ構成・命名規則・ログ/エラーハンドリング・コアハック禁止・サーバ制約)を定めた基底スキル。「baserCMS 5 で開発」「5系プロジェクトの構成・規約を確認」「htdocs/plugins 配下の配置」「CakeLog…

    190 GitHub stars~1.1k tokensUpdated 2 days ago
    Agent WorkflowsAuto-check: notes
  • Basercms5 Plugin Development

    baserproject/basercms

    baserCMS 5系(CakePHP 5ベース)のプラグインを新規開発・改修する際の正本パターン集。「プラグインを作成」「bcplugin で bake」「管理画面を追加」「Table/Entity の書き方」「initialize でアソシエーション宣言」「validationDefault」「fetchTable と TableRegistry の使い分け」「BcAdminForm /…

    190 GitHub stars~4.9k tokensUpdated 2 days ago
    Agent WorkflowsAuto-check passed
  • Basercms5 Theme Development

    baserproject/basercms

    baserCMS 5系(CakePHP 5ベース)のテーマを新規開発・改修する際の正本パターン集。「テーマを作成」「テーマプラグインの構造」「layout/element の書き方」「固定ページテンプレート($page-contents)」「ウィジェット element の配置(element/widget)」「メールフォームテンプレート(createMailForm /…

    190 GitHub stars~2.7k tokensUpdated 2 days ago
    Agent WorkflowsAuto-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 Interaction Flow Keeper

What does Interaction Flow Keeper do?

Maintain interaction flow — Interaction typing, resolved data caching, command routing, autocomplete, modal responses, and interaction builders. Interaction Flow Keeper is an agent skill from discord-php/DiscordPHP. Maintain interaction flow — Interaction typing, resolved data caching, command routing, autocomplete, modal responses, and interaction builders.

When should I use Interaction Flow Keeper?

Interaction Flow Keeper fits situations like: touching Interactions; slash command handling.

How do I install Interaction Flow Keeper in Claude Code?

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

How do I install Interaction Flow Keeper in Codex?

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

Can I use Interaction Flow 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 interaction-flow-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/interaction-flow-keeper, .gemini/skills/interaction-flow-keeper, .github/skills/interaction-flow-keeper and .opencode/skills/interaction-flow-keeper in your project.

What does Interaction Flow Keeper need to run?

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

Does Interaction Flow 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 Interaction Flow 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 Interaction Flow Keeper use?

Interaction Flow 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 Interaction Flow Keeper use?

About 1.7k tokens (SKILL.md is roughly 6.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 Interaction Flow Keeper?

Skills that share tags, products or a category with Interaction Flow Keeper: Chat SDK (databuddy-analytics/Databuddy, 1.2k stars), Test Ocas Openclaw (pwrdrvr/openclaw-codex-app-server, 265 stars), Discord Bot Architect (davila7/claude-code-templates, 32k stars) and Basercms5 Development (baserproject/basercms, 190 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Interaction Flow 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.