شعار Data Map

Data Map

مؤسسة
ai-analyst-lab
data-map

Produce a cross-table data health map for the active dataset: row counts, date alignment, join rates, relationships, opening hypothesis. Trigger on dataset-wide open questions: "tell me about this data", "what's in here", "give me an overview", "map out the data", "what do I have", "what does this data look like". NOT for table-scoped questions (data-quality-check), /explore follow-ups, schema listing (/data), or deep profiles (data-profiling).

نظرة عامة

الناشرai-analyst-lab
المستودعai-analyst-plugin
اسم المهارةdata-map
النجوم
34
التفريعات
13
الملفات المرفقة
تعليمات فقط
الترخيصMIT
الروابط
  • تعليمات بصيغة Markdown

    ملف SKILL.md يُحمّله النموذج عند الحاجة، فلا يستهلك توكنات إلا عندما يَرِد طلب ذو صلة فعلًا.

  • تعمل مع أي نموذج لغوي كبير

    مهارات الذكاء الاصطناعي مكتوبة بصيغة Markdown وليست شيفرة خاصة بمزوّد معيّن، لذا تعمل مع GPT أو Claude أو Gemini أو Grok أو نموذج محلي.

  • مكتفية بذاتها

    كل ما يحتاجه النموذج موجود في التعليمات — لا ملفات إضافية لمزامنتها.

  • مفتوحة المصدر

    نشرها ai-analyst-lab على GitHub. اطّلع على المصدر قبل تثبيتها.

التثبيت

ثبّت مهارة الذكاء الاصطناعي Data Map في TypingMind لاستخدامها مع أي نموذج لغوي كبير، أو أضفها إلى وكيل ذكاء اصطناعي آخر يقرأ SKILL.md.

1

التثبيت في TypingMind

يُثبّت TypingMind المهارة مباشرةً من مجلدها على GitHub — فيقرأ SKILL.md، ويجمع ملفات الموارد في حزمة، ويحفظ النتيجة محليًا.

  1. افتح التطبيق وانتقل إلى الإضافات → المهارات.
  2. اختر «تثبيت من GitHub».
  3. الصق رابط مجلد المهارة الموضّح أدناه وأكّد التثبيت.
    https://github.com/ai-analyst-lab/ai-analyst-plugin/tree/main/ai-analyst-plus/skills/data-map
  4. فعّل المهارة في كل محادثة تريد إتاحتها فيها.
الإضافات → المهارات → إضافة مهارة → من رابط GitHub، ثم الصق رابط المجلد واضغط على «متابعة».
2

التثبيت في وكيل ذكاء اصطناعي آخر

يمكن لأي وكيل ذكاء اصطناعي يقرأ تنسيق Agent Skills استخدام هذه المهارة — انسخ المجلد إلى مجلد المهارات الخاص بذلك الوكيل.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/ai-analyst-lab/ai-analyst-plugin.git /tmp/ai-analyst-plugin
mkdir -p .claude/skills
cp -r /tmp/ai-analyst-plugin/ai-analyst-plus/skills/data-map .claude/skills/data-map
أعد تشغيل Claude Code بعد النسخ ليتعرّف على المهارة الجديدة.

استخدمها في TypingMind

فعّل Data Map في أي محادثة على TypingMind وسيتولى النموذج الباقي. تتضمن مطالبة النظام اسمها ووصفها، وبمجرد ورود طلب ذي صلة، يُحمّل النموذج التعليمات الكاملة تلقائيًا — فلا تحتاج إلى استدعائها يدويًا، ولا تستهلك أي توكنات حتى تُستخدم فعليًا.

يُحمّل النموذج Data Map تلقائيًا بمجرد ورود طلب ذي صلة بها.

تعمل مع أي نموذج ذكاء اصطناعي

مهارات الذكاء الاصطناعي هي تعليمات بصيغة Markdown وليست شيفرة خاصة بمزوّد معيّن، لذا لا ترتبط Data Map بالنموذج الذي كُتبت له. ثبّتها مرة واحدة في TypingMind واستخدمها مع GPT-5 أو Claude أو Gemini أو Grok أو DeepSeek أو Mistral أو Llama أو نموذج محلي تشغّله بنفسك — كل ذلك باستخدام مفاتيح API الخاصة بك.

  • تُحمَّل عند الحاجة فقط

    تتضمن مطالبة النظام الاسم والوصف فقط. وتُجلب التعليمات عند أول طلب ذي صلة، لذا لا تترتب أي تكلفة على المهارة غير المستخدمة.

  • بدّل النماذج أثناء المحادثة

    لأن المهارة تعليمات وليست شيفرة، فإن تغيير النموذج لا يعطّلها — فالنموذج التالي يقرأ ملف SKILL.md نفسه.

تعليمات المهارة

هذا هو محتوى SKILL.md الذي يُحمّله النموذج. اقرأه قبل التثبيت — فالمهارة عبارة عن تعليمات سيتبعها نموذجك.

Skill: Data Map

Purpose

Answer the broadest possible question — "tell me about this data" — with the broadest substantive answer: cross-table health, relationships, date alignment, and an opening analytical thread. This is first-contact dataset exploration, not a schema dump and not a steering question.

When to Fire

Fires on dataset-wide open questions:

  • "tell me about this data / the data / this dataset / the dataset"
  • "what's in here / what's in this data / what's in the data"
  • "give me an overview / give me the map / map out the data"
  • "what do I have / what do we have here"
  • "what does this data look like / show me what we've got"
  • Any open question that references the dataset as a whole

Does NOT fire when:

  • The question names a specific table → use data-quality-check
  • User invoked /explore or is mid-exploration within an already-mapped dataset → use explore
  • User invoked /data or /data {table} → use data-inspect (schema-only)
  • User invoked /run-pipeline or a specific analysis → run the pipeline

Fires regardless of:

  • Whether the dataset was recently profiled (data-profiling populates .knowledge/, this skill produces a live report)
  • Whether the user explicitly asked for DQ (it's implicit in "tell me about")

Instructions

Step 0 — Resolve active dataset

  1. Read .knowledge/active.yaml to get active_dataset. If missing, halt and tell the user to run /connect-data (knowledge-bootstrap can create the rest of the tree).
  2. Read .knowledge/datasets/{active}/manifest.yaml for connection type and local paths.
  3. Read .knowledge/datasets/{active}/schema.md for table list and column types.
  4. Read .knowledge/datasets/{active}/quirks.md to surface known gotchas inline.
  5. Verify connectivity through the session's active data connection (a connected warehouse, local DuckDB, or the CSV files, in that order of preference). Announce which source is active in one line.

Step 1 — Table inventory and PK health

For every table in schema.md, run:

sql
SELECT
  COUNT(*)                                       AS row_count,
  COUNT(DISTINCT {pk_col})                       AS distinct_pk,
  COUNT(*) - COUNT(DISTINCT {pk_col})            AS pk_dupes,
  SUM(CASE WHEN {pk_col} IS NULL THEN 1 ELSE 0 END) AS pk_nulls
FROM {schema}.{table};

PK inference order: (1) {table_singular}_id (e.g., order_id for orders), (2) column literally named id, (3) if neither, note "no single PK detected — composite candidate" and check the most plausible composite. For order_items specifically, use order_item_id if present, else (order_id, product_id).

Step 2 — Date range + primary timestamp

For each table, identify the primary timestamp column (prefer *_timestamp, then *_date, then created_at/started_at/session_start/event_timestamp). Run:

sql
SELECT MIN({ts}) AS min_ts, MAX({ts}) AS max_ts, COUNT(DISTINCT DATE({ts})) AS distinct_days
FROM {schema}.{table};

Tables with no timestamp (e.g., products, calendar, promotions if static): note as "static/reference."

Step 3 — Column completeness (null rates)

For every column in every non-reference table, compute null %. Use a single query per table:

sql
SELECT
  SUM(CASE WHEN {col_1} IS NULL THEN 1 ELSE 0 END) * 100.0 / COUNT(*) AS {col_1}_null_pct,
  SUM(CASE WHEN {col_2} IS NULL THEN 1 ELSE 0 END) * 100.0 / COUNT(*) AS {col_2}_null_pct,
  ...
FROM {schema}.{table};

Flag any column with null% > 5%. For DOUBLE foreign-key columns (e.g., orders.promo_id), high nulls may be expected (not every order used a promo) — note but don't alarm.

Step 4 — Foreign key inference and join-rate matrix

Infer FKs from naming: a column named {entity}_id in table T likely references the {entity}s (or {entity}) table's PK. For each inferred FK, run:

sql
SELECT
  COUNT(*)                                          AS child_rows,
  COUNT(DISTINCT c.{fk_col})                        AS distinct_fks,
  SUM(CASE WHEN p.{pk_col} IS NULL THEN 1 ELSE 0 END) * 100.0 / COUNT(*) AS orphan_pct
FROM {schema}.{child_table} c
LEFT JOIN {schema}.{parent_table} p
  ON c.{fk_col} = p.{pk_col};

Expected FKs in a typical e-commerce schema (illustrative example):

  • orders.user_id → users.user_id
  • order_items.order_id → orders.order_id
  • order_items.product_id → products.product_id
  • events.user_id → users.user_id
  • events.session_id → sessions.session_id
  • events.product_id → products.product_id (nullable — only product-related events)
  • sessions.user_id → users.user_id
  • memberships.user_id → users.user_id
  • nps_responses.user_id → users.user_id
  • support_tickets.user_id → users.user_id
  • support_tickets.order_id → orders.order_id (nullable)
  • experiment_assignments.user_id → users.user_id
  • experiment_assignments.experiment_id → experiments.experiment_id
  • orders.promo_id → promotions.promo_id (nullable)

Generalize by scanning column names for *_id patterns — the FK list above is one example shape, not a required schema.

Step 5 — Cross-table date alignment

Build a table: each row is a table, columns are (min_ts, max_ts, distinct_days). Identify:

  • Pivot range: the intersection of all core fact tables' date ranges (the window where all data coexists).
  • Misalignments: tables that start late or end early vs. the pivot. Flag if a fact table's range is <80% of the pivot.
  • Calendar overlap: if a calendar table exists, confirm its range covers the fact tables.

Step 6 — Relationship diagram

Render an ASCII DAG. Use this layout pattern:

              users ──┬── sessions ── events
                      ├── orders ── order_items ── products
                      ├── memberships
                      ├── nps_responses
                      ├── support_tickets ──(nullable)── orders
                      └── experiment_assignments ── experiments
                                     
              promotions ──(nullable)── orders
              calendar  (reference / date spine)

Only include tables that actually exist in the active schema.

Step 7 — Surface quirks

From quirks.md, inline any noted gotchas in the relevant section of the output. If quirks.md is empty or placeholder-only, note: "No quirks documented yet — run /data-profiling for deep column-level analysis."

Step 8 — Opening thread to pull

Close with one concrete analytical thread. Prefer a thread that:

  1. Matches the dataset's apparent business theme (e.g. e-commerce → funnel, membership, support, experiments; SaaS → activation, usage, churn)
  2. Uses the data you just confirmed is present and joinable
  3. Points at a specific decision or question (not "segment by X")

Pick a thread grounded in the data's strongest signal — a visible spike, a clear cohort split, or a conspicuous gap. For example: if a support_tickets table shows a sharp weekly-volume spike, a strong opener is "ticket volume jumped in week N — want to pull the thread on what drove it?"

Step 9 — Log every query

After running, append each query to .knowledge/query-log.md in the working folder: a dated line with the purpose, the SQL, and the row count.

Output Format

markdown
# Data Map: {display_name}

**Source:** {connection_type} @ {path}  •  **Active:** {min_date} → {max_date}  •  **Tables:** {n}

## Cross-Table Health

| Table | Rows | PK Unique | Primary Timestamp | Date Range | Days | Completeness |
|-------|-----:|:---------:|:------------------|:-----------|-----:|:-------------|
| users | 50,000 | ✅ | signup_timestamp | 2024-01-01 → 2024-12-31 | 366 | A |
| orders | 47,199 | ✅ | order_timestamp | 2024-01-02 → 2024-12-31 | 364 | A |
| ... | | | | | | |

**Legend:** ✅ PK unique, no nulls  •  ⚠ PK dupes or nulls  •  Completeness A (<1% null) / B (1-5%) / C (5-20%) / D (>20%)

## Relationship Map

[ASCII DAG]

## Join-Rate Matrix

| Child → Parent | Child Rows | Distinct FKs | Orphans |
|----------------|-----------:|-------------:|--------:|
| orders.user_id → users | 47,199 | 28,403 | 0.0% |
| ... | | | |

**Orphans > 1%** are flagged. Nullable FKs (e.g., `orders.promo_id`) are noted but not flagged.

## Date Alignment

- **Pivot range:** YYYY-MM-DD → YYYY-MM-DD ({N} days, all core facts present)
- **Misalignments:** [list any table with range <80% of pivot, or note "All core tables aligned."]
- **Calendar coverage:** [confirm calendar spans the pivot, or flag]

## Completeness Flags

[Any column with >5% nulls, excluding expected-nullable FKs. If none, write "No columns exceed 5% null threshold (excluding nullable FKs)."]

## Quirks

[From quirks.md, or "No quirks documented — run `/data-profiling` for deep profiling."]

## Thread to Pull

[One concrete analytical opener, 1-2 sentences, grounded in the data.]

---

_Generated by `data-map` skill. For a deeper statistical profile, run `/data-profiling`. For one-table DQ, ask about the table directly. For guided exploration, use `/explore`._

Budget and Safeguards

  • Query budget: ~2-4 queries per table + one per inferred FK. For a 13-table dataset this is typically 40-70 queries. All logged.
  • Large tables (>100M rows): Before running null-rate or PK-dupe checks, ask the user: "Table X has {N} rows — run full probe or sample at {sample_pct}%?" Default to sampling at 1% for >100M-row tables, full scan otherwise.
  • Connection failures: Fall back to the next available source (warehouse → local DuckDB → CSV) and note which source is active.
  • Schema drift: If a column referenced in schema.md doesn't exist in the live data, catch the error, note it in the Completeness Flags section, and continue.
  • Reference tables (no timestamp): calendar, products, promotions, experiments are static. Skip date range and note as "reference."

Anti-Patterns

  1. Never answer with schema-only. Schema.md is an input, not the output. The deliverable includes live probes.
  2. Never ask a steering question instead of running the map. The whole point is that the broadest question gets the broadest substantive answer. Asking "what do you want to explore?" violates this skill.
  3. Never skip date alignment. The "data starts 3 months apart" trap is the most common way analyses break — always check.
  4. Never skip the FK matrix. Orphan rates determine whether joins will silently drop data.
  5. Never fabricate PKs or FKs. If inference is ambiguous, say so and check the most plausible candidate.
  6. Never produce the thread-to-pull as a vague suggestion. It should cite a concrete signal visible in the data you just probed.
  7. Never skip the quirks section. Even "none documented yet" is a useful signal — it tells the student this dataset hasn't been explored in depth.

Interaction With Other Skills

  • Runs alongside data-quality-check: this skill is DQ at the dataset level; table-scoped DQ still fires on table-specific questions.
  • Supersedes data-inspect: if the user's question is open-ended ("tell me about") rather than /data-commanded, run data-map, not data-inspect.
  • Does not replace data-profiling: that skill is a deep, per-column statistical profile meant to run once after connection. data-map is the conversational first-contact answer.
  • Does not replace /explore: /explore is for iterative, user-steered exploration within an already-mapped dataset.

الأسئلة الشائعة

ماذا تفعل مهارة الذكاء الاصطناعي Data Map؟

Produce a cross-table data health map for the active dataset: row counts, date alignment, join rates, relationships, opening hypothesis. Trigger on dataset-wide open questions: "tell me about this data", "what's in here", "give me an overview", "map out the data", "what do I have", "what does this data look like". NOT for table-scoped questions (data-quality-check), /explore follow-ups, schema listing (/data), or deep profiles (data-profiling).

لماذا تستخدم Data Map على TypingMind؟

لأنك تثبّتها مرة واحدة وتستخدمها مع أي نموذج. مهارة Data Map عبارة عن نص Markdown وليست شيفرة خاصة بمزود بعينه، لذا تعمل المهارة نفسها مع GPT-5 أو Claude أو Gemini أو Grok أو نموذج محلي، ويمكنك تبديل النموذج أثناء المحادثة دون تعطّل المهارة. يعمل TypingMind بمفاتيح API الخاصة بك، فتدفع للمزودين مباشرةً بدلًا من اشتراك لكل مقعد، وتبقى مهاراتك ومحادثاتك في مساحة التخزين الخاصة بك.

كيف أثبّت Data Map في TypingMind؟

افتح الإضافات → المهارات → التثبيت من GitHub في TypingMind والصق https://github.com/ai-analyst-lab/ai-analyst-plugin/tree/main/ai-analyst-plus/skills/data-map. يقرأ TypingMind ملف SKILL.md الخاص بها ويثبّتها كمهارة يمكنك تفعيلها لكل محادثة على حدة.

ما نماذج الذكاء الاصطناعي التي يمكنها استخدام Data Map؟

أي نموذج تربطه في TypingMind. مهارات الذكاء الاصطناعي عبارة عن تعليمات Markdown وليست شيفرة خاصة بمزود بعينه، لذا يمكن لكل من GPT وClaude وGemini وGrok والنماذج المحلية تحميل هذه المهارة عندما يتوافق الطلب معها.

كم نموذج ذكاء اصطناعي يمكنني استخدامه مع Data Map؟

أي عدد تريده. ما دام النموذج يدعم المهارات، يمكنك استخدام Data Map معه، سواء كان GPT أو Claude أو Gemini أو Grok أو DeepSeek أو Mistral أو Llama أو غيرها، وكل ذلك على TypingMind باستخدام مفاتيح API الخاصة بك.

هل مهارة الذكاء الاصطناعي Data Map مجانية؟

نعم. نشرها ai-analyst-lab على GitHub بموجب ترخيص MIT. لا تدفع إلا لمزود الذكاء الاصطناعي الخاص بك مقابل التوكنات التي تستخدمها.

ما هي مهارات الذكاء الاصطناعي؟

مهارة الذكاء الاصطناعي حزمة تعليمات قابلة لإعادة الاستخدام تعلّم نموذج الذكاء الاصطناعي كيفية تنفيذ مهمة محددة. وتتبع تنسيق Agent Skills المفتوح: ملف SKILL.md يتضمن اسمًا ووصفًا، إلى جانب أي نصوص برمجية أو قوالب أو ملفات مرجعية قد يحتاج إليها النموذج. لا يقرأ النموذج التعليمات إلا عندما يتوافق طلبك مع المهارة، لذا لا تترتب على المهارة المثبتة أي تكلفة حتى تُستخدم.

كيف تختلف مهارات الذكاء الاصطناعي عن الإضافات أو موصلات MCP؟

تمنح الإضافة أو موصل MCP النموذج أدوات جديدة يمكنه استدعاؤها، وهي شيفرة تُنفَّذ في مكان ما وتُرجع نتيجة. أما مهارة الذكاء الاصطناعي فتزوّد النموذج بالمعرفة ومنهجية العمل: كيفية التعامل مع مهمة، والخطوات التي ينبغي اتباعها، وما ينبغي أن تكون عليه المخرجات الجيدة. المهارات عبارة عن نصوص Markdown، لذا لا تحتاج إلى خادم أو مفتاح API أو بيئة تشغيل، وتعمل مع أي نموذج.

عرض الكل

أنشئ مساحة عملك للذكاء الاصطناعي الآن

اشترك في نشرتنا البريدية لتصلك أخبار الميزات الجديدة والهدايا القادمة 👇