id-graph-canonical-id-size

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

A query tool for measuring how many individual IDs belong to each canonical ID in an identity graph. A canonical ID is the main identifier representing a connected group of IDs.

In plain words
What is it for?
Use it to investigate unusually large canonical-ID groups.
Why use it?
It helps detect over-stitching, where unrelated or too many IDs have been combined into one profile.

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 unusually large canonical-ID groups.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/treasure-data/td-skills/id-graph-canonical-id-size
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-canonical-id-size
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-canonical-id-size

README.md
[![agentmods](https://agentmods.dev/badge/skills/treasure-data/td-skills/id-graph-canonical-id-size/github.svg)](https://agentmods.dev/skills/treasure-data/td-skills/id-graph-canonical-id-size)
Your own site
<a href="https://agentmods.dev/skills/treasure-data/td-skills/id-graph-canonical-id-size"><img src="https://agentmods.dev/badge/skills/treasure-data/td-skills/id-graph-canonical-id-size/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-canonical-id-size

Your own site · 80×15
<a href="https://agentmods.dev/skills/treasure-data/td-skills/id-graph-canonical-id-size"><img src="https://agentmods.dev/badge/skills/treasure-data/td-skills/id-graph-canonical-id-size.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 382 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.00382
Opus 5.5 $0.00019 $0.00153
Sonnet 5.5 $0.00009 $0.00076
Haiku 4.5 $0.00005 $0.00038

Measured 2mo ago against content hash 5ada5c73503c, 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-canonical-id-size 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-canonical-id-size/SKILL.md · 54 lines

What it actually says

ID Graph - Canonical ID Size Analysis

Analyze canonical ID group sizes to identify over-stitching patterns where too many individual IDs are mapped to a single canonical ID.

Requirements

  • Parent segment ID with RT 2.0 enabled

Database

The database name contains the parent segment ID and has this format cdp_audience_273509. 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 analyze ID counts per canonical ID:

WITH flattened AS (
    SELECT
        canonical_id,
        id_value
    FROM cdp_audience_<parent_segment_id>.ids_updated
    CROSS JOIN UNNEST(id_set) AS t(id_value)
    WHERE td_interval(time, '-7d')  -- Avoid full table scan
)
SELECT
    canonical_id,
    count(DISTINCT id_value) as unique_id_count
FROM flattened
GROUP BY canonical_id
ORDER BY unique_id_count DESC
LIMIT 100;

Troubleshooting

  • Ensure the parent segment has RT 2.0 enabled
  • Large result sets may need LIMIT clauses for performance
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 · 54 lines · 47 tokens per session scan A 5ada5c73503c

Subscribe to this mod's changes

id-graph-canonical-id-size 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 382 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-canonical-id-size compared with skills from other repositories

id-graph-canonical-id-size next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
id-graph-canonical-id-sizetreasure-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