跳到主要内容

graph 精选

Deterministic orchestration graph runtime - declarative DAG pipelines with journal-based crash recovery

在 GitHub 打开

安装方式

cp -r skills/graph ~/.claude/skills/graph

把该 skill 目录放进客户端 skills 目录。不同客户端的目录可能不同,Claude Code 默认是 ~/.claude/skills/

整仓一次性获取:git clone --depth 1 https://github.com/Yeachan-Heo/oh-my-claudecode.git

依赖与权限

  • 无需 API Key
  • 无需联网
  • 依赖外部命令:node npm go
  • 以上为按正文与 frontmatter 自动推断的信号,仅供参考;安装前建议先阅读原文。

SKILL.md 正文

来源 Yeachan-Heo/oh-my-claudecode@8262f9f · 许可 MIT · 内容未修改

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.

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

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

  1. 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, USER identity,

GRAPH_*, and the optional idempotency key), not the host's full secrets.

Commands are not filesystem/process sandboxed.

  • Agent authority boundary: built-in agent nodes are explicitly read-only.

They run in the current working directory with no additional directories,

only Read, Glob, and Grep, permissionMode: dontAsk, session

persistence disabled, and a provider-specific environment allowlist. Agent

timeouts abort and interrupt the SDK query. Use a custom executor for any

agent that needs mutation or external effects. Treat

.omc/graph-runs/<run_id>/descriptor.json as executable content.

质量与来源

所属仓库
Yeachan-Heo/oh-my-claudecode
仓库星标
4.0 万
最近更新
今天
采集时间
今天
commit
8262f9f790ee
内容指纹
sha256:c0ebe6ddc524367
文件路径
skills/graph/SKILL.md

同仓库其它 Skill

查看全部 48 个
agent-doc-discipline
Writing-time discipline for documents agents consume (the five surfaces, specs, tickets, .omc/skills/) — every rule checkable and carrying a why, steps before reference, one meaning in one home, no restating what the environment already says. Mandatory at drydock seed generation and the launch C5 sediment pass; opt-in for any other agent-facing doc edit. The companion of minimal-code-discipline: that one disciplines code, this one disciplines papers.
精选 Yeachan-Heo/oh-my-claudecode 4.0 万 原文
Claude CodeCodex CLIMCP 客户端
ai-slop-cleaner
Clean AI-generated code slop with a regression-safe, deletion-first workflow and optional reviewer-only mode
精选 Yeachan-Heo/oh-my-claudecode 4.0 万 原文
Claude CodeCodex CLIMCP 客户端
architecture-survey
Periodic architecture survey — walks the module graph and reports ranked deepening candidates (shallow modules, hypothetical seams, logic behind the wrong seam). Survey, not rescue: it finds candidates and hands them to the captain; it never refactors on its own.
精选 Yeachan-Heo/oh-my-claudecode 4.0 万 原文
Claude CodeCodex CLIMCP 客户端
ask-navigator
Shipyard's navigator — chart a foggy effort (destination unclear, questions not yet stateable) into a map of decision tickets on the repo's issue tracker, then work the frontier one ticket per session until the way is clear, and hand the collapsed decisions to /launch as a mission brief. Wayfinding, not building: it produces decisions, never deliverables.
精选 Yeachan-Heo/oh-my-claudecode 4.0 万 原文
Claude CodeCodex CLIMCP 客户端
ask
Process-first advisor routing for Claude, Codex, Gemini, Antigravity, Grok, or Cursor via `omc ask`, with artifact capture and no raw CLI assembly
精选 Yeachan-Heo/oh-my-claudecode 4.0 万 原文
Claude CodeCodex CLIMCP 客户端
autopilot
Full autonomous execution from idea to working code
精选 Yeachan-Heo/oh-my-claudecode 4.0 万 原文
Claude CodeCodex CLIMCP 客户端

相似 Skill

更多「编码」
access
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed, or change policy for the Discord channel.
精选 anthropics/claude-plugins-official 3.8 万 原文
Claude CodeMCP 客户端
configure
Set up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how do I set this up" or "who can reach me," or wants to check channel status.
精选 anthropics/claude-plugins-official 3.8 万 原文
Claude CodeMCP 客户端
access
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed, or change policy for the iMessage channel.
精选 anthropics/claude-plugins-official 3.8 万 原文
Claude CodeMCP 客户端
configure
Check iMessage channel setup and review access policy. Use when the user asks to configure iMessage, asks "how do I set this up" or "who can reach me," or wants to know why texts aren't reaching the assistant.
精选 anthropics/claude-plugins-official 3.8 万 原文
Claude CodeMCP 客户端
access
Manage Telegram channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed, or change policy for the Telegram channel.
精选 anthropics/claude-plugins-official 3.8 万 原文
Claude CodeMCP 客户端
configure
Set up the Telegram channel — save the bot token and review access policy. Use when the user pastes a Telegram bot token, asks to configure Telegram, asks "how do I set this up" or "who can reach me," or wants to check channel status.
精选 anthropics/claude-plugins-official 3.8 万 原文
Claude CodeMCP 客户端