/walkeros:walkeros-understanding-eventsfrom walkeros
Guides creation of walkerOS events using entity-action naming, event properties, statelessness, and vendor-agnostic design. Useful when defining or debugging analytics events.
Ships in walkeros. 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.
walkerOS events are self-describing, stateless, vendor-agnostic data structures. They capture user interactions in a standardized format that can be transformed for any destination.
Core principle: Events describe what happened, not where it goes. They are stateless, self-describing and industry-agnostic.
STRICT REQUIREMENT: All events use "entity action" format with space separation.
// Correct
'page view';
'product add';
'order complete';
'button click';
// Wrong
'page_view'; // underscore
'pageview'; // no separator
'purchase'; // no entity
'add_to_cart'; // wrong format
Parsing: const [entity, action] = event.split(' ')
See
packages/core/src/types/walkeros.ts
for canonical types (Event interface, plus event helpers in event.ts).
| Property | Type | Purpose | Example |
|---|---|---|---|
name | string | "entity action" format | "product view" |
data | object | Entity-specific properties | { id: "P123", price: 99 } |
context | object | State/environment info (optional) | { stage: ["checkout", 1] } |
globals | object | Global properties | { language: "en" } |
user | object | User identification | { id: "user123" } |
nested | array | Related entities (optional) | [{ entity: "product", data: {...} }] |
consent | object | Consent states | { marketing: true } |
id | string | W3C span_id, 16 lowercase hex chars, generated by collector | "0123456789abcdef" |
timestamp | number | Auto-generated Unix ms | 1647261462000 |
entity | string | Parsed from name | "product" |
action | string | Parsed from name | "view" |
source.type | string | Source kind (browser, dataLayer, session, ...) | "browser" |
source.platform | string | Runtime platform (web, server) | "web" |
source.schema | string | Event-model version, set by the collector when no source | "4" |
source.trace | string | Run-scoped W3C trace_id, shared by every event of a run | "0123...cdef" (32 hex) |
source.count | number | Per-run emission sequence (1, 2, 3, ...) | 1 |
source.release | object | Per-flow config release map, accumulates across crossings | { web: "3", server: "5" } |
Entity-specific properties. Schema-free but consistent within entity type.
// product entity
data: { id: "P123", name: "Laptop", price: 999, currency: "USD" }
// page entity
data: { title: "Home", path: "/", referrer: "https://..." }
Hierarchical state information. Format: { name: [value, order] }. Optional.
context: {
stage: ["checkout", 1], // checkout stage, first step
test: ["variant-A", 0], // A/B test variant
group: ["premium", 2] // user segment
}
Properties the collector merges into every event it creates.
globals: {
language: "en",
currency: "USD",
environment: "production"
}
Related entities captured together. Optional.
// Order with line items
nested: [
{ entity: 'product', data: { id: 'P1', quantity: 2 } },
{ entity: 'product', data: { id: 'P2', quantity: 1 } },
];
User identification across sessions.
user: {
id: "user123", // Your user ID
device: "device456", // Device ID
session: "sess789", // Session ID
hash: "a1b2c3...", // Hashed identifier (for example a hashed email)
optout: false, // User opted out of tracking (boolean)
segment: "vip" // Custom keys are allowed, each holds a property value
}
The declared fields keep their types: email must be a valid address, so a
hashed email goes to hash, never to email. Any other key is a custom user
attribute with a property value and passes the validate transformer's
format: true check.
Where the event came from. The collector enriches the event with source data
based on which source emitted it.
source: {
type: 'browser', // source kind (browser, dataLayer, session, ...)
platform: 'web', // runtime: 'web' or 'server'
version: '3', // external source-emitter version (the collector does not set it)
schema: '4', // event-model version (the collector sets it on an event without a source)
trace: '0123...cdef', // run-scoped W3C trace_id, groups all events of a run
count: 1, // per-run emission sequence (1, 2, 3, ...)
release: { web: '3' }, // per-flow config release map, accumulates web to server
url: 'https://...', // page URL (set by the browser, dataLayer and session sources)
referrer: '...', // page referrer (same sources)
tool: 'cli', // tool that produced the event (optional)
command: 'simulate', // command name (optional)
}
Steps may add their own keys to source (the validate transformer writes
valid, GA4 decoding adds pageLoadId and hitSequence); each holds a
property value.
The browser, dataLayer and session sources set source.url and
source.referrer from the page. CMP sources emit walker consent commands, not
events.
source.trace is the run grouping key: the collector mints a fresh run-scoped
trace_id on each run and stamps it (plus a per-run source.count) on every
event when absent. It is preserved unchanged when an event is forwarded from web
to server, so the whole pipeline shares one trace.
source.release records which config handled the event, keyed by flow name.
Each flow the event passes through adds its own entry (that flow's config
release), so an event captured on the web and processed on the server carries
both flow releases, and a warehouse row shows exactly which config version
touched it. This is distinct from source.version, the source package version
set only by external source emitters; the collector does not stamp it.
Upgrading v3 events or configs: see
Migrating from v3 to v4. Nested
entities name their entity in entity, where v3 used type:
nested: [{ entity, data }].
Events are immutable snapshots. They don't reference previous events or maintain state.
Events contain all context needed to understand them, without external lookups.
Events use generic concepts (product, order) not vendor-specific (GA4 item, FB content).
Transformation to vendor formats happens in mapping, not in event creation.
elb takes a partial event: name is required, every other field is optional.
The collector adds id, timestamp, timing, entity, action and source,
and merges its own globals, user and consent key by key (the event's
values win).
import { startFlow } from '@walkeros/collector';
const { elb } = await startFlow({
/* destinations */
});
const result = await elb({
name: 'product add',
data: { id: 'P123', price: 99 },
context: { stage: ['cart', 1] },
globals: { currency: 'USD' },
});
// A failed destination is in result.failed (with its reason); a rejected
// event reaches no destination and sets result.error, e.g. 'Event name is invalid'
if (!result.ok) console.error(result.failed ?? result.error);
Every event uses this partial event form. walker commands keep their string
name: elb('walker consent', { marketing: true }).
Source Files:
Documentation:
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
22 skills in this plugin
/walkeros-create-cmp-sourceUse when creating a new walkerOS CMP (consent management platform) source. Structured fill-in-the-blanks workflow that turns any CMP's consent API into a walkerOS source package. Covers CookieFirst, Usercentrics, CookiePro/OneTrust patterns and generalizes to any CMP./walkeros-create-destinationUse when creating a new walkerOS destination to send events to a vendor or API (GA4/gtag, Meta/Facebook Pixel, Mixpanel, Amplitude, a custom HTTP API, Measurement Protocol), web or server-side. Example-driven workflow: research the vendor SDK and define step examples before implementing the destination interface, env pattern, and mappings./walkeros-create-sourceUse when creating a new walkerOS source to capture events (browser source, dataLayer interception, server/HTTP source, webhook receiver, event capture), web or server-side. Example-driven workflow: research the input format and define step examples before implementing the push interface, createTrigger, and env pattern./walkeros-create-transformerUse when creating a new walkerOS transformer to modify events in the pipeline (validate, enrich, or redact) at a before/next chain position. Example-driven workflow for the transformer interface, return values, and chaining./walkeros-debuggingUse when walkerOS events aren't reaching destinations, debugging event flow, or troubleshooting mapping issues. Covers common problems and debugging strategies./walkeros-mapping-configurationUse when configuring walkerOS event mappings for specific use cases. Provides recipes for GA4, Meta, custom APIs, and common transformation patterns.npx claudepluginhub elbwalker/walkeros --plugin walkerosOther plugins' skills for the same job