walkeros-create-cmp-so…
A CMP source is a specialized walkerOS source that listens to a consent management platform's events and translates consent…
The logger is walkerOS's standard logging system, available in all sources and destinations via `env.logger` or `logger` parameter. It provides scoped, level-aware logging that replaces console.log.
Claude Code
$ npx -y skills add elbwalker/walkerOS --skill walkeros-using-logger --agent claude-code
Codex
$ npx skills add elbwalker/walkerOS --skill walkeros-using-logger -a codex -y
Cursor
$ npx skills add elbwalker/walkerOS --skill walkeros-using-logger -a cursor -y
Gemini CLI
$ npx skills add elbwalker/walkerOS --skill walkeros-using-logger -a gemini-cli -y
GitHub Copilot
$ npx skills add elbwalker/walkerOS --skill walkeros-using-logger -a github-copilot -y
OpenCode
$ npx skills add elbwalker/walkerOS --skill walkeros-using-logger -a opencode -y
Windsurf
$ npx skills add elbwalker/walkerOS --skill walkeros-using-logger -a windsurf -y
name: walkeros-using-logger description: Use when working with walkerOS sources/destinations to understand standard logging patterns, replace console.log, or add logging to external API calls. Covers DRY principles, when to log, and migration patterns.
The logger is walkerOS's standard logging system, available in all sources and destinations via `env.logger` or `logger` parameter. It provides scoped, level-aware logging that replaces console.log.
**Core principle:** Don't log what the collector already logs, and never log a failure yourself. A step reports a failure by throwing a `StepError`; the collector writes the one ERROR line per cause. Log only meaningful operations like external API calls and transformations, at `debug`.
export const sourceFetch: Source.Init<Types> = async (context) => {
const { env } = context; // env.logger is available here
// Logger is scoped automatically by collector: [type:sourceId]
env.logger.info('Server listening on port 3000');
// ... build and return the source instance
};export const destinationDataManager: DestinationInterface = {
async init({ config, env, logger }) {
// logger parameter is scoped automatically: [datamanager]
logger.debug('Auth client created');
},
async push(event, { config, data, env, logger }) {
// logger parameter is scoped: [datamanager]
logger.debug('API response', { status: 200 });
},
};**Note:** You don't need to create or configure the logger; it's provided automatically with proper scoping.
interface Logger.Instance {
error(message: string | Error, context?: unknown | Error): void;
warn(message: string | Error, context?: unknown | Error): void;
info(message: string | Error, context?: unknown | Error): void;
debug(message: string | Error, context?: unknown | Error): void;
throw(message: string | Error, context?: unknown): never;
json(data: unknown): void;
scope(name: string): Logger.Instance;
}setting has no effect)
transformations, a skipped event)
**Default**: ERROR only (must configure to see WARN/INFO/DEBUG)
All methods accept optional structured context:
logger.debug('Sending to API', {
endpoint: '/events',
method: 'POST',
eventCount: 5,
});
// Output: DEBUG [datamanager] Sending to API { endpoint: '/events', method: 'POST', eventCount: 5 }**Why:** Collector can log these automatically since it calls init/push and has scoped logger.
configuration (`warn`: walkerOS acted, the intent is still met)
is a thrown `StepError`, not a log line
import { StepError } from '@walkeros/core';
// ✅ GOOD - A missing setting is a failure: throw, never return or log
async init({ config }) {
const { apiKey, projectId } = config.settings || {};
if (!apiKey)
throw new StepError('Config settings apiKey missing', { code: 'config' });
if (!projectId)
throw new StepError('Config settings projectId missing', {
code: 'config',
});
}**Why a thrown StepError:**
it, and writes **one** ERROR line per cause and minute with the code
cause
resend (`config`, `missing-input` and a 4xx are not retryable)
report a failure
Never `return` early from `init` or `push` instead of throwing: a step that returns normally counts as started, and a push that returns normally counts as delivered. `return false` from `init` fails the push with the code `not-ready`, which does not name the missing setting.
import { StepError } from '@walkeros/core';
// ✅ GOOD - Trace the call at debug, throw on a failure
async push(event, { config, logger }) {
const endpoint = 'https://api.vendor.com/events';
logger.debug('Calling API', { endpoint, method: 'POST', eventId: event.id });
const response = await fetch(endpoint, {
method: 'POST',
body: JSON.stringify(event),
});
logger.debug('API response', { status: response.status, ok: response.ok });
if (!response.ok)
// The status sets retryable (429 and 5xx retry, other 4xx do not). The
// response body goes on `body`, never into the message, and never into a
// log line.
throw new StepError(`HTTP ${response.status}`, {
code: 'transport',
status: response.status,
body: await response.text(),
});
}Prefer `sendWeb` / `sendServer`: they already throw a `StepError` with the status and body.
From browser to BigQuery and ad platforms - warehouse-native, and ready for AI agents via MCP.
A CMP source is a specialized walkerOS source that listens to a consent management platform's events and translates consent…
Use when creating a new walkerOS destination to send events to a vendor or API (GA4/gtag, Meta/Facebook Pixel, Mixpanel,…
Use when creating a new walkerOS source to capture events (browser source, dataLayer interception, server/HTTP source, webhook…
| Symptom | Likely Cause | Check | | ---------------------------------- | ---------------------------- |…
Read [understanding-mapping](../walkeros-understanding-mapping/SKILL.md) first for core concepts.
Use this skill to extract structured Markdown/JSON from PDFs and document images—tables with cell-level precision, formulas as…
Estimates intracellular metabolic fluxes from steady-state carbon-13 isotope-tracing measurements using validated atom maps,…