agentleFS
abhaylaabhayla/claude-best-practices/.claude/skills/platform-event-live-probe/SKILL.md

platform-event-live-probe

Skill9 starsChanged 7 months agoMITView on GitHub

Live-probe a platform event or API surface BEFORE building on it — prove the event fires and its payload reaches the exact consumer you plan to use, with a minimal tracer. Use before wiring a new Claude Code hook event, SDK callback, webhook, or any documented-but-unverified platform behavior. A documented event name is not delivery. (The after-build half of this discipline — verifying a change you already made landed at its consumer — is /verify-effect-at-destination.)

The file

We split this skill into the rules it gives an agent

11 rules. About 0 are common, 11 are distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈11

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Write the assumption as one falsifiable sentence:

    line 25
  2. Distinctive:

    If the sentence contains "should" or "according to docs", that is exactly why the probe exists — docs describe intent.

    line 31
  3. Distinctive:

    Create the smallest artifact that can prove or refute the assumption — NOT the real feature:

    line 36
  4. Distinctive:

    Always run the probe against the REAL trigger, not a direct invocation of the handler — Why: direct execution passed on the hook whose …

    line 84
  5. Distinctive:

    Always test delivery to the exact consumer you will build for — Why: payloads can reach the event's own subject yet never reach the parent …

    line 86
  6. Distinctive:

    Always include the platform version in the recorded result — Why: results expire.

    line 88
  7. Distinctive:

    Always keep a refuted assumption's artifact unwired-with-a-note rather than deleting it — Why: the re-wire condition ("when SubagentStop …

    line 90
  8. Distinctive:

    MUST NOT ship the real implementation and the probe as one change — probe first, build second — Why: the combined path is how two hub …

    line 96
  9. Distinctive:

    MUST NOT extrapolate one event's delivery semantics to a sibling event — probe each — Why: SessionStart and SessionEnd have materially …

    line 98
  10. Distinctive:

    MUST NOT accept "the docs say it works" from anyone (including yourself) as a probe substitute — run STEP 3 instead — Why: both recorded …

    line 100
  11. Distinctive:

    MUST NOT leave a yes-fired/no-delivered result unrecorded — write the platform gap down — Why: unrecorded gaps get rediscovered at full …

    line 102

≈ “Common” is an estimate: at least 1 in 5 of the 372,429 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Platform Event Live Probe

Build the tracer before the feature. The hub wired SubagentStop governance on the documented event, shipped it, and later live-testing proved the event fires but its additionalContext never reaches the parent loop — the whole mechanism was reverted as "governance theater" (a 3-commit adopt→verify→revert arc). A same-day plugin revert repeated the pattern. Both costs were avoidable with a 10-minute probe run BEFORE the build.

STEP 1: State the Load-Bearing Assumption

Write the assumption as one falsifiable sentence:

ASSUMPTION: event <X>, when triggered by <Y>, delivers <payload field Z> to <consumer surface>.

If the sentence contains "should" or "according to docs", that is exactly why the probe exists — docs describe intent; versions drift; payload routing is the part docs are most often silent on.

STEP 2: Build a Minimal Tracer

Create the smallest artifact that can prove or refute the assumption — NOT the real feature:

SurfaceTracer
Hook eventA 3-line hook that appends PROBE-<nonce> $(date) $PAYLOAD to a scratch file AND emits the nonce into its output channel (additionalContext, stdout)
WebhookAn endpoint (or requestbin) that dumps headers+body verbatim
SDK callbackA handler that logs the full callback args to a file
External API behaviorA one-off script calling the real API with a marker payload

Wire the tracer exactly where the real implementation would sit (same settings.json event, same route) — probing a different wiring point proves nothing about yours.

STEP 3: Trigger Live and Observe at the Consumer

Trigger the event with a REAL action (a real subagent run, a real session start, a real inbound request) — not a simulated call to the handler. Then check BOTH ends:

  1. Fired? — the scratch-file line exists (the platform invoked the tracer).
  2. Delivered? — the nonce is observable at the intended CONSUMER surface (the parent loop's context, the downstream system, the next session).

These are independent facts; the hub's failure was exactly a yes-fired/no-delivered split.

STEP 4: Decide From the Matrix

FiredDeliveredDecision
yesyesBuild. Cite the probe (nonce, date, platform version) in the implementation PR
yesnoSTOP the build. Record a platform gap; keep any prepared artifact on disk UNWIRED with a note naming the re-wire condition
no—Do not build. Re-check event name/wiring once; if still silent, the surface does not exist for your case
flaky—Treat as no for anything load-bearing; note the observed reliability (e.g. SessionEnd fires only on clean exits — design for the reliable event instead)

STEP 5: Record the Probe Result

Append the result where the next builder will look (the project's platform-reference doc or lessons file), including: event, platform/CLI version probed, fired/delivered verdicts, nonce evidence, and date. Platform behavior changes across versions — a probe result carries its vintage, and a no from three versions ago is worth re-probing. Check this record BEFORE probing: a same-version prior probe of the same event answers the question without a re-run; a different-version or stale one is the re-probe trigger.

Under time pressure with no probe possible right now: build nothing load-bearing on the unverified event — either design against the surface a prior probe already verified, or ship the artifact unwired with the probe as the named activation condition. "No time to probe" is never license to assume delivery.

MUST DO

  • Always run the probe against the REAL trigger, not a direct invocation of the handler — Why: direct execution passed on the hook whose event-path delivery was broken
  • Always test delivery to the exact consumer you will build for — Why: payloads can reach the event's own subject yet never reach the parent loop that needs them (the SubagentStop case)
  • Always include the platform version in the recorded result — Why: results expire; an unversioned "doesn't work" blocks future adoption after the platform fixes it
  • Always keep a refuted assumption's artifact unwired-with-a-note rather than deleting it — Why: the re-wire condition ("when SubagentStop context reaches T0") makes future adoption a one-step change

MUST NOT DO

  • MUST NOT ship the real implementation and the probe as one change — probe first, build second — Why: the combined path is how two hub mechanisms shipped inert and needed reverts
  • MUST NOT extrapolate one event's delivery semantics to a sibling event — probe each — Why: SessionStart and SessionEnd have materially different firing reliability in the same platform
  • MUST NOT accept "the docs say it works" from anyone (including yourself) as a probe substitute — run STEP 3 instead — Why: both recorded incidents were doc-conformant builds
  • MUST NOT leave a yes-fired/no-delivered result unrecorded — write the platform gap down — Why: unrecorded gaps get rediscovered at full build cost

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.