jpskill.com
📦 その他 コミュニティ

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本体の挙動とは独立した参考情報です。

⚡ おすすめ: コマンド1行でインストール(60秒)

下記のコマンドをコピーしてターミナル(Mac/Linux)または PowerShell(Windows)に貼り付けてください。 ダウンロード → 解凍 → 配置まで全自動。

🍎 Mac / 🐧 Linux
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
🪟 Windows (PowerShell)
$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. 1. 下の青いボタンを押して core-development.zip をダウンロード
  2. 2. ZIPファイルをダブルクリックで解凍 → core-development フォルダができる
  3. 3. そのフォルダを C:\Users\あなたの名前\.claude\skills\(Win)または ~/.claude/skills/(Mac)へ移動
  4. 4. Claude Code を再起動

⚠️ ダウンロード・利用は自己責任でお願いします。当サイトは内容・動作・安全性について責任を負いません。

🎯 このSkillでできること

下記の説明文を読むと、このSkillがあなたに何をしてくれるかが分かります。Claudeにこの分野の依頼をすると、自動で発動します。

📦 インストール方法 (3ステップ)

  1. 1. 上の「ダウンロード」ボタンを押して .skill ファイルを取得
  2. 2. ファイル名の拡張子を .skill から .zip に変えて展開(macは自動展開可)
  3. 3. 展開してできたフォルダを、ホームフォルダの .claude/skills/ に置く
    • · macOS / Linux: ~/.claude/skills/
    • · Windows: %USERPROFILE%\.claude\skills\

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;
}

開発ワークフロー

  1. 型の修正types.ts を更新します
  2. バリデーションの更新validate.ts が無効な入力を確実に捕捉するようにします
  3. 正規化の更新normalize.ts で新しいフィールド/デフォルトを処理します
  4. 差分の更新diff.ts で新しいパッチのシナリオを処理します
  5. テストの追加 → 同じ場所に *.test.ts ファイルを配置します
  6. テストの実行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/

一般的なパターン

新しいノードプロパティの追加

  1. types.tsDSLNodeIRNode に追加します
  2. validate.ts でバリデーションを追加します
  3. normalize.ts でデフォルト値の処理を追加します
  4. プロパティが等価性に影響を与える場合は、差分ロジックを更新します
  5. バリデーション、正規化、および差分のテストケースを追加します

新しいエッジプロパティの追加

  1. types.tsDSLEdgeIREdge に追加します
  2. validate.ts でバリデーションを追加します
  3. normalize.ts でデフォルト値の処理を追加します
  4. エッジの等価性チェックのために差分ロジックを更新します
  5. テストケースを追加します
📜 原文 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

  1. Modify types → Update types.ts
  2. Update validation → Ensure validate.ts catches invalid input
  3. Update normalization → Handle new fields/defaults in normalize.ts
  4. Update diff → Handle new patch scenarios in diff.ts
  5. Add tests → Co-located *.test.ts files
  6. Run testsbun 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

  1. Add to DSLNode and IRNode in types.ts
  2. Add validation in validate.ts
  3. Add default value handling in normalize.ts
  4. Update diff logic if property affects equality
  5. Add test cases for validation, normalization, and diff

Adding a new edge property

  1. Add to DSLEdge and IREdge in types.ts
  2. Add validation in validate.ts
  3. Add default value handling in normalize.ts
  4. Update diff logic for edge equality check
  5. Add test cases