本文へスキップ
Skillpedia
自動化41k · #7005

graph

できること

このスキルは、書かれた計画ファイルからつながった手順を実行します。手順が決まっていて、監査可能で、中断にも耐える必要がある繰り返しの多い作業を持つ人向けです。

使う場面

  • ✓一部の手順が他に依存する、繰り返し可能な複数の手順からなる作業があるとき。
  • ✓長い作業が、中断後に止まったところから再開できる必要があるとき。
  • ✓実行ごとの各手順の完全な記録がほしいとき。

スキルのリンク

https://github.com/Yeachan-Heo/oh-my-claudecode/blob/main/skills/graph/SKILL.md

コピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。

使い方

いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。

貼り付け用メッセージ

このスキルを使って手伝ってください:https://github.com/Yeachan-Heo/oh-my-claudecode/blob/main/skills/graph/SKILL.md このリンクのSKILL.mdファイルを読んで、私の作業でその指示に従ってください。
こういうスキルを、AIが自分で見つけてくれたら?無料のSkillpedia MCPをインストール。1行で、作業の前に15,000+のスキルから探してくれます。1分でインストール →

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

  1. Descriptor given -> go to step 3.

  2. 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_id must be unique per logical pipeline; rerunning with the same run_id RESUMES, not restarts.

  3. 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.

  4. 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)

  5. 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 fixed edges and fan_out/join pairs. conditional and back_edge routes are fully supported by the runtime and scheduler contracts but require a custom NodeExecutor that emits route on its results — built-in executors never produce routes, so graphs relying on them fail fast with route_required rather 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 idempotent commands, the resolved key is available to the command as GRAPH_IDEMPOTENCY_KEY before it starts and is also recorded for downstream dedupe. Built-in executors reject reconcile; 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

repo: Yeachan-Heo/oh-my-claudecode

人気

GitHubのスター
41k
ランキング
#7005
ライセンス
MIT
更新日
2026/11/2

このスキルは役に立ちますか?

0

ログイン して投票しましょう。

コメント

  • …

このリポジトリの他のスキル

似ているスキル