/walkeros:walkeros-mapping-configurationfrom walkeros
Provides recipes for configuring walkerOS event mappings, including GA4, Meta, custom APIs, and common transformation patterns like renaming, extracting, and consent gating.
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.
Read understanding-mapping first for core concepts.
| I want to... | Use this pattern |
|---|---|
| Rename event | { name: 'new_name' } |
| Extract nested value | 'data.nested.value' |
| Set static value | { value: 'USD' } |
| Transform value | { fn: (value, { event }) => transform(event) } |
| Build object | { map: { key: 'source' } } |
| Process array | { loop: ['source', { map: {...} }] } |
| Gate by consent | { key: 'data.email', consent: { marketing: true } } |
| Gate one event type by consent | rule consent: { marketing: true } (on top of config.consent) |
| First defined value (fallback) | [{ key: 'data.sku' }, { key: 'data.id' }] |
| Add a field to a default rule | { extend: { data: { map: { x: 'path' } } } } |
| Drop a field from output | { remove: ['field.path'] } |
Product view → view_item:
product: {
view: {
name: 'view_item',
data: {
map: {
currency: { key: 'data.currency', value: 'EUR' },
value: 'data.price',
items: {
loop: [
'this', // the product is the event itself
{
map: {
item_id: 'data.id',
item_name: 'data.name',
item_category: 'data.category',
price: 'data.price',
quantity: { key: 'data.quantity', value: 1 },
},
},
],
},
},
},
},
}
Order complete → purchase:
order: {
complete: {
name: 'purchase',
data: {
map: {
transaction_id: 'data.id',
value: 'data.value',
currency: { key: 'data.currency', value: 'EUR' },
items: {
loop: [
'nested',
{
// only the products, not other nested entities
condition: (entity) =>
typeof entity === 'object' &&
entity !== null &&
'entity' in entity &&
entity.entity === 'product',
map: {
item_id: 'data.id',
item_name: 'data.name',
price: 'data.price',
quantity: { key: 'data.quantity', value: 1 },
},
},
],
},
},
},
},
}
Product view → ViewContent:
product: {
view: {
name: 'ViewContent',
data: {
map: {
content_ids: { set: ['data.id'] },
content_type: { value: 'product' },
content_name: 'data.name',
value: 'data.price',
currency: { key: 'data.currency', value: 'EUR' },
},
},
},
}
Order complete → Purchase:
order: {
complete: {
name: 'Purchase',
data: {
map: {
content_ids: {
loop: [
'nested',
{
condition: (entity) =>
typeof entity === 'object' &&
entity !== null &&
'entity' in entity &&
entity.entity === 'product',
key: 'data.id',
},
],
},
content_type: { value: 'product' },
value: 'data.value',
currency: { key: 'data.currency', value: 'EUR' },
num_items: {
fn: (value, { event }) =>
event.nested?.filter((entity) => entity?.entity === 'product')
.length ?? 0,
},
},
},
},
}
Transform to REST API format:
'*': {
'*': {
// A computed name goes in policy: a rule's name is a fixed string
policy: {
name: { fn: (value, { event }) => `${event.entity}_${event.action}` }, // page_view
},
data: {
map: {
eventName: 'name',
eventData: 'data',
userId: 'user.id',
sessionId: 'user.session',
timestamp: 'timestamp',
metadata: {
map: {
consent: 'consent',
globals: 'globals',
},
},
},
},
},
}
Different mapping based on event data:
order: {
complete: [
// High-value orders get extra tracking
{
condition: (value, { event }) =>
typeof event.data?.value === 'number' && event.data.value > 500,
name: 'high_value_purchase',
data: {
map: {
value: 'data.value',
priority: { value: 'high' },
notify: { value: true },
},
},
},
// Standard orders
{
name: 'purchase',
data: { map: { value: 'data.value' } },
},
],
}
extend / remove)@walkeros/transformer-ga4 ships default mapping rules in its
settings.mapping. Normally a user rule at the same key replaces the default in
full. Use extend or remove to patch instead.
Two layers, two keywords:
extend runs at init (config layer): deep-merges a partial rule onto the
shipped default. A null value clears an inherited field. Only a package that
ships defaults merges it; on any other rule walkeros validate and the bundle
reject it (MAPPING_NO_OP).remove runs after evaluation (output layer): strips dotted paths from
the final data payload. Applied last, always wins. It also works in a
destination's own rules.A rule with neither keyword replaces the default in full.
{
"settings": {
"mapping": {
"purchase": {
"extend": {
"data": { "map": { "affiliation": "params.ep.affiliation" } }
},
"remove": ["currency"]
}
}
}
}
This keeps all fields the transformer ships for purchase, adds affiliation,
and strips currency from the output.
For the full reference and the two-layer model, see Mapping.Rule docs.
At any value position, an array of values is a fallback chain: the first entry that resolves to a defined value wins.
{
"item_id": [
{ "key": "data.sku" },
{ "key": "data.id" },
{ "value": "unknown" }
]
}
Use this to try multiple source fields before falling back to a constant.
Only include PII if consent granted:
user: {
login: {
name: 'login',
data: {
map: {
method: 'data.method',
// Only include email if marketing consent
email: {
key: 'user.email',
consent: { marketing: true },
},
// Only include user ID if functional consent
userId: {
key: 'user.id',
consent: { functional: true },
},
},
},
},
}
Catch-all for unmatched events:
// Any product action (a computed name goes in policy)
product: {
'*': {
policy: { name: { fn: (value, { event }) => `product_${event.action}` } },
data: 'data',
},
}
// A click on any entity without its own rule for it: with the product rule
// above, a product click matches product '*' instead
'*': {
click: {
name: 'element_click',
data: {
map: {
element_type: 'entity',
element_id: 'data.id',
},
},
},
}
A source's mapping uses the same entity-action rules on the events the source
pushes, before they reach the collector, for example to rename, edit (policy)
or drop them. Turning a raw request format into events is the source's own job
(see create-source).
// In a source's config
{
mapping: {
product: { click: { name: 'product view' } }, // rename
test: { '*': { ignore: true } }, // drop every test event
},
}
'data.nested.field'e.data?.price ?? 0nested array exists and has itemsReference:
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub elbwalker/walkeros --plugin walkeros22 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-mcp-actionsUse when an AI agent calls walkerOS MCP tools from code (code execution / Code Mode, a Worker, or an app sandbox) to validate, simulate, bundle, or inspect flows and packages, and wants to filter large results in code instead of issuing many separate tool calls.Other plugins' skills for the same job