firstmate: Skill for Claude Code

.agents/skills/process-event-sources/SKILL.md

process-event-sources is a skill for Claude Code from kunchenguid/firstmate. It costs 68 tokens per session (3,988 once invoked), scanned A, original, MIT.

A procedure for handling external processes that run for a long time and notify an agent when they finish or meet a condition.

In plain words
What is it for?
Arming long-polling sources, registering condition-based watches, and processing wake-up signals and captured answers.
Why use it?
It prevents a waiting process from blocking the agent's conversation and keeps its results connected to the right task.

Skill for Claude Code

Written for Claude Code: user-invocable in frontmatter. Also seen: installed under .agents/ (shared by several agents).

This is kunchenguid/firstmate's own configuration. It tells Claude Code how to work on firstmate itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything firstmate configures →

About the project

firstmate is an agent distribution that lets one coding agent coordinate a crew of autonomous agents working in separate git worktrees. It is for running parallel fixes, investigations, plans, and audits while receiving completed pull requests, merges, or reports through one supervising agent. The catalogue entries provide skills, hooks, instructions, and settings for operating this workflow.

kunchenguid/firstmate · 8,295 stars · on GitHub

Reuse

Borrowing it

Nothing to install: this file belongs to kunchenguid/firstmate. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/kunchenguid/firstmate/main/.agents/skills/process-event-sources/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/kunchenguid/firstmate

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for process-event-sources

README.md
[![agentmods](https://agentmods.dev/badge/skills/kunchenguid/firstmate/process-event-sources/github.svg)](https://agentmods.dev/skills/kunchenguid/firstmate/process-event-sources)
Your own site
<a href="https://agentmods.dev/skills/kunchenguid/firstmate/process-event-sources"><img src="https://agentmods.dev/badge/skills/kunchenguid/firstmate/process-event-sources/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for process-event-sources

Your own site · 80×15
<a href="https://agentmods.dev/skills/kunchenguid/firstmate/process-event-sources"><img src="https://agentmods.dev/badge/skills/kunchenguid/firstmate/process-event-sources.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 68 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,988 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00068 $0.03988
Opus 5.5 $0.00027 $0.01595
Sonnet 5.5 $0.00014 $0.00798
Haiku 4.5 $0.00007 $0.00399

Measured 4d ago against content hash d7559f0d900c, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

process-event-sources scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.agents/skills/process-event-sources/SKILL.md · 160 lines

How it starts

The opening of the file, as written. The whole thing — 160 lines — stays where its author put it; the contents beside it link to each section on GitHub.

process-event-sources

Load this before arming a long-polling source, before registering a deterministic condition->action watch, whenever a check: wake carries procevent <adapter> <source-id> <sequence>, and whenever the watcher headlines a process-event source stranded or process-event source failed to start wake.

The runner exists so a blocking external process never holds firstmate's conversational turn. Firstmate registers a source, keeps working, and is woken when that process completes.

Arming a source

Use the adapter, not the generic runner, for a real source. Before either Lavish arm form below, open the artifact with lavish-axi so its saved session can route the listener; the operating contract owns the prerequisite and refusal boundary. For a Lavish review artifact firstmate owns:

bin/fm-procevent-lavish.sh arm <artifact.html>

A worker-owned board uses bin/fm-procevent-lavish.sh arm <artifact.html> --for <task-id> and re-arms with its reply after each nonterminal round; the existing handled marker is the acknowledgement. Arm it once, then re-arm only when a round is actually waiting: arming again with nothing to acknowledge is refused. A terminal round is never re-armed: the board stays yours until you acknowledge it with bin/fm-procevent.sh handled <source-id> <sequence>, which retires it, and until then retire refuses the board too. Never arm a board that a live task hosts; follow the crew-hosted Lavish board contract for reply acceptance and older-version limits.

Registering a source is not the same fact as listening to it. Lavish arm waits until this registration's listener is confirmed running and does not report ready without that evidence; other adapters still record the source for the watcher's next reconcile. When an earlier registration's listener still holds the board as the confirm window ends, Lavish arm prints still-listening instead of armed; that listener keeps serving the board, and the new registration takes effect only after you retire the source and arm it again. After arming by hand, confirm bin/fm-procevent.sh list reports that source as live, and run bin/fm-procevent.sh reconcile when it does not. Reconcile reports every launch that did not prove it took its claim within the confirm window as failed= and exits non-zero, so a source that cannot be started says so instead of looking armed, and it wakes you once per failure episode about it because the watcher discards that count; start does not fix that - if the source stays unowned, run start attached to read the runner's refusal, then check the source command and adapter binary the registration names, and if a later reconcile finds the source owned the episode closes on its own. A source list reports as orphaned is one reconcile will not relaunch, because something may still be polling it; reconcile wakes you once about it, and that wake's payload says which of two recoveries applies. If the claim's recorded pid is alive under a different identity, bin/fm-procevent.sh start <source-id> takes the source back once you have checked nothing is still polling it - provided the dead generation's reservation records can still be tidied; otherwise it refuses with cannot claim source. If the runner itself died and its process group survives, start reports already owned and takes nothing back: verify whether the dead runner's polling child is still attached to the source, and once that group is empty the next reconcile reclaims the source on its own. Nothing signals that group automatically.

Read the full file on GitHub · 160 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 4d ago Changed · -9 lines · -62 tokens per session d7559f0d900c
  2. 24d ago Changed · -2 lines · -8 tokens per session 8dbb5c3b3ea5
  3. 26d ago Changed 5489a29d6b88
  4. 1mo ago Changed · +2 lines 4c0e477dcd6d
  5. 1mo ago Changed · +1 lines 199825132b06
  6. 1mo ago Changed · +11 lines a9e8c03da630
  7. 1mo ago Changed · +3 lines 09683b92ddd0
  8. 1mo ago Changed · +14 lines · +20 tokens per session 6870d017a564
  9. 1mo ago Changed · +2 lines 5bbfc968a3bf
  10. 1mo ago First seen · 138 lines · 118 tokens per session scan A be780cd573c5

Subscribe to this mod's changes

process-event-sources is a skill published in the GitHub repository kunchenguid/firstmate (8,295 stars, last pushed today), licensed MIT. It adds 68 tokens to every session and 3,988 once invoked, about $0.0003 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

local-ai-agents

Build local-first AI agents that run entirely on a developer workstation with Microsoft Foundry Local and Qwen function-calling models. Covers Small Language Models (SLMs), the OpenAI-compatible local endpoint, sandboxed local tools, local RAG with Chroma, local MCP servers, hybrid cloud/local routing, and the…

microsoft/ai-agents-for-beginners · 200 tokens

systematic-debugging

Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes.

obra/superpowers · 21 tokens

next-cache-components-adoption

Turn on Cache Components in a Next.js app and resolve the blocking routes it surfaces. Use when the user wants to enable, adopt, or migrate to Cache Components, flip the cacheComponents flag, work through a flood of blocking-prerender / instant validation errors, run the cache-components-instant-false codemod, or…

vercel/next.js · 95 tokens

chronicle

Analyze Copilot session history for standup reports, usage tips, session search, and session reindexing. Use when the user asks for a standup, daily summary, usage tips, workflow recommendations, wants to search or find past sessions by keyword/file/PR, wants to reindex their session store, or asks about deleting…

microsoft/vscode · 72 tokens

chat-pet-sprite-creation

Use when creating or changing VS Code chat pet sprite art, sprite sheets, state animations, eye treatments, Stable/Insiders variants, or pet transitions under src/vs/workbench/contrib/chat/browser/widget/media/chatPet.

microsoft/vscode · 53 tokens

component-fixtures

Use when creating or updating component fixtures for screenshot testing or their shared infrastructure, or when designing UI components to be fixture-friendly. Covers fixture file structure, theming, service setup, CSS scoping, async rendering, validation, and common pitfalls.

microsoft/vscode · 53 tokens