Add Icon Mapping
lobehub/lobe-icons
Add or modify icon keyword mappings for providers, models, or agents in lobe-icons.
Enforce the Campfire pattern for feature modules to react to Audiobookshelf socket events.
$ npx skills add r0adkll/Campfire --skill socket-event-listener -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install r0adkll/Campfire socket-event-listener --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/r0adkll/Campfire.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/socket-event-listener .claude/skills/socket-event-listener && rm -rf skills-srcUse ~/.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/
Install the "socket-event-listener" agent skill from https://github.com/r0adkll/Campfire/tree/main/.claude/skills/socket-event-listener into .claude/skills/socket-event-listener/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "socket-event-listener", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/r0adkll/Campfire/tree/main/.claude/skills/socket-event-listenerType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add r0adkll/Campfire --skill socket-event-listener -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install r0adkll/Campfire socket-event-listener --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/r0adkll/Campfire.git skills-src && mkdir -p .agents/skills && cp -r skills-src/.claude/skills/socket-event-listener .agents/skills/socket-event-listener && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "socket-event-listener" agent skill from https://github.com/r0adkll/Campfire/tree/main/.claude/skills/socket-event-listener into .agents/skills/socket-event-listener/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "socket-event-listener", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add r0adkll/Campfire --skill socket-event-listener -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install r0adkll/Campfire socket-event-listener --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/r0adkll/Campfire.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/.claude/skills/socket-event-listener .cursor/skills/socket-event-listener && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "socket-event-listener" agent skill from https://github.com/r0adkll/Campfire/tree/main/.claude/skills/socket-event-listener into .cursor/skills/socket-event-listener/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "socket-event-listener", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/r0adkll/Campfire.git --path .claude/skills/socket-event-listener--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add r0adkll/Campfire --skill socket-event-listener -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install r0adkll/Campfire socket-event-listener --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/r0adkll/Campfire.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/.claude/skills/socket-event-listener .gemini/skills/socket-event-listener && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "socket-event-listener" agent skill from https://github.com/r0adkll/Campfire/tree/main/.claude/skills/socket-event-listener into .gemini/skills/socket-event-listener/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "socket-event-listener", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install r0adkll/Campfire socket-event-listenerInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add r0adkll/Campfire --skill socket-event-listener -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/r0adkll/Campfire.git skills-src && mkdir -p .github/skills && cp -r skills-src/.claude/skills/socket-event-listener .github/skills/socket-event-listener && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "socket-event-listener" agent skill from https://github.com/r0adkll/Campfire/tree/main/.claude/skills/socket-event-listener into .github/skills/socket-event-listener/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "socket-event-listener", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add r0adkll/Campfire --skill socket-event-listener -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install r0adkll/Campfire socket-event-listener --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/r0adkll/Campfire.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/.claude/skills/socket-event-listener .opencode/skills/socket-event-listener && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "socket-event-listener" agent skill from https://github.com/r0adkll/Campfire/tree/main/.claude/skills/socket-event-listener into .opencode/skills/socket-event-listener/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "socket-event-listener", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
socket-event-listenerEnforce the Campfire pattern for feature modules to react to Audiobookshelf socket events.
Socket Event Listener is an agent skill from r0adkll/Campfire. Enforce the Campfire pattern for feature modules to react to Audiobookshelf socket events. Feature impl modules contribute a SocketEventListener via @ContributesIntoSet(UserScope::class, binding = binding<SocketEventListener()) — no Scoped, no CoroutineScopeHolder injection, no flow collection, no edits to :infra:socket:impl. Trigger when authoring or reviewing a class that reacts to socket events, or when asked to "wire X to socket events" / "add a socket listener for Y".
Its SKILL.md is about 2.5k 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 Mobile. It works with React. The repository describes itself as: A KMP Compose app for Audiobookshelf. The licence is GPL-3.0.
5 steps, taken from the first numbered list in SKILL.md.
Read from SKILL.md and the folder at commit 2fde7e5. It shows what the files ask for, not the result of running them.
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.
Shell commands in SKILL.md call:
rgFrom the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Socket Event Listener loads about 2.5k tokens when it runs. Until then it costs about 128 tokens; SKILL.md has 858 words of instructions outside code blocks.
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.
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.
The full file from r0adkll/Campfire at commit 2fde7e5, republished under its GPL-3.0 licence (© r0adkll). 858 words, ~2,490 tokens.
.claude/skills/socket-event-listener/SKILL.md (or your agent's skills folder).Feature modules subscribe to socket events by contributing a SocketEventListener from their own impl module. The central dispatcher in :infra:socket:impl owns all collection, lifecycle, and error-handling — listeners are pure business logic.
// :features:user:impl/.../MediaProgressSocketListener.kt
@ContributesIntoSet(UserScope::class, binding = binding<SocketEventListener>())
@Inject
class MediaProgressSocketListener(
private val mediaProgressRepository: MediaProgressRepository,
) : SocketEventListener {
override suspend fun handle(event: SocketEvent) {
when (event) {
is UserItemProgressUpdated -> mediaProgressRepository.upsert(event.payload.data)
else -> Unit
}
}
}That's the whole shape. No init blocks, no coroutine launching, no socketManager injection.
:infra:socket:impl. Feature reactions live with the feature they belong to.Set<SocketEventListener> and launches one collector coroutine per listener at UserScope creation. New consumers ship in one file.handle() in runCatching and logs failures — a single bad event can't permanently kill a listener.: SocketEventListener across the repo.In the feature module that owns the domain it's updating. Examples:
| Event(s) | Owning module |
|---|---|
UserItemProgressUpdated, UserSessionClosed | :features:user:impl |
ItemAdded, ItemUpdated, ItemRemoved, ItemsAdded, ItemsUpdated, LibraryAdded, LibraryUpdated, LibraryRemoved | :features:libraries:impl |
SeriesAdded/Updated/Removed | :features:series:impl |
CollectionAdded/Updated/Removed | :features:collections:impl |
AuthorAdded/Updated/Removed | :features:author:impl |
PlaylistAdded/Updated/Removed | :features:playlists:impl |
EpisodeAdded, EpisodeDownload* | :features:podcasts:impl |
UserUpdated | :data:account:impl |
NotificationsUpdated | wherever notification settings are managed |
A feature that touches multiple event families is fine — one listener class can when-switch over several events. Don't make multiple listener classes just to fragment a when block.
@ContributesIntoSet(UserScope::class, binding = binding<SocketEventListener>()) and @Inject. Without the annotation Metro won't register the binding and the dispatcher silently won't call it.SocketManager, CoroutineScopeHolder, or anything socket-related.when or early-return if !is. Every listener gets every event — that's intentional. Return Unit for events you don't care about (or omit the else branch if your when is exhaustive over the events you handle).handle() fast. It runs sequentially per listener — a 500ms handle delays the next event for that listener. For genuinely slow work, dispatch to a separate component or coroutine (rare in practice; repo upserts are sub-millisecond).handle() in runCatching and logs failures with the listener class name and event. If you have invariants that must hold, throw — you'll see it in logs.If you're adding a new SocketEvent (not consuming one), one rule travels with it:
If the payload extends app.campfire.network.models.NetworkModel or app.campfire.network.envelopes.Envelope, override applyOrigin(origin: RequestOrigin) and propagate to the payload. The dispatcher calls event.applyOrigin(RequestOrigin.Url(serverUrl)) immediately after decoding so downstream DB inserts (which inspect NetworkModel.origin for cover URLs, signed-stream headers, etc.) see the right server. The default on SocketEvent is a no-op, so forgetting silently loses metadata — DB rows end up with RequestOrigin.None and any code that builds absolute URLs from origin breaks.
// ✅ Single object payload
data class LibraryUpdated(val library: Library) : SocketEvent {
override fun applyOrigin(origin: RequestOrigin) = library.applyOrigin(origin)
/* ... */
}
// ✅ List payload — fan out
data class ItemsUpdated(val items: List<LibraryItemExpanded>) : SocketEvent {
override fun applyOrigin(origin: RequestOrigin) = items.forEach { it.applyOrigin(origin) }
/* ... */
}
// ✅ Envelope wrapping a NetworkModel — reach through
data class UserItemProgressUpdated(val payload: UserItemProgressUpdatedPayload) : SocketEvent {
override fun applyOrigin(origin: RequestOrigin) = payload.data.applyOrigin(origin)
/* ... */
}
// ✅ Plain payloads (Series, User, PodcastEpisode, your own *Payload types) — no override needed.
data class SeriesAdded(val series: Series) : SocketEvent { /* ... */ }Audit rule of thumb: if the payload field's type extends NetworkModel (directly or via Envelope), the event needs an applyOrigin override. Grep:
rg -l ': NetworkModel\(\)|: Envelope\(\)' data/network/api --type kt…and check that every event whose payload type appears in that list has the override.
Adding the listener in :infra:socket:impl. Don't. Socket impl is generic plumbing only; the only listener that lives there is the universal SocketEventLogger.
// ❌ DON'T: infra/socket/impl/.../MyFeatureListener.ktImplementing Scoped and rolling your own collect. This was the pre-dispatcher pattern. With the dispatcher, it duplicates work and creates a second collector subscribed to the same SharedFlow.
// ❌ DON'T
@ContributesIntoSet(UserScope::class, binding = binding<Scoped>())
class MyFeatureListener(
private val socketManager: SocketManager,
@ForScope(UserScope::class) private val scopeHolder: CoroutineScopeHolder,
private val repo: MyRepo,
) : Scoped {
override suspend fun onCreate() {
scopeHolder.get().launch {
socketManager.events.filterIsInstance<MyEvent>().collect { repo.upsert(it) }
}
}
}Injecting SocketManager directly. The point of the dispatcher is that listeners never see the socket — they get events handed to them. Injecting it means you're about to bypass the dispatcher.
One listener per event type. Five Removed events from the library family don't need five listener classes. One LibraryCacheInvalidator : SocketEventListener with a when block covering all of them is clearer and bundles related cache invalidation into one place.
// ✅ Preferred — one listener, multi-event when
override suspend fun handle(event: SocketEvent) {
when (event) {
is ItemAdded, is ItemUpdated, is ItemRemoved,
is ItemsAdded, is ItemsUpdated -> libraryStore.invalidate()
is LibraryAdded, is LibraryUpdated, is LibraryRemoved -> libraryListStore.invalidate()
else -> Unit
}
}Throwing as a signal. throw IgnoreEvent() to skip an event is wrong — just return/Unit. Throws go to the dispatcher's error log.
Mutating shared state without synchronization. Multiple listeners run in parallel coroutines. If two listeners write to the same in-memory cache, you need a Mutex or atomic primitives. Most repos / Stores already handle this internally — but if you're rolling your own, beware.
socketManager.events.collect. Events flow into all listeners concurrently.handle() calls are sequential — event N must finish before event N+1 starts for that listener.MutableSharedFlow has extraBufferCapacity = 64. If your listener falls behind by >64 events, tryEmit upstream starts returning false and events get dropped at the source for all listeners. In practice this never happens for socket events, but don't do anything in handle() that takes seconds.<feature> to react to <event> updates" → drop a SocketEventListener impl in the feature's impl module.:infra:socket:impl to add feature-specific reactions → push back; that work belongs in the feature module.events.filterIsInstance<X>().collect { ... } subscriber (if any exist) → consolidate it into a SocketEventListener.# Find all socket consumers
rg -l ': SocketEventListener' --type kt -g '!*/build/*'
# Find manual subscribers that should be migrated to the dispatcher
rg 'socketManager\.events' --type kt -g '!*/build/*' -g '!*/infra/socket/*'The latter should return zero hits outside :infra:socket:impl (the dispatcher itself) and the test module. Any hit elsewhere is a pre-dispatcher subscriber that should be refactored to a SocketEventListener.
© r0adkll, GPL-3.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
Just SKILL.md in .claude/skills/socket-event-listener of r0adkll/Campfire.
Open the folder on GitHubat commit 2fde7e5
Socket Event Listener 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.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Socket Event Listener this skillr0adkll/Campfire | 140 | — | ~2.5k | Automated safety check: Pass | GPL-3.0 | |
| Add Icon Mappinglobehub/lobe-icons | 2.6k | — | ~1.5k | Automated safety check: Warn | MIT | |
| Add Featureecency/vision-mobile | 262 | — | ~1.9k | Automated safety check: Pass | MIT | |
| ThemingCode-with-Beto/skills | 140 | — | ~2.5k | Automated safety check: Pass | None | |
| React Native Experttech-leads-club/agent-skills | 7k | — | ~3.2k | Automated safety check: Pass | CC-BY-4.0 | |
| Frontend Optimistic Mutationssickn33/agentic-awesome-skills | 47k | 1 repos | ~3.6k | Automated safety check: Pass | MIT |
lobehub/lobe-icons
Add or modify icon keyword mappings for providers, models, or agents in lobe-icons.
ecency/vision-mobile
A skill your agent uses when adding a new screen, route, or user-facing feature to the Ecency mobile React Native app, covering navigator registration, route params, i18n strings and styling.
Code-with-Beto/skills
Scaffold a unified, cross-platform color theme system into an Expo Router app.
tech-leads-club/agent-skills
Guides React Native and Expo work for cross-platform apps: Expo Router navigation, fast lists, Reanimated animation, platform-specific code and project structure.
sickn33/agentic-awesome-skills
A portable, framework-agnostic discipline for the write path of any React or React Native app using a query/cache layer.
sickn33/agentic-awesome-skills
A portable, framework-agnostic architecture style for any React or React Native frontend.
r0adkll/Campfire
Open, describe, and maintain pull requests in Campfire, especially stacks of dependent PRs (each branch built on the one before).
r0adkll/Campfire
Enforce the Compose guideline that every @Composable function must declare modifier: Modifier = Modifier as its first optional parameter and apply it to the root layout.
r0adkll/Campfire
Rules and reliable local tests for keeping Campfire's foss flavor F-Droid-compatible — a clean source scan (using scandelete, never scanignore) and a byte-for-byte reproducible build.
r0adkll/Campfire
Extract hardcoded user-facing string literals from a Jetpack Compose / Compose Multiplatform file into the owning module's composeResources/values/<modulestrings.xml, then replace each call site…
r0adkll/Campfire
Enforce the Campfire IconButton accessibility convention — every IconButton (and its derivatives) must be wrapped with IconButtonTooltip and given a localized action label.
r0adkll/Campfire
Campfire Compose UI conventions. An agent skill from r0adkll/Campfire.
Works with
Categories
Enforce the Campfire pattern for feature modules to react to Audiobookshelf socket events. Socket Event Listener is an agent skill from r0adkll/Campfire. Enforce the Campfire pattern for feature modules to react to Audiobookshelf socket events.
Socket Event Listener fits situations like: reviewing a class that reacts to socket events; asked to wire X to socket events / add a socket listener for Y.
Run `npx skills add r0adkll/Campfire --skill socket-event-listener -a claude-code`. Or copy the skill folder (.claude/skills/socket-event-listener in r0adkll/Campfire) into .claude/skills/socket-event-listener in your project. Claude Code loads it when a task matches its description.
Run `npx skills add r0adkll/Campfire --skill socket-event-listener -a codex`. Or copy the skill folder (.claude/skills/socket-event-listener in r0adkll/Campfire) into .agents/skills/socket-event-listener in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add r0adkll/Campfire --skill socket-event-listener -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/socket-event-listener, .gemini/skills/socket-event-listener, .github/skills/socket-event-listener and .opencode/skills/socket-event-listener in your project.
Going by SKILL.md and its folder, Socket Event Listener needs the command-line tools its instructions call (rg).
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.
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.
Socket Event Listener is published under the GPL-3.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 2.5k tokens (SKILL.md is roughly 10k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with Socket Event Listener: Add Icon Mapping (lobehub/lobe-icons, 2.6k stars), Add Feature (ecency/vision-mobile, 262 stars), Theming (Code-with-Beto/skills, 140 stars) and React Native Expert (tech-leads-club/agent-skills, 7k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
r0adkll (a GitHub user) maintains it in r0adkll/Campfire, which has 140 GitHub stars. The repository holds 9 skills in this directory. The repository was last updated on October 9, 2026.
Source: r0adkll/Campfire on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.