ワンクリックで
cldr-generator
Understand, run, or update the CLDR data generation pipeline that produces internal/cldr/data.go.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Understand, run, or update the CLDR data generation pipeline that produces internal/cldr/data.go.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
| name | cldr-generator |
| description | Understand, run, or update the CLDR data generation pipeline that produces internal/cldr/data.go. |
This skill provides guidance on how to run, update, and debug the CLDR (Common Locale Data Repository) Go code generator in this project.
The internal/gen tool processes raw XML files from the .cldr directory and compiles them into a single optimized Go source file data.go. It deduplicates all localized string tokens into a single read-only constant string (data), which is sliced at runtime without memory allocation.
The generation pipeline works in three distinct phases:
common/main concurrently using goroutines."" or "contributed").CLDR structures use inheritance to avoid redundancy. The generator resolves and merges this data:
root -> base languages like en -> region/territory sub-locales like en-US).generic calendar date/time formatting options into persian and buddhist calendars.To avoid runtime allocations and keep the binary footprint small:
data in data.go.data[start:end]). Since string slicing does not allocate in Go, this yields zero allocations at runtime.When modifying locale formatting or adding a new locale fallback, use the following sequence:
Modify XML or Generator Code:
Run Code Generation:
earth +generate
go run ./internal/gen -cldr-dir .cldr -out .
Verify Changes:
earth +test
lv):
go test -run=TestDateTime_Format/lv .