Back to list
simple-platform

data-seeding

by simple-platform

Simple Platform Tools

1🍴 1📅 Jan 25, 2026

SKILL.md


name: data-seeding description: Guide to seeding initial data using SCL instance blocks.

Data Seeding Skill

[!IMPORTANT] NEVER use Actions, Scripts, or SDK calls to seed initial static data. You must use SCL instance blocks for all static data (dictionaries, fixed records, configuration).

1. The instance Strategy

Simple Platform treats data defined in SCL as "Configuration as Data". This guarantees that:

  1. IDs are consistent across environments (Dev -> Stage -> Prod).
  2. Data is version-controlled.
  3. Deployments are idempotent (no duplicate inserts).

2. Syntax: The instance Block

Use the instance keyword to define records in your *.scl files.

Format

instance "<app>.<model>" "<human_readable_id>" {
  <field_name> = <value>
  <relation_field> = <relation_id>
}

Example: Seeding Room Types

File: apps/com.acme.crm/records/50_data_room_types.scl

instance "com.acme.crm.room_type" "kng" {
  code = "KNG"
  name = "King Room"
  base_rate = 250.00
  max_occupancy = 2
}

instance "com.acme.crm.room_type" "ste" {
  code = "STE"
  name = "Grand Suite"
  base_rate = 650.00
  max_occupancy = 4
}

Example: Seeding with Relations

File: apps/com.acme.crm/records/50_data_rooms.scl

instance "com.acme.crm.room" "101" {
  room_number = "101"
  floor = "1"
  property = "hq_grand_palace"  # References instance "com.acme.crm.property" "hq_grand_palace"
  room_type = "kng"             # References instance "com.acme.crm.room_type" "kng"
  housekeeping_status = "Clean" # Enum String
}

3. Rules for Values

  • Strings: Double quotes "Value".
  • Numbers: Direct 123 or 12.50.
  • Booleans: true or false.
  • Enums: Use the exact string value "Clean".
  • Relations: Use the string ID (the second argument of the instance definition) of the target record.

[!TIP] Place your seed data in apps/<app>/records/ with a prefix like 50_data_ to organize them.

Score

Total Score

60/100

Based on repository quality metrics

SKILL.md

SKILL.mdファイルが含まれている

+20
LICENSE

ライセンスが設定されている

+10
説明文

100文字以上の説明がある

0/10
人気

GitHub Stars 100以上

0/15
最近の活動

3ヶ月以内に更新がある

0/10
フォーク

10回以上フォークされている

0/5
Issue管理

オープンIssueが50未満

+5
言語

プログラミング言語が設定されている

+5
タグ

1つ以上のタグが設定されている

0/5

Reviews

💬

Reviews coming soon