graph
Skill này làm gì
Skill này chạy một tập các bước liên kết từ một tệp kế hoạch đã viết. Skill dành cho người có những công việc nhiều bước lặp lại, cần có thể kiểm tra và sống sót qua gián đoạn.
Khi nào nên dùng
- ✓Khi bạn có một công việc nhiều bước lặp lại, trong đó một số bước phụ thuộc vào bước khác.
- ✓Khi một công việc dài phải có thể khởi động lại từ chỗ đã dừng sau một gián đoạn.
- ✓Khi bạn muốn có bản ghi đầy đủ về từng bước trong một lần chạy.
Liên kết skill
https://github.com/Yeachan-Heo/oh-my-claudecode/blob/main/skills/graph/SKILL.mdSao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.
Cách dùng
Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.
Tin nhắn có sẵn để dán
Dành cho Claude Code, Codex hoặc Cursor: chạy lệnh trong thư mục dự án của bạn và skill sẽ được cài đặt.
Tải tệp SKILL.md về và thả vào thư mục skill của agent.
Ví dụ cách nhờ AI
“Build dự án, chạy các kiểm thử, rồi hỏi tôi trước khi triển khai. Hãy thiết lập điều này thành một pipeline lặp lại có thể tiếp tục nếu bị gián đoạn.”
5 skill mới mỗi tuần. Đọc chỉ 1 phút.
Cách hoạt động
Agent viết hoặc dùng một tệp JSON mô tả từng bước và các phụ thuộc của nó. Một trình chạy dòng lệnh thực thi các bước theo thứ tự, ghi tiến độ vào một nhật ký, và tiếp tục từ nhật ký đó sau khi khởi động lại.
Nội dung kỹ thuật (SKILL.md gốc)
Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.
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
Câu hỏi thường gặp
Kế hoạch có thể thay đổi khi đang chạy không?
Không. Các bước được cố định, nên agent không lập kế hoạch lại giữa chừng một lần chạy.
Bản ghi của một lần chạy được giữ ở đâu?
Trong một thư mục bên trong dự án, với một nhật ký cho mỗi lần chạy.
Nó có tốt cho tác vụ làm một lần không?
Không. Công việc khám phá làm một lần được xử lý tốt hơn trong một cuộc trò chuyện thông thường.
Chi tiết
Mô tả gốc của tác giả
Deterministic orchestration graph runtime - declarative DAG pipelines with journal-based crash recovery
Độ phổ biến
- Sao GitHub
- 41k
- Vị trí xếp hạng
- #7005
- Giấy phép
- MIT
- Cập nhật
- 2/11/2026
Bình luận
- …
Thêm skill từ kho mã này
agent-doc-discipline
41kDạy agent của bạn viết hướng dẫn mà các agent AI khác có thể tự làm theo, với các quy tắc có thể kiểm tra và lý do rõ ràng đằng sau mỗi quy tắc.
ai-slop-cleaner
41kGiúp agent của bạn dọn dẹp mã do AI viết mà chạy được nhưng cồng kềnh hoặc lặp lại, loại bỏ mã thừa mà không thay đổi những gì nó làm.
architecture-survey
41kGiúp agent của bạn xem xét cấu trúc một codebase và liệt kê các phần ngày càng khó thay đổi, kèm bằng chứng, mà không tự thay đổi gì.
ask-navigator
41kGiúp agent của bạn biến một dự án còn mơ hồ thành bản đồ các câu hỏi quyết định rõ ràng, rồi giải quyết từng câu một cho đến khi con đường trở nên rõ.
Skill tương tự
knowledge-automation
394kGiúp agent của bạn thiết lập tác vụ định kỳ đưa nội dung mới vào kho Knowledge theo lịch, rồi kiểm tra tác vụ có chạy không.
knowledge-source-ingest
394kGiúp agent của bạn cập nhật Knowledge vault với các mục mới từ kênh chat, nguồn tin hoặc hộp thư, mà không thêm lại những gì đã có.
benchmark
280kGiúp agent của bạn đo tốc độ và hiệu suất của code, hữu ích để đảm bảo mọi thứ nhanh và tìm ra những chỗ chậm.