From ba84119842b003272be562ad582c77f0db2ca744 Mon Sep 17 00:00:00 2001 From: fowler128 Date: Sat, 21 Mar 2026 11:58:28 -0500 Subject: [PATCH] Add installable workflow-use Codex skill --- scripts/install_workflow_use_skill.py | 52 ++++++++++++++++++++++++++ skills/workflow-use/SKILL.md | 50 +++++++++++++++++++++++++ skills/workflow-use/agents/openai.yaml | 3 ++ 3 files changed, 105 insertions(+) create mode 100755 scripts/install_workflow_use_skill.py create mode 100644 skills/workflow-use/SKILL.md create mode 100644 skills/workflow-use/agents/openai.yaml diff --git a/scripts/install_workflow_use_skill.py b/scripts/install_workflow_use_skill.py new file mode 100755 index 0000000..1d51221 --- /dev/null +++ b/scripts/install_workflow_use_skill.py @@ -0,0 +1,52 @@ +#!/usr/bin/env python3 +from __future__ import annotations + +import argparse +import os +import shutil +from pathlib import Path + + +def main() -> int: + parser = argparse.ArgumentParser(description="Install the local workflow-use Codex skill") + parser.add_argument( + "--source", + default=Path(__file__).resolve().parents[1] / "skills" / "workflow-use", + type=Path, + help="Path to the workflow-use skill source directory", + ) + parser.add_argument( + "--dest-root", + default=Path(os.environ.get("CODEX_HOME", Path.home() / ".codex")) / "skills", + type=Path, + help="Root skills directory (defaults to $CODEX_HOME/skills)", + ) + parser.add_argument( + "--force", + action="store_true", + help="Overwrite an existing installation", + ) + args = parser.parse_args() + + source = args.source.resolve() + dest = args.dest_root.resolve() / source.name + + if not source.is_dir(): + raise SystemExit(f"Source skill directory not found: {source}") + + if dest.exists(): + if not args.force: + raise SystemExit( + f"Destination already exists: {dest}. Re-run with --force to overwrite." + ) + shutil.rmtree(dest) + + dest.parent.mkdir(parents=True, exist_ok=True) + shutil.copytree(source, dest) + print(f"Installed {source.name} to {dest}") + print("Restart Codex to pick up new skills.") + return 0 + + +if __name__ == "__main__": + raise SystemExit(main()) diff --git a/skills/workflow-use/SKILL.md b/skills/workflow-use/SKILL.md new file mode 100644 index 0000000..1f29b5c --- /dev/null +++ b/skills/workflow-use/SKILL.md @@ -0,0 +1,50 @@ +--- +name: workflow-use +description: Use Browser Use Workflow Use to record browser workflows once, run them deterministically, launch its GUI, and generate reusable workflows from natural-language tasks. +--- + +# Workflow Use + +Use this skill when the user wants help with Browser Use's Workflow Use project: recording a workflow, running an existing workflow, launching the GUI, or generating a reusable workflow from a natural-language task. + +## When to use + +Trigger this skill for requests like: +- "Use workflow-use to record this browser flow" +- "Run this Workflow Use workflow/json" +- "Generate a workflow from this task description" +- "Launch the Workflow Use GUI" +- "Help me set up browser-use/workflow-use" + +## Quick workflow + +1. Confirm where the `browser-use/workflow-use` repository is available locally. +2. If the repo is not present, tell the user it must be cloned or unpacked first. +3. Pick the appropriate mode: + - **Generate from task**: `python cli.py generate-workflow ""` + - **Run stored workflow**: `python cli.py run-stored-workflow --prompt ""` + - **Run workflow file as tool**: `python cli.py run-as-tool --prompt ""` + - **Run workflow with predefined variables**: `python cli.py run-workflow ` + - **Record a workflow**: `python cli.py create-workflow` + - **Launch GUI**: `python cli.py launch-gui` +4. If the Python environment is not set up yet, prepare it from the repo's `workflows/` directory: + - `uv sync` + - `source .venv/bin/activate` on macOS/Linux + - `playwright install chromium` + - copy `.env.example` to `.env` and set `OPENAI_API_KEY` +5. For the extension, build it from `extension/` with `npm install && npm run build`. + +## Notes + +- Workflow Use is an early-stage project; expect setup changes and rough edges. +- Generated workflows are stored under `workflows/storage/`. +- The GUI starts the backend and frontend together and opens `http://localhost:5173`. +- Cloud browser runs require `BROWSER_USE_API_KEY`. + +## Response guidance + +When helping the user: +- Be explicit about which directory each command should run in. +- Distinguish between **setup**, **recording**, **execution**, **generation**, and **GUI** flows. +- If the user only provides a high-level task, recommend generation mode first. +- If the user already has a workflow JSON file, recommend `run-as-tool` or `run-workflow`. diff --git a/skills/workflow-use/agents/openai.yaml b/skills/workflow-use/agents/openai.yaml new file mode 100644 index 0000000..2fd1ce6 --- /dev/null +++ b/skills/workflow-use/agents/openai.yaml @@ -0,0 +1,3 @@ +display_name: Workflow Use +short_description: Record, generate, and run Browser Use workflows. +default_prompt: Help me use Browser Use Workflow Use to set up, record, generate, or run workflows.