← スキル一覧に戻る
1. The
2. Syntax: The

data-seeding
by simple-platform
Simple Platform Tools
⭐ 1🍴 1📅 2026年1月25日
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
instanceblocks 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:
- IDs are consistent across environments (Dev -> Stage -> Prod).
- Data is version-controlled.
- 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
123or12.50. - Booleans:
trueorfalse. - Enums: Use the exact string value
"Clean". - Relations: Use the string ID (the second argument of the
instancedefinition) of the target record.
[!TIP] Place your seed data in
apps/<app>/records/with a prefix like50_data_to organize them.
スコア
総合スコア
60/100
リポジトリの品質指標に基づく評価
✓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
レビュー
💬
レビュー機能は近日公開予定です