Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Fire-and-forget topic pub/sub: broadcast an event with `publish` and every matching `subscribe` trigger receives it. Use for real-time notifications where missed events are acceptable.
.claude/skills/iii-hq-iii-pubsub/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-01 | ✗→✓ | ▲ Improved | -6% | 0% |
| case-02 | ✗→✓ | ▲ Improved | -15% | 0% |
| case-03 | ✗→✓ | ▲ Improved | -11% | 0% |
| case-04 | ✗→✓ | ▲ Improved | -39% | 0% |
| case-05 | ✗→✓ | ▲ Improved | -4% | 0% |
The iii-pubsub worker is topic-based publish/subscribe messaging. Publish an event to a named topic with the publish function and every registered subscribe trigger whose topic matches is invoked with the raw payload — no envelope, no persistence, no retries. It is fire-and-forget broadcast: subscribers receive each event as it arrives, and a subscriber that is offline simply misses it.
The worker exposes one callable function (publish, registered with the bare function id "publish" — no namespace prefix) and one trigger type (subscribe). Two adapters: local (default; in-memory broadcast channels; only delivers to subscribers in this engine process; no external dependency) and redis (redis_url: ${REDIS_URL:redis://localhost:6379}; uses Redis Pub/Sub so events propagate across multiple engine instances).
redis adapter).iii-queue (topic mode, durable:subscriber) when every consumer must process every event.publish returns topic_not_set, and a subscribe trigger registered with an empty topic never fires.iii-state or iii-stream instead — iii-pubsub carries discrete events, not state.publish — broadcast an event to a topic; every subscribe trigger on that exact topic receives the raw data. Empty topic returns topic_not_set.Bind a subscribe trigger when a function should run every time publish broadcasts to a configured topic. The handler receives the raw data value from the publish call directly — no envelope. Multiple triggers can subscribe to the same topic; each gets an independent copy (true fan-out).
Reach for it when:
redis adapter.If subscribers must reliably process every event with retries and dead-letter handling, use iii-queue's durable:subscriber instead — subscribe is fire-and-forget.
iii.registerFunction('notifications::on-order-shipped', handler).typescriptiii.registerTrigger({ type: 'subscribe', function_id: 'notifications::on-order-shipped', config: { topic: 'orders.shipped', // required, non-empty. Exact match only — no wildcards. }, })
The handler receives the published data unchanged, with no topic field; if one handler serves multiple topics, embed the topic inside data at publish time. The handler's return value is ignored and there is no retry.
For the published payload shape, call iii get function info on publish or the handler function id.
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-01 | fail→pass | 10,182 | 5,775 | -43% | 1 | 1 | 0% | 2,034 | 1,920 | -6% | 0 | 0 | — |
case-02 | fail→pass | 12,771 | 7,488 | -41% | 1 | 1 | 0% | 2,718 | 2,319 | -15% | 0 | 0 | — |
case-03 | fail→pass | 13,175 | 7,731 | -41% | 1 | 1 | 0% | 2,533 | 2,255 | -11% | 0 | 0 | — |
case-04 | fail→pass | 11,094 | 2,747 | -75% | 1 | 1 | 0% | 2,096 | 1,278 | -39% | 0 | 0 | — |
case-05 | fail→pass | 8,807 | 4,598 | -48% | 1 | 1 | 0% | 1,759 | 1,687 | -4% | 0 | 0 | — |
case-06 | fail→pass | 8,669 | 2,447 | -72% | 1 | 1 | 0% | 1,543 | 1,259 | -18% | 0 | 0 | — |
case-07 | fail→pass | 12,792 | 4,132 | -68% | 1 | 1 | 0% | 2,405 | 1,603 | -33% | 0 | 0 | — |
case-08 | pass→pass | 14,737 | 3,292 | -78% | 1 | 1 | 0% | 2,526 | 1,273 | -50% | 0 | 0 | — |
case-09 | pass→pass | 10,965 | 2,842 | -74% | 1 | 1 | 0% | 1,900 | 1,239 | -35% | 0 | 0 | — |
case-10 | pass→pass | 7,164 | 2,252 | -69% | 1 | 1 | 0% | 1,288 | 1,166 | -9% | 0 | 0 | — |
case-11 | pass→pass | 3,987 | 1,612 | -60% | 1 | 1 | 0% | 863 | 1,044 | +21% | 0 | 0 | — |
case-17 | fail→pass | 15,071 | 6,636 | -56% | 1 | 1 | 0% | 2,329 | 1,685 | -28% | 0 | 0 | — |
case-12 | pass→pass | 9,467 | 2,557 | -73% | 1 | 1 | 0% | 1,738 | 1,237 | -29% | 0 | 0 | — |
case-13 | fail→pass | 19,119 | 4,190 | -78% | 1 | 1 | 0% | 1,794 | 1,736 | -3% | 0 | 0 | — |
case-14 | fail→pass | 13,490 | 6,767 | -50% | 1 | 1 | 0% | 2,006 | 1,103 | -45% | 0 | 0 | — |
case-15 | fail→pass | 18,503 | 2,345 | -87% | 1 | 1 | 0% | 2,983 | 1,076 | -64% | 0 | 0 | — |
case-16 | fail→pass | 17,451 | 7,444 | -57% | 1 | 1 | 0% | 2,316 | 2,128 | -8% | 0 | 0 | — |
case-18 | pass→pass | 8,803 | 5,064 | -42% | 1 | 1 | 0% | 1,477 | 1,655 | +12% | 0 | 0 | — |
case-19 | fail→pass | 21,786 | 5,898 | -73% | 1 | 1 | 0% | 3,064 | 1,788 | -42% | 0 | 0 | — |
case-20 | fail→pass | 16,200 | 5,490 | -66% | 1 | 1 | 0% | 2,665 | 1,711 | -36% | 0 | 0 | — |
case-21 | fail→fail | 16,529 | 4,707 | -72% | 1 | 1 | 0% | 2,648 | 1,640 | -38% | 0 | 0 | — |
case-22 | fail→pass | 9,804 | 4,819 | -51% | 1 | 1 | 0% | 1,945 | 1,761 | -9% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 22 cases were attempted. The headline lift of +68 percentage points is the difference between those two pass rates over the 22 comparable cases.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.