Data Architecture Specのロゴ

Data Architecture Spec

コミュニティ
LuckyOneTwoThree
data-architecture-spec

Use when designing data architecture. Produces data architecture design specifications from PRD and architecture constraints, automatically designing business data dictionaries, ER models, table structures, index strategies, cache schemes, and data migration plans. Data boundaries divided by service data ownership from architecture plan. Business rule-driven normalization modeling. Keywords: data model, ER diagram, table structure, index, cache strategy, data migration, data dictionary, database design.

概要

公開者LuckyOneTwoThree
リポジトリvibe-skill
スキル名data-architecture-spec
スター
34
フォーク
8
同梱ファイル
指示のみ
ライセンスMIT
リンク
  • Markdown形式の指示

    モデルが必要に応じて読み込むSKILL.mdファイルです。関連するリクエストがあったときだけトークンを消費します。

  • どのLLMでも利用可能

    AIスキルはプロバイダー固有のコードではなく、通常のMarkdownなので、GPT、Claude、Gemini、Grok、ローカルモデルで利用できます。

  • 指示だけで完結

    モデルに必要なものはすべて指示に含まれているため、別途同期するファイルはありません。

  • オープンソース

    LuckyOneTwoThreeがGitHubで公開しています。インストールする前にソースを確認してください。

インストール

AIスキル「Data Architecture Spec」をTypingMindにインストールすれば、どのLLMでも利用できます。SKILL.mdを読み取れる別のAIエージェントに追加することもできます。

1

TypingMindにインストール

TypingMindはGitHubフォルダから直接スキルをインストールします。SKILL.mdを読み取り、リソースファイルをまとめてローカルに保存します。

  1. アプリを開き、「プラグイン」→「スキル」に移動します。
  2. 「GitHubからインストール」を選択します。
  3. 以下のスキルフォルダのURLを貼り付けて確定します。
    https://github.com/LuckyOneTwoThree/vibe-skill/tree/main/.codex/skills/data-architecture-spec
  4. スキルを利用したいチャットごとに、そのスキルを有効にしてください。
「プラグイン」→「スキル」→「スキルを追加」→「GitHubのURLから」を選択し、フォルダのURLを貼り付けて「続行」を押します。
2

別のAIエージェントにインストール

Agent Skills形式を読み取れるAIエージェントなら、このスキルを利用できます。フォルダをそのAIエージェントのスキルディレクトリにコピーしてください。

Claude Code — .claude/skills
git clone --depth 1 https://github.com/LuckyOneTwoThree/vibe-skill.git /tmp/vibe-skill
mkdir -p .claude/skills
cp -r /tmp/vibe-skill/.codex/skills/data-architecture-spec .claude/skills/data-architecture-spec
コピー後、新しいスキルを読み込むためにClaude Codeを再起動してください。

TypingMindで使用

TypingMindのチャットでData Architecture Specを有効にするだけで、あとはモデルが対応します。名前と説明がシステムプロンプトに含まれ、関連するリクエストがあると、モデルが指示の全文を自動で読み込みます。手動で呼び出す必要はなく、実際に使用されるまでトークンを消費しません。

関連するリクエストがあるとすぐに、モデルが自動的にData Architecture Specを読み込みます。

どのAIモデルでも利用可能

AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、Data Architecture Specは作成時に想定されたモデルに縛られません。TypingMindに一度インストールすれば、ご自身のAPIキーを使って、GPT-5、Claude、Gemini、Grok、DeepSeek、Mistral、Llama、またはご自身で実行するローカルモデルで利用できます。

  • 必要なときだけ読み込み

    システムプロンプトには名前と説明だけが含まれます。関連するリクエストが初めてあったときに指示を取得するため、スキルを使わない間は指示の読み込みにトークンを消費しません。

  • チャットの途中でモデルを切り替え

    スキルはコードではなく指示なので、モデルを切り替えてもそのまま使えます。次のモデルも同じSKILL.mdを読み込みます。

スキルの指示

モデルが読み込むSKILL.mdの内容です。スキルはモデルが従う指示なので、インストールする前に確認してください。

Data Architecture Design Specification

Core Principles

  1. Architecture Constraints First: Data models designed within architecture boundaries, each service's data ownership determined by architecture
  2. Business Data Standards Driven: Extract business data dictionary from PRD, ensuring unified data definitions
  3. Normalization and Denormalization Balance: Follow 3NF for write-intensive scenarios, moderate denormalization for read-intensive scenarios
  4. Evidence-Based Caching: Every cache item has a clear hit rate target and invalidation strategy
  5. Reversible Migrations: Every migration must have a corresponding rollback script

Interaction Mode

AI->Human AI suggests, human approves

Input

Input ItemTypeRequiredSourceDescription
PRDmarkdownYesoutput/pm-design/design-prd/prd.mdBusiness entity and relationship requirements
PRD Structured DataJSONYesoutput/pm-design/design-prd/prd.jsonMachine-consumable PRD version, containing entities[]/features[], for programmatic data model design consumption
Architecture PlanJSONYesoutput/backend-architecture/backend-architecture-spec/architecture_decision.jsonArchitecture pattern + topology diagram, determines database splitting strategy
Service Data OwnershipJSONYesoutput/backend-architecture/backend-architecture-spec/service_data_ownership.jsonData entities owned by each service, determines data model boundaries
Tech Stack DecisionJSONYesoutput/backend-architecture/backend-architecture-spec/tech_stack_decision.jsonUnified tech stack (including database type), replaces user-provided database_type
API ContractYAML/JSONOoutput/backend-api-design/api-design-spec/openapi.yamlInterface data structure definitions (empty when API not yet designed, normal case)
Data Volume EstimateJSONOUser providedCore table data volume and growth rate
Concurrency EstimateJSONOUser providedQPS/TPS peak and average
Current SchemaSQL/JSONOUser providedExisting database table structure (required for incremental projects)

Execution Steps

Step 1: Business Data Dictionary Extraction [Core]

Extract business data entity definitions from PRD, establishing product data standards:

  • Identify core business entities and attributes
  • Define data types, constraints, and business rules
  • Establish inter-entity relationships and referential integrity
  • Generate business data dictionary (for downstream consumption)

Stage Gate: Core business entities 100% have data dictionary definitions

Step 2: Entity Identification and Relationship Modeling [Core]

Extract data entities from PRD, service data ownership, and data dictionary:

  • Identify core business entities (noun extraction)
  • Group entities by service data ownership (service_data_ownership.json) into corresponding bounded contexts
  • Determine inter-entity relationships (1:1 / 1:N / N:M)
  • Annotate relationship cardinality and optionality
  • Generate ER diagram

Relationship Mapping Rules:

  • 1:1 -> Add foreign key to primary table + UNIQUE constraint
  • 1:N -> Add foreign key to child table
  • N:M -> Create association table

Step 3: Table Structure and Index Design [Core]

Design table structure for each entity (primary key, foreign key, timestamps, soft delete, status fields and other common field conventions), design index strategy and database sharding plan.

Architecture Constraint Adaptation:

  • Microservices: Determine whether database-per-service is needed based on service data ownership
  • Monolithic: All entities in the same database, grouped by bounded context using schema prefixes
  • Serverless: Consider using DynamoDB or other non-relational database table design

Stage Gate: ER diagram + DDL + data dictionary complete

Step 4: Cache Strategy Design [Core]

Identify data access patterns requiring caching, design multi-level cache architecture, consistency strategy, and penetration/breakdown/avalanche protection.

Cache Decision Matrix:

ScenarioRead/Write RatioConsistency RequirementRecommended Cache StrategyConsistency SchemeTTL Suggestion
User profileRead>>WriteStrong consistencycache-asideWrite invalidate (delete cache after DB update)5min
Product/Course listRead>>>WriteEventual consistencycache-aside + TTLWrite invalidate + short TTL fallback1-5min
Product/Course detailRead>>>WriteEventual consistencycache-asideWrite invalidate5-10min
Inventory/BalanceRead~=WriteStrong consistencywrite-throughWrite through (sync write DB+cache)No TTL
Hot rankingsRead>>>>WriteEventual consistencycache-aside + warmupScheduled refresh1min
Config/DictionaryRead>>>>>>WriteWeak consistencycache-aside + long TTLManual invalidation + long TTL30min
Session/TokenRead>>WriteStrong consistencyDistributed cacheWrite through + short TTLConsistent with Token expiration
Search resultsRead>>>WriteWeak consistencyLocal cache + distributed cacheScheduled refresh30s-2min

Cache Level Selection:

Data VolumeAccess FrequencyRecommended Level
<100MBExtremely high (>10K QPS)Local cache + distributed cache
100MB-1GBHigh (1K-10K QPS)Distributed cache
>1GBMedium-lowDistributed cache + on-demand loading

Penetration/Breakdown/Avalanche Protection:

ProblemCauseProtection Scheme
Cache penetrationQuerying non-existent dataBloom filter + null value caching (TTL 30s)
Cache breakdownHot key expiration with massive concurrent requestsMutex lock (only allow one request to fetch from source) + never expire (async refresh)
Cache avalancheLarge number of keys expiring simultaneouslyTTL with random offset (+-10%) + multi-level cache expiration time staggered

Stage Gate: Penetration/breakdown/avalanche protection fully covered

Step 5: Data Migration Plan [Core]

Compare current Schema with target Schema, generate migration scripts + rollback scripts + verification plan. Skip this step for new projects.

Stage Gate: 100% of changes have rollback scripts, data model human-confirmed

Output

Metadata Output: output/backend-data-architecture/data-architecture-spec/

Output Files:

  • data_dictionary.json -- Business data dictionary
  • er_model.json -- ER model + DDL + index strategy
  • cache_strategy.json -- Cache scheme
  • migration_plan.json -- Migration plan (incremental projects)
  • data-coverage.json -- API alignment coverage report

er_model.json Schema:

json
{
  "type": "object",
  "required": ["entities", "relationships"],
  "properties": {
    "entities": {
      "type": "array",
      "items": {
        "type": "object",
        "required": ["name", "table_name", "bounded_context", "fields"],
        "properties": {
          "name": { "type": "string" },
          "table_name": { "type": "string" },
          "bounded_context": { "type": "string" },
          "fields": { "type": "array", "items": { "type": "object", "required": ["name", "type", "nullable"], "properties": { "name": { "type": "string" }, "type": { "type": "string" }, "nullable": { "type": "boolean" }, "default": {}, "constraints": { "type": "array", "items": { "type": "string" } } } } },
          "indexes": { "type": "array", "items": { "type": "object", "properties": { "name": { "type": "string" }, "fields": { "type": "array", "items": { "type": "string" } }, "unique": { "type": "boolean" }, "query_scenario": { "type": "string" } } } },
          "ddl": { "type": "string" }
        }
      }
    },
    "relationships": {
      "type": "array",
      "items": {
        "type": "object",
        "required": ["from", "to", "type"],
        "properties": {
          "from": { "type": "string" },
          "to": { "type": "string" },
          "type": { "type": "string", "enum": ["1:1", "1:N", "N:M"] },
          "through": { "type": "string" },
          "foreign_key": { "type": "string" }
        }
      }
    }
  }
}

cache_strategy.json Schema:

json
{
  "type": "object",
  "required": ["strategies"],
  "properties": {
    "strategies": {
      "type": "array",
      "items": {
        "type": "object",
        "required": ["entity", "cache_type", "ttl", "invalidation"],
        "properties": {
          "entity": { "type": "string" },
          "cache_type": { "type": "string", "enum": ["local", "distributed", "multi-level"] },
          "ttl": { "type": "string" },
          "invalidation": { "type": "string", "enum": ["write-through", "write-behind", "cache-aside"] },
          "penetration_protection": { "type": "boolean" },
          "breakdown_protection": { "type": "boolean" },
          "avalanche_protection": { "type": "boolean" }
        }
      }
    }
  }
}

Decision Rules

ConditionDecision
Write-intensive scenarioFollow 3NF
Read-intensive scenarioModerate denormalization
Read/write ratio >10:1High cache value
Hotspot dataMulti-level caching + warmup
Large table migrationOnline DDL or dual-write strategy
Multi-tenant + tenant count >100Shared database + tenant_id

Quality Checks

  • Core business entities 100% have data dictionary definitions
  • Each entity has complete table structure design
  • Indexes have clear query scenario support
  • Penetration/breakdown/avalanche protection fully covered
  • Migration scripts 100% have rollback scripts
  • API data requirements 100% have Model field coverage

Degradation Strategy

Missing Upstream InputDegradation PlanOutput Impact
Architecture plan missingDefault monolithic architecture, all entities in same databaseDatabase splitting strategy may not match
Service data ownership missingDerive entity ownership from PRD, mark "service ownership pending confirmation"Data model boundaries may be inaccurate
Tech stack decision missingDefault PostgreSQL + PrismaSQL dialect and ORM may not match
API contract missingNormal case, API not yet designed, data model designed independently based on PRD + service data ownershipNo API alignment coverage report
PRD missingCannot design data architectureOutput is empty
Current Schema missingDesign new table structures only, no migration scriptsNo migration plan
Concurrency estimate missingDesign caching for moderate concurrencyCache scheme may be insufficient or excessive

Upstream Change Response

Upstream ChangeImpact ScopeResponse Strategy
PRD entity add/removeData model + data dictionaryMark affected entities, generate change list
Architecture plan changeDatabase splitting strategyRe-evaluate database-per-service needs, adjust data model boundaries
Service data ownership changeEntity grouping + table structureRe-divide entity ownership, assess cross-service data migration needs
API contract changeTable structure and indexesMark affected fields, assess migration needs
Change TypeImpact ScopeNotification Method
ER model changeapi-design-spec, data-architecture-impl, backend-architecture-implMark affected entities and fields, update er_model.json
Cache strategy changedata-architecture-impl, backend-architecture-implMark affected cache configurations, update cache_strategy.json
Data dictionary changeapi-design-specMark affected field naming and types, update data_dictionary.json

よくある質問

AIスキル「Data Architecture Spec」では何ができますか?

Use when designing data architecture. Produces data architecture design specifications from PRD and architecture constraints, automatically designing business data dictionaries, ER models, table structures, index strategies, cache schemes, and data migration plans. Data boundaries divided by service data ownership from architecture plan. Business rule-driven normalization modeling. Keywords: data model, ER diagram, table structure, index, cache strategy, data migration, data dictionary, database design.

TypingMindでData Architecture Specを使うメリットは何ですか?

一度インストールすれば、どのモデルでも使えるからです。Data Architecture Specはプロバイダー固有のコードではなく、通常のMarkdownで記述されているため、同じスキルをGPT-5、Claude、Gemini、Grok、ローカルモデルで利用できます。チャットの途中でモデルを切り替えても、そのまま使い続けられます。TypingMindは自分のAPIキーで動作するため、シート単位のサブスクリプションではなく、プロバイダーに直接料金を支払います。スキルとチャットは自分のストレージに保持されます。

TypingMindにData Architecture Specをインストールするにはどうすればよいですか?

TypingMindで「プラグイン」→「スキル」→「GitHubからインストール」を開き、https://github.com/LuckyOneTwoThree/vibe-skill/tree/main/.codex/skills/data-architecture-specを貼り付けてください。TypingMindがSKILL.mdを読み込み、チャットごとに有効にできるスキルとしてインストールします。

Data Architecture Specを使えるAIモデルはどれですか?

TypingMindに接続したどのモデルでも利用できます。AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、GPT、Claude、Gemini、Grok、ローカルモデルのいずれも、リクエストの内容がこのスキルの用途に合ったときに、このスキルを読み込めます。

Data Architecture Specで使えるAIモデルの数に制限はありますか?

数に制限はありません。スキルに対応したモデルであれば、GPT、Claude、Gemini、Grok、DeepSeek、Mistral、Llamaなど、どのモデルでもData Architecture Specを利用できます。すべてTypingMind上で、自分のAPIキーを使って利用できます。

AIスキル「Data Architecture Spec」は無料ですか?

はい。LuckyOneTwoThreeがMITライセンスのもとでGitHubに公開しています。ご利用のAIプロバイダーに支払うのは、使用したトークンの料金だけです。

AIスキルとは何ですか?

AIスキルは、特定のタスクの実行方法をAIモデルに教える、再利用可能な指示のセットです。オープンなAgent Skills形式に従い、名前と説明を含むSKILL.mdファイルに加え、モデルが必要とするスクリプト、テンプレート、参照ファイルで構成されます。モデルはリクエストがスキルに合致したときだけ指示を読み込むため、インストール済みのスキルも、使うまでは費用がかかりません。

AIスキルは、プラグインやMCPサーバーとどう違いますか?

プラグインやMCPサーバーは、モデルが呼び出せる新しいツールを提供します。ツールとは、どこかで実行され、結果を返すコードです。一方、AIスキルは、タスクへの取り組み方、従うべき手順、望ましい出力の例といった知識や進め方をモデルに伝えます。スキルは通常のMarkdownで記述されているため、サーバー、APIキー、実行環境は不要で、どのモデルでも利用できます。

すべて見る

今すぐ自分専用のAIワークスペースを作成

ニュースレターに登録すると、新機能や今後のプレゼント企画のお知らせが届きます👇