skill-upgrader について
SKILL.mdをDecision Theory v5 Hybrid形式に更新するメタスキルです。4つのエージェントが並行して計画、強化学習、モーダル論理、検証の観点から分析し、Ragieに索引化された書籍を参照します。
主な機能
- 014エージェントによる並列分析
- 02Ragieの索引書籍へのクエリ
- 03ブラックボードでの共同作業
- 04Decision Theory v5 Hybrid形式の出力
- 05検証レポートの生成
活用シーン
- 01既存スキルをv5 Hybrid形式に再構成
- 02スキルの状態、アクション、遷移の整理
- 03スキルの制約と安全性の確認
- 04更新記録と検証レポートの作成
インストール
コマンドをコピーしてターミナルで実行します。
npx skills add https:/ / github.com/ parcadei/ continuous-claude-v3 --skill skill-upgraderインストール後、Claude Code で/skill-upgraderを入力して読み込まれたか確認します。
詳細
スキルアップグレーダー
4 つの Ragie 対応エージェントを使用して、任意の SKILL.md を Decision Theory v5 Hybrid 形式にアップグレードするメタスキルです。
使用する場面
- 「このスキルを v5 にアップグレードして」
- 「このスキルを意思決定理論で形式化して」
- 「このスキルに MDP 構造を追加して」
- 「X にスキルアップグレーダーを適用して」
前提条件
インデックス化された書籍を含む Ragie RAG:
- decision-theory パーティション:LaValle Planning Algorithms、Sutton & Barto RL
- modal-logic パーティション:Blackburn Modal Logic、Huth & Ryan Logic in CS
ワークフロー
ステップ 1:セッションを設定
SESSION=$(date +%Y%m%d-%H%M%S)-upgrade-{skill_name}
mkdir -p thoughts/skill-builds/${SESSION}
ステップ 2:ブラックボードを初期化
thoughts/skill-builds/{session}/00-blackboard.md を作成します:
# Skill Upgrade: {skill_name}
Started: {timestamp}
## Input Skill
{path_to_skill}
## Target Format
Decision Theory v5 Hybrid
## Agent Findings
(Agents append below)
---
ステップ 3:4 つのエージェントを並列で起動
Task ツールを使用して、4 つのエージェントを同時に起動します。各エージェントは次の処理を行います:
- 入力スキルを読み込む
- Ragie に問い合わせて、担当する書籍を検索する
- 調査結果をブラックボードに追記する
エージェント 1:LaValle プランナー
書籍: LaValle の「Planning Algorithms」(decision-theory パーティション) 焦点: 状態、アクション、遷移
Task(
subagent_type="general-purpose",
prompt="""
INPUT SKILL: {path}
BLACKBOARD: thoughts/skill-builds/{session}/00-blackboard.md
YOUR BOOK: LaValle's "Planning Algorithms" in Ragie partition 'decision-theory'
TASK: Identify MDP structure in the skill.
Query Ragie:
```bash
uv run python scripts/ragie_query.py -q "MDP state space definition" -p decision-theory
uv run python scripts/ragie_query.py -q "action space sequential decisions" -p decision-theory
uv run python scripts/ragie_query.py -q "POMDP partial observability" -p decision-theory
入力スキルを読み込み、次の質問に答えてください:
- 状態とは何ですか?(フェーズ、モード、追跡対象の情報)
- アクションとは何ですか?(各状態でエージェントができること)
- 遷移はどのように機能しますか?(決定論的または確率的)
- これは POMDP ですか、それとも完全観測可能ですか?
ブラックボードのセクション ## Agent 1: States, Actions & Transitions に書き込んでください。
LaValle の章を引用し、平易な英語で記述してください。 """ )
---
## Agent 2: Sutton & Barto Optimizer
**Book:** Sutton & Barto's "Reinforcement Learning" (decision-theory partition)
**Focus:** Policy, Termination, Value
**Depends on:** Agent 1
Task( subagent_type="general-purpose", prompt=""" INPUT SKILL: {path} BLACKBOARD: thoughts/skill-builds/{session}/00-blackboard.md
YOUR BOOK: Sutton & Barto の「Reinforcement Learning」、Ragie の 'decision-theory' パーティション
WAIT: 先にブラックボードからエージェント 1 の調査結果を読んでください。
TASK: 方策と終了条件を設計してください。
Ragie に問い合わせてください:
uv run python scripts/ragie_query.py -q "policy deterministic stochastic" -p decision-theory
uv run python scripts/ragie_query.py -q "episodic termination conditions" -p decision-theory
uv run python scripts/ragie_query.py -q "reward function design" -p decision-theory
エージェント 1 の状態とアクションを使って、次の質問に答えてください:
- 方策とは何ですか?(状態 → アクションのルール)
- いつ終了しますか?(終端状態、成功/失敗)
- 報酬とは何ですか?(目標は+、コストは-)
- 価値の高い状態/低い状態はどれですか?
ブラックボードのセクション ## Agent 2: Policy & Values に書き込んでください。
Sutton & Barto の節を引用し、平易な英語で記述してください。 """ )
---
## Agent 3: Blackburn Modal Logician
**Book:** Blackburn's "Modal Logic" (modal-logic partition)
**Focus:** Constraints (temporal, epistemic, deontic)
Task( subagent_type="general-purpose", prompt=""" INPUT SKILL: {path} BLACKBOARD: thoughts/skill-builds/{session}/00-blackboard.md
YOUR BOOK: Blackburn の「Modal Logic」、Ragie の 'modal-logic' パーティション
TASK: スキルから制約を抽出してください。
Ragie に問い合わせてください:
uv run python scripts/ragie_query.py -q "temporal logic LTL operators" -p modal-logic
uv run python scripts/ragie_query.py -q "epistemic logic knowledge" -p modal-logic
uv run python scripts/ragie_query.py -q "deontic logic obligations" -p modal-logic
入力スキルを読み込み、次の項目を特定してください:
- 時間的:「Y の前に X を実行する必要がある」→ □, ◇, U
- 認識論的:「X を知っている必要がある」→ K 演算子
- 義務論的:「必須/禁止/許可」→ O, F, P
- 動的:「アクションが効果を引き起こす」→ [action]
ブラックボードのセクション ## Agent 3: Constraints に書き込んでください。
各制約について、次の項目を記載してください:
- 平易な英語での説明
- モーダル論理表記
- 重要である理由
- Blackburn の章の引用 """ )
---
## Agent 4: Huth & Ryan Verifier
**Book:** Huth & Ryan's "Logic in Computer Science" (modal-logic partition)
**Focus:** Validation, Safety, Liveness
**Depends on:** Agents 1-3
Task( subagent_type="general-purpose", prompt=""" INPUT SKILL: {path} BLACKBOARD: thoughts/skill-builds/{session}/00-blackboard.md
YOUR BOOK: Huth & Ryan の「Logic in Computer Science」、Ragie の 'modal-logic' パーティション
WAIT: 先にブラックボードからエージェント 1〜3 の調査結果を読んでください。
TASK: 整合性と完全性を検証してください。
Ragie に問い合わせてください:
uv run python scripts/ragie_query.py -q "safety properties verification" -p modal-logic
uv run python scripts/ragie_query.py -q "liveness properties eventually" -p modal-logic
uv run python scripts/ragie_query.py -q "model checking CTL" -p modal-logic
次の項目を確認してください:
- 安全性:決して起きてはならない悪いことは何ですか? □¬(bad)
- 活性:いずれ起きるべき良いことは何ですか? ◇(good)
- 整合性:エージェント間に矛盾はありますか?
- 完全性:網羅されていない部分はありますか?
ブラックボードのセクション ## Agent 4: Verification に書き込んでください。
各特性について ✓/✗ を付けて報告してください。 総合判定:PASS または NEEDS_WORK Huth & Ryan の節を引用してください。 """ )
---
## Step 4: Synthesize Final Skill
After all agents complete, read the blackboard and create:
**Output:** `thoughts/skill-builds/{session}/SKILL-upgraded.md`
Use v5 Hybrid template:
```yaml
---
name: {original_name}
description: {original_description}
version: 5.1-hybrid
---
# Option: {name}
## Initiation (I)
[From original + Agent 1 state analysis]
## Observation Space (Y)
[From Agent 1 POMDP analysis]
## Action Space (U)
[From Agent 1 actions]
## Policy (pi)
[From Agent 2 state→action rules]
## Termination (beta)
[From Agent 2 episode structure]
## Q-Heuristics
[From Agent 2 value guidance]
## Constraints
[From Agent 3 modal logic]
## Verification
[From Agent 4 safety/liveness]
使用例
User: "Upgrade .claude/skills/implement_plan/SKILL.md to v5 Hybrid"
Claude:
1. Creates session directory
2. Initializes blackboard
3. Launches 4 agents in parallel (Task tool)
4. Waits for completion
5. Reads blackboard
6. Synthesizes upgraded skill
7. Reports: "Upgraded skill at thoughts/skill-builds/.../SKILL-upgraded.md"
Ragie クエリのリファレンス
# Decision theory partition
uv run python scripts/ragie_query.py -q "your question" -p decision-theory
# Modal logic partition
uv run python scripts/ragie_query.py -q "your question" -p modal-logic
# With reranking for better results
uv run python scripts/ragie_query.py -q "your question" -p decision-theory --rerank
作成されるファイル
アップグレード後:
thoughts/skill-builds/{session}/
├── 00-blackboard.md # Agent collaboration
├── SKILL-upgraded.md # Final v5 Hybrid skill
└── validation-report.md # Agent 4 verification