/memfleet-skills:memfleet-subscribefrom memfleet-skills
Registers a streaming subscription for episode notifications filtered by symbol, module, or intent kind. For long-running agents; replaces polling with push semantics.
Ships in memfleet-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Register a long-lived subscription with the broker. The broker pushes episode notifications through the MCP notification channel — filtered, coalesced, and budget-limited by the broker's subscription router.
Use this for any agent that stays resident across more than one edit. Replaces tight query_episodes polling loops with push semantics.
Phase-1 caveat: Subscription push is stub in Phase-1, and there is no
unsubscribetool — subscriptions expire implicitly when the MCP session ends. Until Phase-2 lands real push +unsubscribe, fall back toquery_episodeswith a cursor as the reliable streaming pattern. See "Verifying push works" below.
| Tool | Purpose |
|---|---|
subscribe | Register a long-lived notification channel; returns sub_id |
query_episodes | Phase-1 fallback when push is stub; cursor-based polling |
Parameter types: MCP parameters are strictly typed.
quiet_period_msandbudgetMUST be JSON numbers.intent_kindsis an array of enum-shaped objects, not flat strings.
The narrower the filter, the lower the noise. Combine any subset:
| Filter field | Type | Example |
|---|---|---|
symbols | string array | ["UserRoleRepo.find", "UserSessionService.check"] |
modules | string array (prefixes) | ["auth/", "billing/"] |
intent_kinds | enum array | [{"Refactor": {}}, {"BugFix": {}}] |
quiet_period_ms | integer | 5000 (debounce — coalesce notifications fired within this window) |
subscribemcp__memfleet__subscribe({
repo_id: "my-repo",
filter: { modules: ["auth/"], intent_kinds: [{"Refactor": {}}] },
budget: 100 // max notifications per minute
})
Parameters:
repo_id — string, required.filter — object, optional but strongly recommended (no filter = firehose).budget — integer, optional. Per-minute cap on notifications. Default 60. The broker drops the oldest when exceeded.Success criteria: the broker returns sub_id. Notifications begin arriving on the MCP notification channel (where supported by your harness).
on notification(n):
if n.intent_kind in {Refactor(RenameSymbol), Cleanup(DeadCode)}:
invalidate_local_cache(n.touched_nodes)
elif n.conflict_class == "C":
alert_human(n)
else:
update_dashboard(n)
Notifications carry the same shape as query_episodes results — episode metadata, intent kind, conflict class, touched nodes, agent_id.
# Kickoff probe: call subscribe, then immediately record a tiny Exploratory
# episode and watch for the notification.
sub_id = subscribe({...})
record_episode({
intent_id: <a fresh probe intent>,
diff_summary: "Exploratory",
touched_nodes: ["__sub_probe__"]
})
# wait up to 5s for the notification
If the notification never arrives, push is stub — fall back to query_episodes with a cursor (see memfleet-query-episodes).
| Situation | Action |
|---|---|
| One-shot edit, single agent | Skip subscribe; use get_node_state + record_episode |
| Long-running agent (any kind) | Subscribe at session start with the narrowest useful filter |
| Follower role in a leader/follower wave | Subscribe with intent_kinds: [Refactor, FeatureAdd] and the wave's module scope; filter further by correlation tag in your handler |
| Ops dashboard watching everything | Subscribe with no symbols / modules filter but cap with budget to avoid firehose |
| Push verification fails (Phase-1) | Drop to query_episodes polling with a since cursor |
| MCP session is about to end | No unsubscribe in Phase-1 — subscription dies with the session |
| Mistake | Reality |
|---|---|
| Subscribing without a filter | You get the firehose. Always filter by module / intent kind / symbol. |
| Subscribing for a one-shot edit | Use get_node_state instead — subscriptions are for resident agents. |
Quoting quiet_period_ms or budget as strings | Must be JSON numbers. |
Passing flat strings in intent_kinds ("Refactor" instead of {"Refactor": {}}) | Schema rejects flat strings. Use the JSON-object form. |
| Assuming notifications arrived (Phase-1 push is stub) | Run the kickoff probe (Step 4) to verify. If push doesn't fire, poll. |
| Hoping the broker will deduplicate across overlapping subscriptions | It won't. Pick one filter shape per session. |
Setting budget too low | The broker drops the oldest when exceeded. Low budget = lost notifications under load. |
Looking for an unsubscribe tool in Phase-1 | Doesn't exist yet. Subscriptions die with the MCP session. |
This is the streaming primitive. Pair with:
memfleet-query-episodesmemfleet-node-statememfleet-fleet-coordinationWhat SKILL.md sets; muted values are Claude Code's defaults
10 skills in this plugin
/memfleet-conflict-resolutionAlways use when publish_intent returned a non-empty active_conflicts list, or when record_episode classified the result as Class B (you may have lost LWW) or Class C (blocked). Triggered by: 'publish_intent returned conflicts', 'I got a Class B and lost', 'Class C blocker_agent', 'who is blocking my edit', deciding whether to retry, replan, or escalate. Do not retry blindly on Class B without reading replan_hint, do not edit through a Class C — it will break active callers — and do not invent a prose 'rationale'; structural conflicts get structural resolutions./memfleet-firstAlways use FIRST in any multi-agent session before reading code, planning a refactor, or making an edit on a repo with a registered MemFleet broker. Triggered by: 'I'm about to edit X', 'rename Y across the fleet', 'plan this refactor', joining a running fleet session, coordinating with other agents, prose hand-offs between agents. Do not write a prose rationale for an edit, do not grep for 'who else might be touching this', and do not skip publish_intent because 'it's just a small change'. Empty fleet_status is not permission to skip the protocol — it just means you're the first agent in this window. Skip ONLY for solo-agent sessions with no broker registered or for pure docs-only edits where coordination has zero value.npx claudepluginhub syncable-dev/memfleet-public --plugin memfleet-skillsOther plugins' skills for the same job