Skip to content
Development
Skill

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

From plugin
oh-my-openagent
71k33 skills1 agent4 MCP

Claude Code

$ npx -y skills add code-yeongyu/oh-my-openagent --skill dag-library --agent claude-code

SKILL.md

dag-library.SKILL.md
name: dag-library
description: "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."
metadata:
  short-description: Store and re-run named dag definitions

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. `$OMO_DAG_LIBRARY` (multiple dirs, separated by `:` — or by `;` on Windows, so drive-letter paths survive) 2. `$PWD/.omo/dags` 3. `$HOME/.omo/dags`

{
  "key": "nightly-audit",
  "name": "Nightly audit",
  "nodes": [
    { "id": "audit", "category": "unspecified-low", "prompt": "TASK: Audit docs/ for stale claims. DELIVERABLE: /tmp/audit-{{key}}.md listing each stale claim with its file and line. SCOPE: read docs/ and src/; write only /tmp/audit-{{key}}.md. VERIFY: test -s /tmp/audit-{{key}}.md. STOP WHEN: the findings file is written." },
    { "id": "verify", "category": "quick", "prompt": "TASK: Verify each finding in /tmp/audit-{{key}}.md against src/. DELIVERABLE: one CONFIRMED or REFUTED line per finding, citing the src/ file and line. SCOPE: read /tmp/audit-{{key}}.md and src/; write nothing. VERIFY: every finding in the file has exactly one verdict line; a missing file is FAIL. STOP WHEN: every finding has a verdict.", "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. A stored prompt follows mass-ulw's node prompt contract (`TASK:`, `DELIVERABLE:`, `SCOPE:`, `VERIFY:`, `STOP WHEN:`), because the `workflow` `start` behind `lib.start` returns advisory `warnings` for a prompt missing its `TASK:`/`STOP WHEN` markers.

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 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.
  • `lib.start("nightly-audit", { suffix: "" })` → key stays `nightly-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 — resolve the definition through the same lookup order (a path you pass, then `$PWD/.omo/dags`, then `$HOME/.omo/dags`), rotate the key, fill placeholders, call `tool.workflow`:

import json
from datetime import datetime, timezone
defn = json.loads(read(f"{env('PWD')}/.omo/dags/nightly-audit.json"))  # or an absolute path you pass; $HOME/.omo/dags is the last fallback
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.

Read more
@code-yeongyu
Ships withoh-my-openagent

Your tool for real work. But it's an agent. OmO is one omo command that turns your tokens into finished work: research across ten thousand sources, a deck people actually get, backends, frontends, code.

71k33 skills1 agent4 MCP
Get the whole plugin

Stars on GitHub

Momentum

stars in total
70.6k
Star history of code-yeongyu/oh-my-openagent on GitHub, a chart by star-history.com

Other skills on oh-my-openagent.

lsp

lsp

Use when Codex needs language-server diagnostics, definitions, references, symbols, or rename safety checks in the current…

rules

rules

Use when the user asks about Codex Rules behavior, injected project rules, supported rule file locations, matching, or…

More skills from other plugins.

brainstorming
Auto-invoked

brainstorming

You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…

@obra@obraInstall Skill
ask-matt

ask-matt

Ask which skill or flow fits your situation. A router over the skills in this repo.

skills11d309k
@mattpocock@mattpocockInstall Skill
accessibility
Auto-invoked

accessibility

Design, implement, and audit accessible UI to WCAG 2.2 Level AA across Web, iOS, and Android — semantic ARIA roles and labels,…

ecc13d293k
@affaan-m@affaan-mInstall Skill
compiler-commit

compiler-commit

Use when you want to verify compiler changes and commit with the correct convention. Runs tests, lint, and format, then commits…

react2d252k
@facebook@facebookInstall Skill

Questions about dag-library.

Which coding agents can use dag-library?
dag-library installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.