Agent skill · code-yeongyu
dag-library
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.
What it needs
About 2k tokens when loaded.
What this skill does
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: 1. $OMODAGLIBRARY (multiple dirs, separated by : — or by ; on Windows, so drive-letter paths survive) 2. $PWD/.omo/dags 3. $HOME/.omo/dags 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 OMODAGSDKROOT: 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 (runid, 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 becomes nightly-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 becomes nightly-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 is retry/amend on that run id, not a new suffix. …
How to use it
Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:
@skills code-yeongyu/dag-library