# Workflow Orchestrator

> Orchestrate multiple Codex CLI workflows using done-signal files, optional locks, and simple dependencies. Use when this capability is needed.

- Skill: `tomevault-io/workflow-orchestrator` (Agent Skill, multi-file: 2 files)
- Install (CLI): `npx skillmds@latest add tomevault-io/workflow-orchestrator`
- Raw SKILL.md: https://api.skillmd.com/api/skills/tomevault-io/workflow-orchestrator/raw
- Safety review: pending (external: skill-scanner PASS, skillspector PASS)
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Productivity
- Author: tomevault-io (https://skillmd.com/u/tomevault-io)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/tomevault-io/workflow-orchestrator

---


# Workflow Orchestrator

Use this skill when the user wants multiple CLI workflows to coordinate via done-signal files, optionally with file locks.

## Core behavior

- Ask the user for a done-signal file naming scheme (default suggestion: `/tmp/workflow-<name>.done`).
- Ask the user whether any shared resources need locks (files, migration runner, build outputs). If yes, ask for lock file paths.
- Express dependencies by listing each workflow's `--wait-for` done files (one per dependency).
- Warn if a done file already exists from a prior run; recommend deleting it or using a run-specific name.

## Scripts

Use `scripts/run-workflow.sh` to run a workflow with dependencies and optional locking.

### Usage

```
run-workflow.sh \
  --wait-for /tmp/workflow-A.done \
  --done-file /tmp/workflow-B.done \
  --lock /tmp/workflow-shared.lock \
  -- ./your-workflow-command --with args
```

- `--wait-for` can be repeated for multiple dependencies.
- `--done-file` is touched only if the workflow exits successfully.
- `--lock` is optional; if provided, the script uses `flock` when available, otherwise a lock directory.

## Recommended dependency pattern

Use sentinel files as dependency edges:

- Workflow A: `--done-file /tmp/workflow-A.done`
- Workflow B: `--wait-for /tmp/workflow-A.done --done-file /tmp/workflow-B.done`
- Workflow C: `--wait-for /tmp/workflow-B.done`

If the user wants more structure, propose a small text config where each workflow lists its `done` and `wait_for` files, then translate it into the script calls.

---
> Converted and distributed by [TomeVault](https://tomevault.io/claim/edwrld) — claim your Tome and manage your conversions.
<!-- tomevault:4.0:skill_md:2026-04-16 -->

