dag-library
Lets your agent save and reuse complex workflows. It's useful for scheduling repetitive tasks or when you want to run an already defined plan.
What it does
This tool lets you save a definition of a task 'graph' (called a DAG) to use it again later. Instead of describing the graph every time, you save it with a name and run it by that name.
When to use it
- ✓When you want to save a task graph for reuse.
- ✓When you need to run the same task graph multiple times.
- ✓When you want to schedule repeated execution of a complex workflow.
Example of what to ask your AI
“Save this task graph as 'monthly-audit' and run it.”
Want more? Open the sections below.
How to use
The easiest way: copy the message below and paste it into Claude, ChatGPT, Cursor or any AI. It reads the skill and follows the instructions.
Skill link
Ready-to-paste message
How it works
You save the graph definition in a special file. Then, you can ask the AI to run the graph using the name you gave it. The AI finds the file and executes the tasks in the defined order.
Installation
Easiest way: copy the skill link and paste it into Claude, ChatGPT or Cursor asking it to follow the instructions.
In the terminal (Claude Code, Codex, Cursor), in your project folder:
npx skills add code-yeongyu/oh-my-openagent --skill dag-libraryOr download just the file:
curl -L https://raw.githubusercontent.com/code-yeongyu/oh-my-openagent/dev/packages/omo-senpi/skills/dag-library/SKILL.md -o SKILL.mdTechnical content (original SKILL.md)
Original text by the author, straight from GitHub.
dag-library
Use this skill when the user wants to KEEP a dag definition and run it again later — the graph is an asset, not a one-off. For authoring a brand-new graph, read mass-ulw first; this skill covers the storage-and-rerun half.
The shape
A stored definition is a plain dag definition JSON file named <name>.json in one of the library dirs. First hit wins:
$OMO_DAG_LIBRARY(multiple dirs, separated by:— or by;on Windows, so drive-letter paths survive)$PWD/.omo/dags$HOME/.omo/dags
{
"key": "nightly-audit",
"name": "Nightly audit",
"nodes": [
{ "id": "audit", "category": "unspecified-low", "prompt": "Audit docs/ for stale claims; write findings to /tmp/audit-{{key}}.md." },
{ "id": "verify", "category": "quick", "prompt": "Verify each finding in /tmp/audit-{{key}}.md against src/.", "dependsOn": ["audit"] }
]
}
String values may carry placeholders, filled at load time: {{key}} (the final rotated key — use it in file paths so reruns never clobber each other), {{date}} (UTC YYYYMMDD), {{datetime}} (UTC YYYYMMDD-HHmmss). Node prompts must still stand alone: dependsOn is ordering only, so pass data between nodes through files, exactly as in mass-ulw.
Running it — JS eval cell, two lines
The extension publishes library.js next to sdk.js at OMO_DAG_SDK_ROOT:
const lib = await import(`${env("OMO_DAG_SDK_ROOT")}/library.js`)
const run = await lib.start("nightly-audit")
const result = await run.done()
await lib.load(name) returns the filled definition without starting it; await lib.start(name) loads and starts in one call and returns the same handle shape as sdk.start (run_id, done(), cancel(reason)). Both are async — the kernel's read global is async, so never call them un-awaited.
Key rotation — the one rule that matters
The dag engine keys idempotency on key + graph fingerprint: re-starting the same key with the same graph REUSES the old run instead of running again. So the library treats the stored key as a BASE key and rotates it on every load:
lib.start("nightly-audit")→ key becomesnightly-audit-<UTC YYYYMMDD-HHmmss>: every call is a fresh run. This is the default because wanting a fresh run is the common case.lib.start("nightly-audit", { suffix: "20260818" })→ key becomesnightly-audit-20260818: explicit suffix, so re-running the same logical run reuses it (idempotent recovery), while a new day gets a new run. Recovering a FAILED node inside such a run isretry/amendon that run id, not a new suffix.lib.start("nightly-audit", { suffix: "" })→ key staysnightly-audit: full idempotency; only reach for this when reusing the previous result is exactly what you want.
Python cells
Python cannot import the ESM library. Reproduce the same semantics with plain dicts — read the file, rotate the key, fill placeholders, call tool.workflow:
import json
from datetime import datetime, timezone
defn = json.loads(read(f"{env('HOME')}/.omo/dags/nightly-audit.json"))
stamp = datetime.now(timezone.utc).strftime("%Y%m%d-%H%M%S")
defn["key"] = f"{defn['key']}-{stamp}"
text = json.dumps(defn).replace("{{key}}", defn["key"]).replace("{{date}}", stamp[:8]).replace("{{datetime}}", stamp)
run = tool.workflow({"action": "start", "definition": json.loads(text)})
result = tool.workflow({"action": "wait", "run_id": run["run_id"], "detach": False}) # detach=False keeps the cell-blocking wait; the bare tool action detaches against a live run
Saving a new definition
When the user asks to save the current graph: write it as <name>.json into $HOME/.omo/dags (user-level, survives cwd changes) or <repo>/.omo/dags (project-level, shareable through git if the team commits it), then confirm by running it once via lib.start. Names are letters, digits, dot, dash, underscore — the library rejects path-shaped names.
FAQ
Where are the graphs saved?
Graphs are saved in specific folders on your computer, like '$HOME/.omo/dags' or in a '.omo/dags' folder within your current project.
How does the AI know which graph to run?
You tell it the name of the graph you saved. The AI looks for that name in the locations where graphs are stored and executes what was defined.
Can I modify a saved graph?
This skill focuses on saving and running. To create or modify a graph from scratch, you might need another tool, like 'mass-ulw'.
Details
Original description by the author
Stores a DAG definition once and re-runs it by name, instead of pasting the definition into every run. Use when the user wants to save a DAG, run a saved one, or schedule the same multi-agent graph repeatedly.
Popularity
- GitHub stars
- 70k
- Ranking position
- #1723
- License
- NOASSERTION
- Updated
- 10/16/2026
Comments
- …
More skills from this repository
comment-checker
Helps your agent understand and respond to feedback from automatic comment checkers. It's useful when the agent needs to process information from tools that automatically review code or content.
code-yeongyu/oh-my-openagent
lcx-contribute-bug-fix
Helps your agent contribute bug fixes for LazyCodex-related projects. It creates issues or pull requests to ensure code quality.
code-yeongyu/oh-my-openagent
lcx-doctor
Lets your agent check the health of LazyCodex and Codex CLI installations. It's useful when the system behaves oddly after updates or changes.
code-yeongyu/oh-my-openagent
lcx-report-bug
Helps your agent report bugs in detail for LazyCodex projects. It creates issues with useful information for developers to fix the problem.
code-yeongyu/oh-my-openagent
Similar skills
agent-architecture-audit
Makes your agent check if everything is working correctly. It finds and fixes problems in AI systems, ensuring they perform as expected.
affaan-m/ECC
agent-eval
Helps your agent compare different AI coding tools. It measures which one is faster, cheaper, and more reliable for specific tasks.
affaan-m/ECC
agent-harness-construction
Makes your agent better understand how to perform tasks. It optimizes the tools and instructions the agent uses to increase its chances of success.
affaan-m/ECC