npx claudepluginhub caphtech/claude-marketplace --plugin eld-pluginWant just this skill?
Then install: npx claudepluginhub u/[userId]/[slug]
コードベースや要件からVocabulary(語彙)とLaw(守るべき条件)を自動発見するスキル。 名辞抽象(Term/Type)と関係抽象(Law/制約)の両方を抽出し、 /eld-spec-card term および /eld-spec-card law への入力を生成する。 使用タイミング: (1) 新規プロジェクトでVocabulary/Lawを洗い出す時、 (2) 既存コードからLaw/Termを抽出する時、(3) 「Lawを発見して」「語彙を抽出して」、 (4) ELD Specをレトロフィットする時、(5) 初期Catalogを作る時
This skill uses the workspace's default tool permissions.
ELD Spec Discovery
コードベースや要件からVocabulary候補とLaw候補を自動発見する。
発見の二軸
| 抽象 | 発見対象 | 成果物 |
|---|---|---|
| 名辞抽象 | Term/Type/Value/Context | Vocabulary Catalog → Term Card |
| 関係抽象 | Law/制約/写像 | Law Catalog → Law Card |
Vocabulary発見(名辞抽象)
発見ソース
| ソース | 発見対象 | 抽出方法 |
|---|---|---|
| 型定義 | Entity/Value Object | interface/type/classを検索 |
| Zodスキーマ | 値制約 | z.object/z.string等を解析 |
| Brand型 | 意味的区別 | Brand/Newtype定義を検索 |
| ドメインモデル | 概念 | domain/models配下を分析 |
| API定義 | I/O境界の語彙 | Request/Response型を解析 |
発見プロセス
Step 1: 型・語彙の収集
# 型定義を検索
grep -r "interface\|type\|class\|Brand" src/
# Zodスキーマを検索
grep -r "z\.object\|z\.string\|z\.number" src/
Step 2: Term候補生成
term_candidate:
id: TERM-<domain>-<name>
source:
file: <発見元ファイル>
line: <行番号>
meaning: <推定される意味>
type_shape: <型表現>
context: <使用文脈>
io_boundaries: <I/O境界>
confidence: high | medium | low
needs_review: <確認が必要な点>
Law発見(関係抽象)
発見ソース
| ソース | 発見対象 | 抽出方法 |
|---|---|---|
| Zodスキーマ | 入力制約 | スキーマ定義を解析 |
| アサーション | 不変条件 | assert/invariant文を検索 |
| テスト期待値 | 事後条件 | expect/assertを解析 |
| catch節 | 例外ポリシー | エラーハンドリングを抽出 |
| ビジネスロジック | ドメインルール | 条件分岐を分析 |
| 障害履歴 | 防御すべき条件 | 過去のバグから抽出 |
発見プロセス
Step 1: 制約の収集
# バリデーション・アサーションを検索
grep -r "assert\|invariant\|validate" src/
grep -r "throw new.*Error\|reject\|fail" src/
Step 2: Law候補生成
law_candidate:
id: LAW-<domain>-<name>
type: Pre | Post | Invariant | Policy
source:
file: <発見元ファイル>
line: <行番号>
pattern: <検出パターン>
statement: <自然言語での記述>
formal_ish: <疑似式>
terms: [<関連するTerm候補>]
confidence: high | medium | low
needs_review: <確認が必要な点>
パターン分類
Vocabulary(名辞)パターン
| パターン | Term種別 | 例 |
|---|---|---|
interface Entity | Term(エンティティ) | interface Order |
type Brand<T> | Type(ブランド型) | type OrderId = Brand<string> |
z.number().min().max() | Value(値制約) | z.number().min(1).max(100) |
// Context: XXX | Context(文脈) | コメントから抽出 |
Law(関係)パターン
| パターン | Law Type | 例 |
|---|---|---|
if (!condition) throw | Pre | 入力検証 |
assert(a === b) | Invariant | 状態整合性 |
expect(result).toBe(x) | Post | 出力保証 |
if (role === 'admin') | Policy | 権限判断 |
発見例
Zodからの抽出
// 発見元
const OrderSchema = z.object({
quantity: z.number().min(1).max(100),
price: z.number().positive(),
});
// 抽出されるTerm候補
// TERM-order-quantity: 注文数量(1〜100の整数)
// TERM-order-price: 注文価格(正の数)
// 抽出されるLaw候補
// LAW-pre-order-quantity: 1 ≤ quantity ≤ 100
// Terms: [TERM-order-quantity]
// LAW-pre-order-price: price > 0
// Terms: [TERM-order-price]
アサーションからの抽出
// 発見元
class Inventory {
reserve(qty: number) {
assert(this.available >= qty, 'Insufficient stock');
// ...
assert(this.available === this.total - this.reserved);
}
}
// 抽出されるTerm候補
// TERM-inventory-available: 利用可能在庫
// TERM-inventory-total: 総在庫
// TERM-inventory-reserved: 予約済み在庫
// 抽出されるLaw候補
// LAW-pre-reserve-stock: available >= qty
// Terms: [TERM-inventory-available]
// LAW-inv-available-balance: available = total - reserved
// Terms: [TERM-inventory-available, TERM-inventory-total, TERM-inventory-reserved]
出力形式
Discovery Report
# ELD Spec Discovery Report
## Summary
- Vocabulary候補: 12件 (High: 8, Medium: 3, Low: 1)
- Law候補: 15件 (High: 9, Medium: 4, Low: 2)
---
## Vocabulary候補(名辞抽象)
### High Confidence (即座にTerm Card化可能)
#### TERM-order-quantity
- **Source**: src/orders/schema.ts:12
- **Meaning**: 注文数量
- **Type/Shape**: `z.number().min(1).max(100)`
- **Context**: 注文処理
- **Action**: → `/eld-spec-card term` でカード化
### Medium Confidence (確認推奨)
#### TERM-user-balance (要確認)
- **Source**: src/users/account.ts:45
- **Meaning**: ユーザー残高(推定)
- **Needs Review**: 一時的なマイナスを許可するか確認
---
## Law候補(関係抽象)
### High Confidence (即座にLaw Card化可能)
#### LAW-pre-order-quantity
- **Type**: Pre
- **Source**: src/orders/schema.ts:12
- **Statement**: 注文数量は1以上100以下
- **Formal**: 1 ≤ orderQty ≤ 100
- **Terms**: [TERM-order-quantity]
- **Action**: → `/eld-spec-card law` で正式化
### Medium Confidence (確認推奨)
#### LAW-inv-user-balance (要確認)
- **Type**: Invariant
- **Source**: src/users/account.ts:120
- **Statement**: ユーザー残高は非負
- **Terms**: [TERM-user-balance]
- **Needs Review**: 一時的なマイナス残高を許可するケースがあるか確認
---
## 相互拘束チェック
### 孤立リスク
- Law候補で参照Termが不明確: 2件
- Term候補で関連Lawがなし: 3件
### 推奨アクション
1. LAW-policy-discount: 参照するTermを明確化
2. TERM-customer-tier: 関連するLawを検討
既存Catalogとの照合
| チェック | 内容 |
|---|---|
| 重複検出 | 既存TermやLawと重複していないか |
| 類似統合 | 類似した定義の統合を提案 |
| 矛盾検出 | 既存定義と矛盾していないか |
使用例
User: このプロジェクトからVocabularyとLawを発見して
Claude:
## ELD Spec Discovery実行中...
### Step 1: ソース収集
- src/配下を走査中...
- 型定義: 35件検出
- バリデーション: 23件検出
- アサーション: 8件検出
### Step 2: Vocabulary候補生成
- Term候補: 12件生成
### Step 3: Law候補生成
- Law候補: 15件生成
### Step 4: 相互拘束チェック
- 孤立リスク: 5件検出
---
## Discovery Report
### High Confidence Vocabulary (8件)
1. TERM-order-quantity → `/eld-spec-card term`
2. TERM-inventory-available → `/eld-spec-card term`
...
### High Confidence Laws (9件)
1. LAW-pre-order-quantity → `/eld-spec-card law`
Terms: [TERM-order-quantity]
2. LAW-inv-available-balance → `/eld-spec-card law`
Terms: [TERM-inventory-available, TERM-inventory-total, TERM-inventory-reserved]
...
Vocabulary CatalogとLaw Catalogを初期化しますか?
Similar Skills
Activates when the user asks about AI prompts, needs prompt templates, wants to search for prompts, or mentions prompts.chat. Use for discovering, retrieving, and improving prompts.
Search, retrieve, and install Agent Skills from the prompts.chat registry using MCP tools. Use when the user asks to find skills, browse skill catalogs, install a skill for Claude, or extend Claude's capabilities with reusable AI agent components.
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code, generative art, algorithmic art, flow fields, or particle systems. Create original algorithmic art rather than copying existing artists' work to avoid copyright violations.