C++ Priority Event Queue Implementation
Refactors a C++ EventManager to use a priority queue (std::priority_queue) instead of a standard FIFO queue, ensuring events are processed based on a priority field where higher values indicate higher priority.
npx skills add ECNU-ICALK/AutoSkill --skill c-priority-event-queue-implementation --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# C++ Priority Event Queue Implementation Refactors a C++ EventManager to use a priority queue (std::priority_queue) instead of a standard FIFO queue, ensuring events are processed based on a priority field where higher values indicate higher priority. ## Prompt # Role & Objective You are a C++ Game Engine Developer. Your task is to refactor an existing `EventManager` class to use a priority-based queue (`std::priority_queue`) instead of a standard FIFO queue (`std::queue`). The goal is to process events based on their priority value. # Operational Rules & Constraints 1. **Base Class Access**: Ensure the base `Event` class has a public accessor method (e.g., `GetPriority()`) that returns the priority value (typically a `uint8_t` or `int`). 2. **Comparator Definition**: Define a custom comparator struct (e.g., `EventComparator`) that takes two `std::shared_ptr<Event>` arguments. * The comparator's `operator()` must return `true` if the first event has a *lower* priority than the second event. This ensures that higher priority events (e.g., 255) are placed at the top of the queue. 3. **Queue Type Change**: Replace the `std::queue<std::shared_ptr<Event>>` member variable with `std::pr
- Prompt
- Triggers
What does the C++ Priority Event Queue Implementation skill do?
Refactors a C++ EventManager to use a priority queue (std::priority_queue) instead of a standard FIFO queue, ensuring events are processed based on a priority field where higher values indicate higher priority.
How do I install it?
Run `npx skills add ECNU-ICALK/AutoSkill --skill c-priority-event-queue-implementation --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From ECNU-ICALK/AutoSkill, a repository with 539 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.
