graph
できること
このスキルは、書かれた計画ファイルからつながった手順を実行します。手順が決まっていて、監査可能で、中断にも耐える必要がある繰り返しの多い作業を持つ人向けです。
使う場面
- ✓一部の手順が他に依存する、繰り返し可能な複数の手順からなる作業があるとき。
- ✓長い作業が、中断後に止まったところから再開できる必要があるとき。
- ✓実行ごとの各手順の完全な記録がほしいとき。
スキルのリンク
https://github.com/Yeachan-Heo/oh-my-claudecode/blob/main/skills/graph/SKILL.mdコピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。
使い方
いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。
貼り付け用メッセージ
Claude Code、Codex、Cursorの場合:プロジェクトのフォルダで実行するとスキルがインストールされます。
SKILL.mdをダウンロードして、エージェントのスキル用フォルダに入れてください。
AIへの頼み方の例
“プロジェクトをビルドし、テストを実行してください。デプロイの前には私に確認してください。中断されても再開できる、繰り返し可能なパイプラインとして設定してください。”
毎週5つの新しいスキル。1分で読めます。
仕組み
エージェントは、各手順とその依存関係を記述するJSONファイルを書くか、既存のものを使います。コマンドラインのランナーが手順を順に実行し、進行状況をジャーナルに記録して、再起動後はそこから再開します。
技術的な内容(元のSKILL.md)
作者による元のテキスト(英語)をGitHubからそのまま表示しています。
Graph Skill
Run a deterministic orchestration graph from a declarative JSON descriptor.
The runtime consumes the sealed-descriptor and pure-scheduler contracts in
src/graph/* and executes through an independent OS process (omc graph run),
so crash recovery (kill mid-run, rerun, resume from journal) works for real.
Usage
/oh-my-claudecode:graph <descriptor.json>
/oh-my-claudecode:graph "build then test then ask me before deploy" (author the descriptor first)
The execution surface is always the CLI subcommand:
omc graph run <descriptor.json> [--runs-root <dir>]
Run it via the Bash tool for non-interactive graphs. Progress lines stream as
[run], [node], [ok], [fail], [join], [done].
When To Use
- Repeatable multi-step pipelines with explicit dependencies (DAG)
- Work that must survive interruption: kill/restart resumes from journal
- Auditable runs: OCC journal + projection snapshots under
.omc/graph-runs/<run_id>/
When NOT to use: exploratory one-off work (use conversation or /team); anything needing adaptive re-planning mid-run (graphs are deterministic).
Workflow
Descriptor given -> go to step 3.
Pipeline described -> author the descriptor JSON (schema below), write it next to the project (suggest
.omc/graphs/<name>.json) and show it to the user before running.run_idmust be unique per logical pipeline; rerunning with the samerun_idRESUMES, not restarts.Approval nodes: if the descriptor contains any
"kind": "human-approval"node, do NOT run it through the Bash tool (stdin is not interactive there; EOF fails closed to denied). Tell the user to run interactively instead:! omc graph run <file>The
!prefix runs it inside this session with live stdin so y/n works.Run and relay progress. Exit codes (normative): 0 succeeded | 1 terminal failed | 19 another writer owns this run (busy) 20 corrupt/tampered journal (fail-closed) | 21 descriptor drift on resume | 70 runtime crash (unmapped error)
Resume: rerunning the same command after a crash replays committed transitions and continues. Completed nodes never re-execute.
Descriptor Schema (minimal)
{ "descriptor_version": 1, "run_id": "unique-pipeline-id", "revision_id": "rev-1", "goal": "one line", "nodes": [ { "id": "n1", "kind": "command", "title": "...", "timeout_ms": 60000, "max_attempts": 2, "effect_policy": { "policy": "side_effect_free" }, "command": "npm test" }, { "id": "a1", "kind": "agent", "title": "...", "timeout_ms": 300000, "max_attempts": 1, "effect_policy": { "policy": "side_effect_free" }, "instructions": "..." }, { "id": "gate", "kind": "human-approval", "title": "...", "prompt": "Proceed?" } ], "edges": [ { "id": "e1", "kind": "fixed", "from": "n1", "to": "a1" } ], "entry_node_ids": ["n1"], "concurrency_limit": 2, "terminal_verification_node_id": "a1" }
Edge kinds: fixed | conditional | fan_out/join pairs | back_edge (bounded retries via max_traversals). See src/graph/schema.ts for the authoritative Zod schema — and read the Capability Boundary section above for what built-in executors actually execute today.
Capability Boundary & Semantics (read before authoring)
- Edge support: built-in command/agent executors cover
fixededges andfan_out/joinpairs.conditionalandback_edgeroutes are fully supported by the runtime and scheduler contracts but require a custom NodeExecutor that emitsrouteon its results — built-in executors never produce routes, so graphs relying on them fail fast withroute_requiredrather than guessing. - Crash-recovery guarantee is at-least-once for command nodes: a crash
between an external side effect and its journal append re-executes that node
on resume. For
idempotentcommands, the resolved key is available to the command asGRAPH_IDEMPOTENCY_KEYbefore it starts and is also recorded for downstream dedupe. Built-in executors rejectreconcile; reconciliation requires a custom executor with an actual external reconciliation authority. Exactly-once for external side effects is out of scope for v1. - Command trust boundary: command nodes are arbitrary shell lines with process authority in the current working directory. Only run descriptors you wrote or trust. Command children receive an allowlisted environment (PATH, HOME/USERPROFILE, TEMP/TMP, locale/timezone, U
よくある質問
実行中に計画を変えられますか?
いいえ。手順は固定されているため、実行の途中でエージェントが計画を立て直すことはありません。
実行の記録はどこに保存されますか?
プロジェクト内のフォルダに、実行ごとのジャーナルとともに保存されます。
一度きりの作業にも向いていますか?
いいえ。探索的な一度きりの作業は、通常の会話で扱うほうが適しています。
詳細
作者による元の説明
Deterministic orchestration graph runtime - declarative DAG pipelines with journal-based crash recovery
人気
- GitHubのスター
- 41k
- ランキング
- #7005
- ライセンス
- MIT
- 更新日
- 2026/11/2
コメント
- …
このリポジトリの他のスキル
agent-doc-discipline
41kエージェントが、他のAIエージェントが独力で従える指示を書けるよう支援します。確認できるルールと、各ルールの理由を明示します。
ai-slop-cleaner
41kエージェントが、動くけれど肥大化して繰り返しの多いAI生成コードを整理できるよう支援します。動作を変えずに、余分なコードを取り除きます。
architecture-survey
41kエージェントが、コードベースの構造を確認し、変更が難しくなっている部分を根拠とともに挙げます。自分では何も変更しません。
ask-navigator
41kエージェントが、あいまいなプロジェクトを明確な決定事項の一覧に変え、1つずつ検討して進む道筋を見えるようにします。