id-graph-ids-to-canonical-id

id-graph-ids-to-canonical-id is a skill for Claude Code from treasure-data/td-skills. It costs 47 tokens per session (408 once invoked), scanned A, original, Apache-2.0.

A query tool for finding individual IDs that appear in more than one canonical-ID group. The canonical ID is the main identifier for a connected group of IDs.

In plain words
What is it for?
Use it to investigate conflicting identity mappings in the ID graph.
Why use it?
It helps detect over-stitching, where one identifier has been connected to multiple profiles.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the realtime-skills plugin — 18 skills shipped together

Good fit Use it to investigate conflicting identity mappings in the ID graph.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/treasure-data/td-skills/id-graph-ids-to-canonical-id
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add treasure-data/td-skills --skill id-graph-ids-to-canonical-id
Clone the repo
git clone --depth 1 https://github.com/treasure-data/td-skills

Made for: Claude Code.

Or install realtime-skills, the plugin that ships this one along with the rest of its 18 skills.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for id-graph-ids-to-canonical-id

README.md
[![agentmods](https://agentmods.dev/badge/skills/treasure-data/td-skills/id-graph-ids-to-canonical-id/github.svg)](https://agentmods.dev/skills/treasure-data/td-skills/id-graph-ids-to-canonical-id)
Your own site
<a href="https://agentmods.dev/skills/treasure-data/td-skills/id-graph-ids-to-canonical-id"><img src="https://agentmods.dev/badge/skills/treasure-data/td-skills/id-graph-ids-to-canonical-id/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for id-graph-ids-to-canonical-id

Your own site · 80×15
<a href="https://agentmods.dev/skills/treasure-data/td-skills/id-graph-ids-to-canonical-id"><img src="https://agentmods.dev/badge/skills/treasure-data/td-skills/id-graph-ids-to-canonical-id.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 47 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 408 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00047 $0.00408
Opus 5.5 $0.00019 $0.00163
Sonnet 5.5 $0.00009 $0.00082
Haiku 4.5 $0.00005 $0.00041

Measured 2mo ago against content hash 923e8c454fc2, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

id-graph-ids-to-canonical-id scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

realtime-skills/id-graph-ids-to-canonical-id/SKILL.md · 58 lines

What it actually says

ID Graph - IDs to Canonical ID

Detect over-stitching by finding individual IDs that appear across multiple canonical ID groups.

Requirements

  • Parent segment ID with RT 2.0 enabled

Database

The database name contains the parent segment ID and has this format cdp_audience_411671. This is where you can plug in the parent segment the user gives in the request.

ids_updated table

The ID graph table is typically called ids_updated and is in the Parent Segment real time database. This table contains the canonical ID mappings created by RT 2.0's ID stitching process.

Schema

The ids_updated table has the following key columns:

  • canonical_id, string, the canonical identifier for a group of stitched IDs
  • id_set, array(string), array of individual identifiers that belong to this canonical group

Core Query

The main query to identify individual IDs mapping to multiple canonical IDs:

WITH flattened_ids AS (
    SELECT
        canonical_id,
        individual_id
    FROM cdp_audience_<parent_segment_id>.ids_updated
    CROSS JOIN UNNEST(id_set) AS t(individual_id)
    WHERE td_interval(time, '-7d')  -- Avoid full table scan
),
id_counts AS (
    SELECT
        individual_id,
        COUNT(DISTINCT canonical_id) as canonical_count,
        ARRAY_AGG(DISTINCT canonical_id) as canonical_ids
    FROM flattened_ids
    GROUP BY individual_id
)
SELECT
    individual_id,
    canonical_count,
    canonical_ids
FROM id_counts
WHERE canonical_count > 1  -- Only show over-stitching cases
ORDER BY canonical_count DESC, individual_id
LIMIT 100;
Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2mo ago First seen · 58 lines · 47 tokens per session scan A 923e8c454fc2

Subscribe to this mod's changes

id-graph-ids-to-canonical-id is a skill published in the GitHub repository treasure-data/td-skills (22 stars, last pushed 5d ago), licensed Apache-2.0. It adds 47 tokens to every session and 408 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

id-graph-ids-to-canonical-id compared with skills from other repositories

id-graph-ids-to-canonical-id next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
id-graph-ids-to-canonical-idtreasure-data/td-skillsSkill225d agoApache-2.0A47Claude Code
systematic-debuggingopen-metadata/OpenMetadataSkill16ktodayApache-2.0A37Claude Code
log-error-digestzebbern/claude-code-guideSkill4.7k3d agoMITA71Claude Code, Codex
incident-response-incident-responsermyndharis/antigravity-skillsSkill2.0k2d agoMITA36Claude Code, Codex
cwv-optimizeradobe/skillsSkill322todayApache-2.0A112Claude Code
ci-fixersipyourdrink-ltd/bernsteinSkill1.2ktodayApache-2.0A15Claude Code, Codex
diagnosing-missing-recordingsPostHog/posthogSkill41ktodaynoneA76Claude Code, Codex