Logo Customer Id Architect

Customer Id Architect

Cộng đồng
ojiudezue
customer-id-architect

Dùng khi người dùng thiết kế danh tính khách hàng, xác thực hoặc chuyển đổi khỏi mã định danh dựa trên email. Kích hoạt với các cụm từ như “khóa chính”, “ID khách hàng”, “mã định danh người dùng”, “dùng email làm ID”, “GUID”, “gộp tài khoản”, “gộp người dùng”, “người dùng muốn đổi email”, “chuyển đổi SSO”. Triển khai quy tắc kiến trúc Dùng GUID cho danh tính từ Chương 4 của Building Rocketships.

Add to TypingMind

Tổng quan

Nhà phát hànhojiudezue
Kho mãproductmind-skills
Tên kỹ năngcustomer-id-architect
Sao
81
Bản fork
18
Tệp đi kèm
Chỉ có hướng dẫn
Liên kết
  • Hướng dẫn bằng Markdown

    Tệp SKILL.md được mô hình tải khi cần, nên chỉ tốn token khi có yêu cầu thực sự phù hợp.

  • Dùng được với mọi LLM

    Kỹ năng AI dùng hướng dẫn viết bằng Markdown thay vì mã dành riêng cho một nhà cung cấp, nên dùng được với GPT, Claude, Gemini, Grok hoặc mô hình cục bộ.

  • Hướng dẫn có đủ mọi thứ cần thiết

    Mọi thứ mô hình cần đều nằm trong hướng dẫn — không có tệp bổ sung cần đồng bộ.

  • Mã nguồn mở

    Được ojiudezue công bố trên GitHub. Hãy đọc các tệp nguồn trước khi cài đặt.

Cài đặt

Cài đặt kỹ năng AI Customer Id Architect trong TypingMind để dùng với bất kỳ LLM nào, hoặc thêm vào một tác nhân AI khác có thể đọc SKILL.md.

1

Cài đặt trong TypingMind

TypingMind cài đặt kỹ năng trực tiếp từ thư mục GitHub — đọc SKILL.md, đóng gói các tệp tài nguyên và lưu kết quả trên máy.

  1. Mở ứng dụng và vào Plugin → Kỹ năng.
  2. Chọn "Cài đặt từ GitHub".
  3. Dán URL của thư mục kỹ năng được hiển thị bên dưới rồi xác nhận.
    https://github.com/ojiudezue/productmind-skills/tree/main/skills/customer-id-architect
  4. Bật kỹ năng trong từng cuộc trò chuyện mà bạn muốn sử dụng kỹ năng đó.
Plugin → Kỹ năng → Thêm kỹ năng → Từ URL GitHub, sau đó dán URL thư mục và nhấn Tiếp tục.
2

Cài đặt trong tác nhân AI khác

Bất kỳ tác nhân AI nào đọc được định dạng Agent Skills đều có thể dùng kỹ năng này — hãy sao chép thư mục vào thư mục kỹ năng của tác nhân AI đó.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/ojiudezue/productmind-skills.git /tmp/productmind-skills
mkdir -p .claude/skills
cp -r /tmp/productmind-skills/skills/customer-id-architect .claude/skills/customer-id-architect
Khởi động lại Claude Code sau khi sao chép để ứng dụng nhận kỹ năng mới.

Sử dụng trong TypingMind

Bật Customer Id Architect trong bất kỳ cuộc trò chuyện nào trên TypingMind, mô hình sẽ tự xử lý phần còn lại. Tên và mô tả của kỹ năng nằm trong prompt hệ thống. Ngay khi có yêu cầu phù hợp, mô hình tự tải toàn bộ hướng dẫn — bạn không cần gọi thủ công và kỹ năng không tốn token cho đến khi thực sự được dùng.

Mô hình tự nạp Customer Id Architect ngay khi có yêu cầu phù hợp.

Dùng được với mọi mô hình AI

Kỹ năng AI là các hướng dẫn Markdown thuần túy, không phải mã dành riêng cho một nhà cung cấp, nên bạn có thể dùng Customer Id Architect với cả những mô hình khác ngoài mô hình ban đầu. Chỉ cần cài đặt một lần trong TypingMind rồi dùng với GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama hoặc mô hình cục bộ do bạn tự chạy — tất cả đều dùng khóa API của riêng bạn.

  • Chỉ tải khi cần

    Prompt hệ thống chỉ chứa tên và mô tả. Hướng dẫn được tải khi có yêu cầu phù hợp đầu tiên, nên khi kỹ năng chưa được dùng, bạn không tốn token cho phần hướng dẫn.

  • Đổi mô hình ngay trong cuộc trò chuyện

    Vì kỹ năng là hướng dẫn chứ không phải mã, việc đổi mô hình không làm kỹ năng ngừng hoạt động — mô hình tiếp theo vẫn đọc cùng tệp SKILL.md.

Hướng dẫn của kỹ năng

Đây là nội dung SKILL.md mà mô hình tải. Hãy đọc trước khi cài đặt — kỹ năng là những hướng dẫn mà mô hình của bạn sẽ làm theo.

Customer ID Architect

What this does

Runs Ch 4's identity architecture rule. Returns a proposed identity schema using random GUIDs as primary keys, an audit of the user's current system for the email-as-ID anti-pattern, and a migration sequence if a fix is needed. Refuses to recommend email or any other human-readable identifier as a primary key.

When to use

Trigger when the user:

  • Is designing a new product or account system from scratch
  • Has email or username as the primary user identifier and is feeling the pain (users can't change email, can't merge duplicate accounts, can't move identifiers across SSO providers)
  • Is planning to add SSO and discovering email-based IDs break the switch
  • Wants to support B2B "user joins second org" or "user changes employer" flows
  • Has duplicate-account problems and wants to merge

When NOT to use

  • The product has no users yet — the rule still applies, but route to aha-mapper and sharp-problem-test first; identity is a detail at pre-PMF
  • The user is asking about authentication providers, not identity architecture — different question; this skill addresses the primary-key choice, not the auth flow
  • The user is asking about Customer Data Platforms or analytics identifiers — different concern; analytics IDs can mirror the app's GUID but are out of scope here

The rule (from Ch 4)

Use a random GUID as the primary key for every user record. Never email, phone number, username, employee ID, or any other human- readable identifier.

Human-readable identifiers ATTACH to the GUID as attributes the user can change without losing history:

user (
  id GUID PRIMARY KEY,     -- never changes
  email STRING NULLABLE,   -- can be swapped, removed, added
  phone STRING NULLABLE,   -- can be swapped, removed, added
  username STRING NULLABLE,
  external_sso_ids JSON,   -- one or many provider IDs
  ...
)

When a user changes their email, you UPDATE the email column. The GUID — and every record that references it — stays put. No data migration. No history loss. No "we'll fix it next quarter."

Why this matters (the book's argument)

The pain of email-as-ID compounds over time:

  • Year 1: users complain when they can't change email. You ship a manual workaround.
  • Year 2: SSO arrives. Your IDs break because SSO providers return different emails for the same human. You ship a deduplication layer.
  • Year 3: a B2B customer asks to merge two accounts that were created at different employers. You either say no (losing the customer) or write a custom migration (costing weeks).
  • Year 4: a privacy law requires email deletion. Your data model breaks because the email IS the key.

Every one of these is free if the primary key is a GUID.

Decision rule for verdict

  • SOUND — primary key is a random GUID; human-readable identifiers are attached as nullable, mutable columns
  • UNSOUND — primary key is email, username, phone, employee ID, or any other human-readable string
  • NEEDS_MORE_INPUT — the user hasn't said what the current primary key is

Refusal mode (the anti-pattern from CLAUDE.md)

Email as primary customer ID is an outright refuse. If the user proposes it or has it, return UNSOUND with the named migration risks and the recommended fix sequence. Do not soften this — the book's position is unambiguous.

If the user pushes back ("but we don't have an SSO problem yet"), list the future scenarios (above) and quantify when the pain hits. Don't recommend deferring; the migration only gets harder.

The migration sequence (when email-as-ID exists today)

The book's recommended path:

  1. Add a guid column to the user table, generate values for existing rows, make it indexed but not yet the primary key
  2. Switch all foreign-key references to point to guid instead of email. This is the bulk of the work — touch every FK.
  3. Make guid the primary key, demote email to a nullable attribute. Keep the unique constraint on email for now.
  4. Drop the unique constraint on email when you're ready to support email-swap and duplicate-account-merge
  5. Add merge logic — when two GUIDs need to become one, re-parent their child records to the surviving GUID

Steps 1–3 are mechanical and can happen behind a feature flag. Steps 4–5 unlock the actual product features.

Inputs

  • Current primary key type (email, username, GUID, other, unknown)
  • Current scale (number of users, number of FKs into user table)
  • What downstream systems already use the current key (analytics, billing, CRM, support tooling)
  • (Optional) the immediate pain forcing the question (SSO arriving, GDPR, B2B merge request, etc.)
  • (Optional) constraints (cannot have downtime, must preserve historical data, etc.)

Output structure

## Identity verdict: [SOUND | UNSOUND | NEEDS_MORE_INPUT]

### Current state
- Primary key: [type + brief observation]
- Anti-pattern present: [yes/no, name it]
- Downstream coupling: [analytics, billing, etc.]

### Proposed schema
```sql
user (
  id GUID PRIMARY KEY,
  email STRING NULLABLE,
  ...
)

Migration sequence (if UNSOUND)

  1. ...
  2. ...

Risks if no fix

  • [Risk + when it bites]

Recommendation

[Concrete next step]

Analogous case from the book

[A named example]


## Worked example from the book

### Calendly's identity model (Ch 4) → SOUND
- Primary key: random GUID (UUID v4) on the user table
- Human-readable attributes attached: email (mutable), phone
  (optional), connected calendar providers (multiple OAuth IDs)
- Result: a Calendly user can change their email, sign in via Google
  one day and Microsoft the next, or merge two accounts created at
  different jobs — all without losing event types, share links,
  bookings, or historical data
- The schema cost ~1 day at founding. The avoided pain compounds
  every year.

### An email-as-ID startup (Ch 4) → UNSOUND
- Primary key: email
- Year 2 SSO migration: 3 engineer-months
- Year 3 B2B merge feature: shipped 9 months late because the
  migration was tangled with billing and CRM
- The cost of the original choice: ~12 engineer-months over 3 years
  to undo a 1-day savings at founding

## Gotchas

- **GUID v4 (random) over v1 (timestamp-based).** v1 leaks creation
  time and MAC address in some implementations. v4 is purely random.
- **Don't expose GUIDs in URLs that users see.** Use a separate
  human-friendly slug column for display. The GUID stays internal.
- **Mirror the GUID into analytics, CRM, billing, support.** Make
  the GUID the universal customer ID across systems on day one;
  otherwise you rebuild this rule for each downstream tool.
- **One-time encryption / hashing of emails for lookup** still
  doesn't make email a safe primary key. The hash becomes the new
  unchangeable ID with all the same problems.

## Anti-patterns to flag

If the user's design has any of these, surface them:
- Email as primary key — refuse (cite Ch 4)
- Username as primary key — same problem; refuse
- Employee ID / SSO subject as primary key — couples your data model
  to a third party that can rotate it
- "We'll switch to GUIDs later when we hit scale" — the migration
  gets harder with scale, not easier; refuse the defer
- GUID v1 (Mongo ObjectID-style) without justification — recommend
  v4 unless there's a real reason for ordered IDs

## Source

Ch 4: Customer Identity Architecture.

---
## About this skill

This skill is part of the **[ProductMind Skills](https://github.com/ojiudezue/productmind-skills)** catalog — open-source product-judgment skills for AI coding agents.

**Source:** *Building Rocketships* by Oji and Ezinne Udezue — Chapter 4.
This skill applies one named framework from the book. It works standalone in any agent that supports the SKILL.md standard.

**Want the orchestrated version?** The **RocketshipsGPT agent** runs all 13 book skills together, with persistent memory, framework-fidelity evals, voice-checked output, and the book's anti-pattern catches built in. → [rocketshipsgpt.productmind.co](https://rocketshipsgpt.productmind.co?utm_source=pms&utm_medium=skill-footer&utm_campaign=customer-id-architect)

**License:** Skill content licensed under [CC BY-SA 4.0](https://creativecommons.org/licenses/by-sa/4.0/). Attribution required; derivative works must share alike. See [ADR 0005](https://github.com/ojiudezue/BuildingRocketships/blob/main/docs/adr/0005-license-split.md) for rationale.

**Skill version:** 1.0.0 · **Published:** 2026-06-05

Câu hỏi thường gặp

Kỹ năng AI Customer Id Architect làm được gì?

Dùng khi người dùng thiết kế danh tính khách hàng, xác thực hoặc chuyển đổi khỏi mã định danh dựa trên email. Kích hoạt với các cụm từ như “khóa chính”, “ID khách hàng”, “mã định danh người dùng”, “dùng email làm ID”, “GUID”, “gộp tài khoản”, “gộp người dùng”, “người dùng muốn đổi email”, “chuyển đổi SSO”. Triển khai quy tắc kiến trúc Dùng GUID cho danh tính từ Chương 4 của Building Rocketships.

Vì sao nên dùng Customer Id Architect trên TypingMind?

Vì bạn chỉ cần cài một lần rồi dùng với bất kỳ mô hình nào. Customer Id Architect là nội dung Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên cùng một kỹ năng có thể chạy trên GPT-5, Claude, Gemini, Grok hoặc mô hình trên thiết bị — và bạn có thể đổi mô hình ngay trong cuộc trò chuyện mà kỹ năng vẫn hoạt động. TypingMind dùng khóa API riêng của bạn, nên bạn thanh toán trực tiếp cho nhà cung cấp thay vì trả phí thuê bao theo suất người dùng, đồng thời kỹ năng và các cuộc trò chuyện vẫn nằm trong bộ lưu trữ của bạn.

Làm thế nào để cài Customer Id Architect trong TypingMind?

Mở Plugin → Kỹ năng → Cài đặt từ GitHub trong TypingMind rồi dán https://github.com/ojiudezue/productmind-skills/tree/main/skills/customer-id-architect. TypingMind đọc tệp SKILL.md rồi cài đặt kỹ năng để bạn có thể bật cho từng cuộc trò chuyện.

Những mô hình AI nào có thể dùng Customer Id Architect?

Bất kỳ mô hình nào bạn kết nối trong TypingMind. Kỹ năng AI là các hướng dẫn bằng Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên GPT, Claude, Gemini, Grok và các mô hình chạy trên thiết bị đều có thể tải kỹ năng này khi có yêu cầu phù hợp.

Có thể dùng Customer Id Architect với bao nhiêu mô hình AI?

Bao nhiêu cũng được. Miễn là mô hình hỗ trợ kỹ năng, bạn có thể dùng Customer Id Architect với mô hình đó — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama và nhiều mô hình khác — tất cả đều trên TypingMind với khóa API riêng của bạn.

Kỹ năng AI Customer Id Architect có miễn phí không?

Kỹ năng này được ojiudezue phát hành trên GitHub. Hãy xem điều khoản giấy phép trong kho mã. Bạn chỉ trả tiền cho nhà cung cấp AI của mình theo số token đã dùng.

Kỹ năng AI là gì?

Kỹ năng AI là một gói hướng dẫn có thể tái sử dụng, chỉ cho mô hình AI cách thực hiện một tác vụ cụ thể. Kỹ năng tuân theo định dạng mở Agent Skills: một tệp SKILL.md chứa tên và mô tả, cùng các tập lệnh, mẫu hoặc tệp tham khảo mà mô hình có thể cần. Mô hình chỉ đọc hướng dẫn khi yêu cầu của bạn phù hợp với kỹ năng, nên kỹ năng đã cài đặt không phát sinh chi phí cho đến khi được sử dụng.

Kỹ năng AI khác gì với plugin hoặc máy chủ MCP?

Plugin hoặc máy chủ MCP cung cấp các công cụ mới mà mô hình có thể gọi. Khi mô hình gọi một công cụ, mã của công cụ đó chạy ở đâu đó và trả về kết quả. Còn kỹ năng AI cung cấp kiến thức và quy trình: cách tiếp cận tác vụ, các bước cần thực hiện và những tiêu chí mà kết quả cần đáp ứng. Kỹ năng chỉ là nội dung Markdown, nên không cần máy chủ, khóa API hay môi trường thực thi và hoạt động với mọi mô hình.

Xem tất cả

Tạo ngay không gian làm việc AI riêng

Đăng ký bản tin của chúng tôi để nhận thông báo về tính năng mới và các đợt tặng quà sắp tới 👇