본문으로 건너뛰기
Skillpedia
에이전트70k · #3118

dag-library

하는 일

이 도구는 나중에 다시 사용할 수 있도록 작업 ‘그래프’(DAG라고 부름)의 정의를 저장하게 해 줍니다. 매번 그래프를 설명하는 대신 이름을 붙여 저장하고, 그 이름으로 실행합니다.

사용하는 경우

  • ✓재사용하려고 작업 그래프를 저장하고 싶을 때.
  • ✓같은 작업 그래프를 여러 번 실행해야 할 때.
  • ✓복잡한 워크플로의 반복 실행을 예약하고 싶은 경우.

스킬 링크

https://github.com/code-yeongyu/oh-my-openagent/blob/dev/packages/omo-senpi/skills/dag-library/SKILL.md

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/code-yeongyu/oh-my-openagent/blob/dev/packages/omo-senpi/skills/dag-library/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

AI에게 요청하는 예시

“이 작업 그래프를 ‘monthly-audit’이라는 이름으로 저장하고 실행해 주세요.”

매주 새 스킬 5개. 읽는 데 1분.

작동 방식

그래프 정의를 특별한 파일에 저장합니다. 그다음 붙인 이름을 사용해 AI에게 그래프를 실행하라고 요청할 수 있습니다. AI는 파일을 찾아서 정의된 순서대로 작업을 실행합니다.

기술 내용 (원본 SKILL.md)

작성자의 영어 원문을 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:

  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": "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 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 — 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.

자주 묻는 질문

그래프는 어디에 저장되나요?

컴퓨터의 특정 폴더(예: $HOME/.omo/dags) 또는 현재 프로젝트 안의 .omo/dags 폴더에 저장됩니다.

AI는 어떤 그래프를 실행할지 어떻게 아나요?

저장한 그래프 이름을 알려 줍니다. AI는 그 이름을 그래프가 저장된 위치에서 찾아 정의된 대로 실행합니다.

저장된 그래프를 수정할 수 있나요?

이 스킬은 저장과 실행에 집중합니다. 그래프를 처음부터 만들거나 수정하려면 ‘mass-ulw’ 같은 다른 도구가 필요할 수 있습니다.

상세 정보

작성자의 원본 설명

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.

repo: code-yeongyu/oh-my-openagent

인기도

GitHub 스타
70k
순위
#3118
라이선스
NOASSERTION
업데이트
2026. 10. 15.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬