core-development
DSL処理ロジックやデータフローといったコアパッケージ(型、検証、正規化、差分)を修正する際に活用し、システムの根幹部分の開発作業を効率的に進めるSkill。
📜 元の英語説明(参考)
Work on the core package (types, validation, normalization, diff). Use when modifying DSL processing logic or data flow.
🇯🇵 日本人クリエイター向け解説
DSL処理ロジックやデータフローといったコアパッケージ(型、検証、正規化、差分)を修正する際に活用し、システムの根幹部分の開発作業を効率的に進めるSkill。
※ jpskill.com 編集部が日本のビジネス現場向けに補足した解説です。Skill本体の挙動とは独立した参考情報です。
下記のコマンドをコピーしてターミナル(Mac/Linux)または PowerShell(Windows)に貼り付けてください。 ダウンロード → 解凍 → 配置まで全自動。
mkdir -p ~/.claude/skills && cd ~/.claude/skills && curl -L -o core-development.zip https://jpskill.com/download/16763.zip && unzip -o core-development.zip && rm core-development.zip
$d = "$env:USERPROFILE\.claude\skills"; ni -Force -ItemType Directory $d | Out-Null; iwr https://jpskill.com/download/16763.zip -OutFile "$d\core-development.zip"; Expand-Archive "$d\core-development.zip" -DestinationPath $d -Force; ri "$d\core-development.zip"
完了後、Claude Code を再起動 → 普通に「動画プロンプト作って」のように話しかけるだけで自動発動します。
💾 手動でダウンロードしたい(コマンドが難しい人向け)
- 1. 下の青いボタンを押して
core-development.zipをダウンロード - 2. ZIPファイルをダブルクリックで解凍 →
core-developmentフォルダができる - 3. そのフォルダを
C:\Users\あなたの名前\.claude\skills\(Win)または~/.claude/skills/(Mac)へ移動 - 4. Claude Code を再起動
⚠️ ダウンロード・利用は自己責任でお願いします。当サイトは内容・動作・安全性について責任を負いません。
🎯 このSkillでできること
下記の説明文を読むと、このSkillがあなたに何をしてくれるかが分かります。Claudeにこの分野の依頼をすると、自動で発動します。
📦 インストール方法 (3ステップ)
- 1. 上の「ダウンロード」ボタンを押して .skill ファイルを取得
- 2. ファイル名の拡張子を .skill から .zip に変えて展開(macは自動展開可)
- 3. 展開してできたフォルダを、ホームフォルダの
.claude/skills/に置く- · macOS / Linux:
~/.claude/skills/ - · Windows:
%USERPROFILE%\.claude\skills\
- · macOS / Linux:
Claude Code を再起動すれば完了。「このSkillを使って…」と話しかけなくても、関連する依頼で自動的に呼び出されます。
詳しい使い方ガイドを見る →- 最終更新
- 2026-05-18
- 取得日時
- 2026-05-18
- 同梱ファイル
- 1
📖 Skill本文(日本語訳)
※ 原文(英語/中国語)を Gemini で日本語化したものです。Claude 自身は原文を読みます。誤訳がある場合は原文をご確認ください。
コアパッケージの開発
コアパッケージ (packages/core/) は依存関係がなく、すべての DSL 処理を扱います。
データフロー
DSL (YAML input) → validate() → normalize() → IR → diff() → Patch
主要ファイル
| ファイル | 目的 | エクスポート |
|---|---|---|
types.ts |
型定義 | DSL, IR, Patch, WebSocket プロトコル |
validate.ts |
YAML バリデーション | validate(dsl): ValidationResult |
normalize.ts |
DSL → IR 変換 | normalize(dsl): IRDocument |
diff.ts |
IR 差分計算 | diff(prev, next): Patch |
型階層
DSL Types (user input) IR Types (normalized)
───────────────────── ────────────────────
DSLDocument IRDocument
├─ version: number ├─ version: number
├─ docId: string ├─ docId: string
├─ title?: string ├─ title: string
├─ nodes: DSLNode[] ├─ nodes: Record<string, IRNode>
└─ edges?: DSLEdge[] └─ edges: Record<string, IREdge>
DSLNode IRNode
├─ id: string ├─ id: string
├─ provider: string ├─ provider: string
├─ kind: string ├─ kind: string
├─ label?: string ├─ label: string (default: id)
├─ parent?: string ├─ parent: string | null
└─ layout: DSLLayout └─ layout: { x, y, w, h }
DSLEdge IREdge
├─ id: string ├─ id: string
├─ from: string ├─ from: string
├─ to: string ├─ to: string
└─ label?: string └─ label: string (default: "")
Patch 操作
type PatchOp =
| { op: "upsertNode"; node: IRNode }
| { op: "removeNode"; id: string }
| { op: "upsertEdge"; edge: IREdge }
| { op: "removeEdge"; id: string };
interface Patch {
baseRev: number;
nextRev: number;
ops: PatchOp[];
}
WebSocket プロトコル型
// Plugin → CLI
interface HelloMessage {
type: "hello";
docId: string;
secret?: string;
}
interface RequestFullMessage {
type: "requestFull";
docId: string;
}
// CLI → Plugin
interface FullMessage {
type: "full";
rev: number;
ir: IRDocument;
}
interface PatchMessage {
type: "patch";
baseRev: number;
nextRev: number;
ops: PatchOp[];
}
interface ErrorMessage {
type: "error";
message: string;
}
開発ワークフロー
- 型の修正 →
types.tsを更新します - バリデーションの更新 →
validate.tsが無効な入力を確実に捕捉するようにします - 正規化の更新 →
normalize.tsで新しいフィールド/デフォルトを処理します - 差分の更新 →
diff.tsで新しいパッチのシナリオを処理します - テストの追加 → 同じ場所に
*.test.tsファイルを配置します - テストの実行 →
bun test packages/core/
テスト
# すべてのコアテスト
bun test packages/core/
# 特定のテストファイル
bun test packages/core/src/diff.test.ts
bun test packages/core/src/validate.test.ts
bun test packages/core/src/normalize.test.ts
# ウォッチモード
bun test --watch packages/core/
一般的なパターン
新しいノードプロパティの追加
types.tsのDSLNodeとIRNodeに追加しますvalidate.tsでバリデーションを追加しますnormalize.tsでデフォルト値の処理を追加します- プロパティが等価性に影響を与える場合は、差分ロジックを更新します
- バリデーション、正規化、および差分のテストケースを追加します
新しいエッジプロパティの追加
types.tsのDSLEdgeとIREdgeに追加しますvalidate.tsでバリデーションを追加しますnormalize.tsでデフォルト値の処理を追加します- エッジの等価性チェックのために差分ロジックを更新します
- テストケースを追加します
📜 原文 SKILL.md(Claudeが読む英語/中国語)を展開
Core Package Development
The core package (packages/core/) is dependency-free and handles all DSL processing.
Data Flow
DSL (YAML input) → validate() → normalize() → IR → diff() → Patch
Key Files
| File | Purpose | Exports |
|---|---|---|
types.ts |
Type definitions | DSL, IR, Patch, WebSocket protocol |
validate.ts |
YAML validation | validate(dsl): ValidationResult |
normalize.ts |
DSL → IR conversion | normalize(dsl): IRDocument |
diff.ts |
IR diff calculation | diff(prev, next): Patch |
Type Hierarchy
DSL Types (user input) IR Types (normalized)
───────────────────── ────────────────────
DSLDocument IRDocument
├─ version: number ├─ version: number
├─ docId: string ├─ docId: string
├─ title?: string ├─ title: string
├─ nodes: DSLNode[] ├─ nodes: Record<string, IRNode>
└─ edges?: DSLEdge[] └─ edges: Record<string, IREdge>
DSLNode IRNode
├─ id: string ├─ id: string
├─ provider: string ├─ provider: string
├─ kind: string ├─ kind: string
├─ label?: string ├─ label: string (default: id)
├─ parent?: string ├─ parent: string | null
└─ layout: DSLLayout └─ layout: { x, y, w, h }
DSLEdge IREdge
├─ id: string ├─ id: string
├─ from: string ├─ from: string
├─ to: string ├─ to: string
└─ label?: string └─ label: string (default: "")
Patch Operations
type PatchOp =
| { op: "upsertNode"; node: IRNode }
| { op: "removeNode"; id: string }
| { op: "upsertEdge"; edge: IREdge }
| { op: "removeEdge"; id: string };
interface Patch {
baseRev: number;
nextRev: number;
ops: PatchOp[];
}
WebSocket Protocol Types
// Plugin → CLI
interface HelloMessage {
type: "hello";
docId: string;
secret?: string;
}
interface RequestFullMessage {
type: "requestFull";
docId: string;
}
// CLI → Plugin
interface FullMessage {
type: "full";
rev: number;
ir: IRDocument;
}
interface PatchMessage {
type: "patch";
baseRev: number;
nextRev: number;
ops: PatchOp[];
}
interface ErrorMessage {
type: "error";
message: string;
}
Development Workflow
- Modify types → Update
types.ts - Update validation → Ensure
validate.tscatches invalid input - Update normalization → Handle new fields/defaults in
normalize.ts - Update diff → Handle new patch scenarios in
diff.ts - Add tests → Co-located
*.test.tsfiles - Run tests →
bun test packages/core/
Testing
# All core tests
bun test packages/core/
# Specific test file
bun test packages/core/src/diff.test.ts
bun test packages/core/src/validate.test.ts
bun test packages/core/src/normalize.test.ts
# Watch mode
bun test --watch packages/core/
Common Patterns
Adding a new node property
- Add to
DSLNodeandIRNodeintypes.ts - Add validation in
validate.ts - Add default value handling in
normalize.ts - Update diff logic if property affects equality
- Add test cases for validation, normalization, and diff
Adding a new edge property
- Add to
DSLEdgeandIREdgeintypes.ts - Add validation in
validate.ts - Add default value handling in
normalize.ts - Update diff logic for edge equality check
- Add test cases