/adcp-client:build-decisioning-signal-marketplacefrom adcp-client
Guides building an AdCP signal-marketplace or signal-owned decisioning platform for serving audience signals to buyers using the typed DecisioningPlatform shape.
Ships in adcp-client. 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.
You're building a signals data provider that fits one of two AdCP specialisms:
signal-marketplace — third-party data brokers serving curated signals (LiveRamp, Oracle Data Cloud, third-party DMPs)signal-owned — first-party data providers serving their own signals (publisher first-party data, retailer customer-graph)Both share the same SignalsPlatform interface. Pick the specialism that matches your relationship to the data; the implementation shape is identical.
DecisioningPlatform surfacesignal-marketplace OR signal-owned@adcp/sdkWrong skill if:
skills/build-signals-agent/skills/build-decisioning-creative-template/skills/build-seller-agent/A signals platform implements two methods:
getSignals(req, ctx) → Promise<GetSignalsResponse> — sync catalog discovery. Buyer sends filters; you return the matching signals. No async envelope.activateSignal(req, ctx) → Promise<ActivateSignalSuccess> — sync ack with async lifecycle. Provision the signal onto destination platforms (Snap, Meta, TikTok, etc.); return immediately with deployments[] rows in current state (pending is valid). Each deployment's eventual activating / deployed / failed flows via publishStatusChange({ resource_type: 'signal', ... }).Both throw AdcpError for buyer-fixable rejection.
import {
AdcpError,
createAdcpServerFromPlatform,
publishStatusChange,
type DecisioningPlatform,
type SignalsPlatform,
type AccountStore,
} from '@adcp/sdk/server';
import type {
GetSignalsRequest,
GetSignalsResponse,
ActivateSignalRequest,
ActivateSignalSuccess,
AccountReference,
} from '@adcp/sdk/types';
import { serve } from '@adcp/sdk/server';
interface DataMatrixConfig {
/** Match-rate floor — signals below this rate to a destination are filtered out. */
minMatchRate: number;
}
interface DataMatrixMeta {
workspace_id: string;
}
class DataMatrixPlatform implements DecisioningPlatform<DataMatrixConfig, DataMatrixMeta> {
capabilities = {
specialisms: ['signal-marketplace'] as const,
creative_agents: [],
channels: [] as const,
pricingModels: ['cpm'] as const,
config: { minMatchRate: 0.15 } satisfies DataMatrixConfig,
};
accounts: AccountStore<DataMatrixMeta> = {
resolve: async (ref: AccountReference) => {
const id = 'account_id' in ref ? ref.account_id : 'dm_default';
return {
id,
name: 'DataMatrix default',
status: 'active',
operator: 'datamatrix.example.com',
metadata: { workspace_id: `ws_${id}` },
authInfo: { kind: 'api_key' },
};
},
};
signals: SignalsPlatform<DataMatrixMeta> = {
getSignals: async (_req: GetSignalsRequest): Promise<GetSignalsResponse> => {
return {
status: 'completed',
signals: [
{
signal_id: { source: 'agent', agent_url: 'https://datamatrix.example/signals', id: 'in_market_auto' },
signal_agent_segment_id: 'dm_seg_auto_001',
name: 'In-Market: Auto Buyers',
description: 'Active automotive shoppers within 90-day purchase window',
value_type: 'binary',
signal_type: 'marketplace',
data_provider: 'DataMatrix',
coverage_percentage: 18.5,
deployments: [],
pricing_options: [{ pricing_option_id: 'po_cpm_4', model: 'cpm', cpm: 4.0, currency: 'USD' }],
},
],
};
},
activateSignal: async (req: ActivateSignalRequest): Promise<ActivateSignalSuccess> => {
if (!req.destinations.length) {
throw new AdcpError('INVALID_REQUEST', {
recovery: 'correctable',
message: 'destinations must be non-empty',
field: 'destinations',
});
}
// Sync ack: return deployments in `pending` state. Identity-graph
// match runs in background; publishStatusChange fires when each
// destination reaches activating / deployed / failed.
const deployments: ActivateSignalSuccess['deployments'] = req.destinations.map(d =>
d.type === 'platform'
? {
type: 'platform',
platform: d.platform,
...(d.account !== undefined && { account: d.account }),
is_live: false,
}
: {
type: 'agent',
agent_url: d.agent_url,
...(d.account !== undefined && { account: d.account }),
is_live: false,
}
);
// Schedule background activation for each destination
const accountId = req.account && 'account_id' in req.account ? req.account.account_id : 'dm_default';
for (const dep of deployments) {
setTimeout(() => {
publishStatusChange({
account_id: accountId,
resource_type: 'signal',
resource_id: req.signal_agent_segment_id,
payload:
dep.type === 'platform'
? { type: dep.type, platform: dep.platform, account: dep.account, status: 'deployed', is_live: true }
: { type: dep.type, agent_url: dep.agent_url, account: dep.account, status: 'deployed', is_live: true },
});
}, 100).unref?.();
}
return { deployments };
},
};
}
const platform = new DataMatrixPlatform();
const server = createAdcpServerFromPlatform(platform, {
name: 'datamatrix',
version: '1.0.0',
validation: { requests: 'strict', responses: 'strict' },
});
serve(() => server, { publicUrl: 'https://datamatrix.example.com' });
activateSignal is always sync at the wire level — ActivateSignalResponse has no Submitted arm. For platforms with slow identity-graph matches (5-30 min) or destination provisioning (hours), the canonical pattern is:
ActivateSignalSuccess immediately with each deployment row in pending statepublishStatusChange({ resource_type: 'signal', ... }) for each deployment as it reaches activating / deployed / failedBuyers subscribe via the resource-update channel to track activation progress.
throw new AdcpError(...)Common codes for signals:
| Code | When |
|---|---|
'REFERENCE_NOT_FOUND' | unknown signal_agent_segment_id (SIGNAL_NOT_FOUND is for data-provider signal_id references) |
'POLICY_VIOLATION' | buyer lacks rights to activate this data |
'INVALID_REQUEST' | missing destinations, unrecognized destination shape, missing pricing_option_id when required |
'AUDIENCE_TOO_SMALL' | activated audience falls below match-rate floor |
'RATE_LIMITED' | upstream identity-graph throttled |
activateSignal: async req => {
if (!signalCatalog.has(req.signal_agent_segment_id)) {
throw new AdcpError('REFERENCE_NOT_FOUND', {
message: `Unknown signal: ${req.signal_agent_segment_id}`,
field: 'signal_agent_segment_id',
});
}
// ... happy path
};
Same pattern as creative-template — see build-decisioning-creative-template/SKILL.md § Idempotency. Pass req.idempotency_key into your upstream identity-graph / destination-provisioning API so dedup is end-to-end.
capabilities = {
specialisms: ['signal-marketplace'] as const, // or 'signal-owned'
creative_agents: [], // not used by signals
channels: [] as const, // not used by signals
pricingModels: ['cpm'] as const, // signals are typically CPM uplift
config: {
/* your platform-specific config */
} satisfies YourConfig,
};
import { createAdcpServerFromPlatform } from '@adcp/sdk/server';
const platform = new DataMatrixPlatform();
const server = createAdcpServerFromPlatform(platform, {
name: 'dm-test',
version: '0.0.1',
validation: { requests: 'off', responses: 'off' },
});
const result = await server.dispatchTestRequest({
method: 'tools/call',
params: {
name: 'get_signals',
arguments: {
filters: { catalog_types: ['third_party'], industries: ['automotive'] },
account: { account_id: 'test_acc' },
},
},
});
console.log(result.structuredContent);
❌ Don't try to make activateSignal HITL. The wire response has no Submitted arm. Sync ack + publishStatusChange is the correct pattern.
❌ Don't return error envelopes manually. Throw AdcpError; the framework projects to wire shape.
❌ Don't write as any / as never in adopter code. The wire types are typed; discriminators on SignalID (source: 'catalog' | 'agent') and Destination (type: 'platform' | ...) narrow without casts.
// From @adcp/sdk/server
import {
AdcpError,
AccountNotFoundError,
createAdcpServerFromPlatform,
publishStatusChange,
type DecisioningPlatform,
type AccountStore,
type Account,
type SignalsPlatform,
type RequestContext,
type ErrorCode,
type AdcpStructuredError,
} from '@adcp/sdk/server';
// From @adcp/sdk/types — wire schemas (auto-generated)
import type {
GetSignalsRequest,
GetSignalsResponse,
ActivateSignalRequest,
ActivateSignalSuccess,
AccountReference,
} from '@adcp/sdk/types';
// From @adcp/sdk/server — HTTP serving
import { serve } from '@adcp/sdk/server';
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub adcontextprotocol/adcp-client --plugin adcp-client24 skills in this plugin
/adcpInteract with AdCP (Ad Context Protocol) advertising agents over MCP or A2A protocols. Use when the user wants to call AdCP tools (get_products, create_media_buy, sync_creatives, etc.), discover an agent's capabilities, run protocol compliance tests, look up brands or properties in the AdCP registry, manage saved agent aliases, or debug agent responses. NOT for general HTTP/REST API calls. Requires @adcp/sdk (npm)./adcp-brandExecute AdCP Brand Protocol operations with brand agents - get brand identity data, search for licensable rights, acquire rights for campaigns, and manage existing grants. Use when users want to look up brand identities, find talent or IP for licensing, or manage rights grants./adcp-creativeExecute AdCP Creative Protocol operations with creative agents - build creatives from briefs or existing assets, preview renderings, and discover format specifications. Use when users want to generate or transform ad creatives, preview how ads will look, or understand creative format requirements./adcp-governanceExecute AdCP Governance Protocol operations with governance agents - manage property lists, collection lists, content standards, and campaign governance (plans, checks, outcomes, audit trail). Use when users want to create include/exclude lists, set up brand safety rules, validate content delivery, register campaign plans, validate actions against policy, or produce internal/shareable audit trails./adcp-measurementOperate as or integrate with an AdCP measurement agent through a buyer-controlled orchestrator gateway - publish a metric catalog, receive authorized cross-seller delivery, and return compact feedback for orchestrator-controlled seller fan-out. Use when connecting measurement providers or routing provider results into seller optimization./adcp-media-buyExecute AdCP Media Buy Protocol operations with sales agents - discover advertising products, create and manage campaigns, sync creatives, and track delivery. Use when users want to buy advertising, create media buys, interact with ad sales agents, or test advertising APIs.Other plugins' skills for the same job