Skip to content
Back to skills

Setup

ASecurity

Scaffold a new Ironflow project - a Cargo workspace with a workflows lib, an API server binary, a worker binary, a hello workflow and its end-to-end test. Loaded by the ironflow hub for the setup verb.

  • 2 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added October 6, 2026
developmentrustgobashsqlapidatabase

Works with

  • claude code
  • cli
  • api

Security analysis

A100/100

Pro scans all 15 files and shows the line behind each finding

Scanned October 6, 2026

npx -y skills add ThomasTartrau/ironflow --skill setup --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Setup?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Setup
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/thomastartrau-setup/badge)](https://www.skillsdirectory.com/skills/thomastartrau-setup)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: setup
description: Scaffold a new Ironflow project - a Cargo workspace with a workflows lib, an API server binary, a worker binary, a hello workflow and its end-to-end test. Loaded by the ironflow hub for the setup verb.
user-invocable: false
allowed-tools: Bash(cargo:*), Bash(${CLAUDE_SKILL_DIR}/scripts/scaffold.sh:*)
---

# Ironflow setup

Creates a runnable Ironflow platform in an empty directory. Everything the script copies lives in `${CLAUDE_SKILL_DIR}/assets/` and is compiled in Ironflow's CI, so read the assets rather than re-deriving them.

## 1. Check the environment

```bash
rustc --version            # 1.94 or newer
cargo --version
claude --version 2>/dev/null || echo "claude CLI not found"
psql --version 2>/dev/null || echo "psql not found"
```

Rust below 1.94: stop and say so, Ironflow does not compile on older toolchains.

## 2. Ask two questions, then stop asking

Ask both in one AskUserQuestion call:

1. **Store**: in-memory (runs are lost on restart, no database needed) or Postgres (needs `DATABASE_URL`, migrations run automatically at boot).
2. **Agent provider for the worker**: Claude Code CLI (`claude` on PATH), Anthropic API (`ANTHROPIC_API_KEY`), OpenAI (`OPENAI_API_KEY`), or "no agent steps for now" (keep the Claude Code provider, it is only exercised when a workflow runs an agent step).

Also confirm the target directory (default: current directory if empty, otherwise ask for a name).

## 3. Scaffold

```bash
"${CLAUDE_SKILL_DIR}/scripts/scaffold.sh" <target-dir>
```

The script refuses a non-empty directory. It copies the template and runs `cargo add` for every ironflow crate, so versions come from crates.io at scaffold time. Then apply the answers from step 2 by following `${CLAUDE_SKILL_DIR}/references/options.md` (Postgres block, provider block). Skip it entirely for in-memory + Claude Code.

## 4. Verify

```bash
cd <target-dir>
cargo build --workspace
cargo test --workspace
```

Both must pass before you report anything. The test suite runs the `hello` workflow through a real engine.

## 5. Proof of life

Tell the user how to see a run complete, in this order:

```bash
scripts/dev.sh             # starts the API server, then one worker
```

Then in the dashboard at `http://localhost:3000`: create the first account (it becomes admin), open **API keys**, create a key with the `workflows_read`, `runs_read` and `runs_write` scopes, and run:

```bash
cargo install ironflow-cli
export IRONFLOW_URL=http://localhost:3000 IRONFLOW_API_KEY=irfl_...
ironflow-cli workflow list
ironflow-cli run create hello --payload '{"name":"Ada"}'
ironflow-cli logs <run-id>
```

A `completed` run with one `greet` step is the proof of life.

## 6. Hand over

Report the generated layout in five lines, then point to the next verbs: `/ironflow workflow <name>` to add a handler, `/ironflow operation <name>` for an integration, `/ironflow test <name>` for a test.

## Layout the script produces

```text
<target>/
  Cargo.toml            workspace: workflows, server, worker
  .env.example          every variable, commented; copied to .env with fresh
                        WORKER_TOKEN and JWT_SECRET
  scripts/dev.sh        server then worker, Ctrl+C stops both
  workflows/            lib: handlers() + hello.rs + tests/hello.rs
  server/               API server, dashboard embedded, reaper, SSE
  worker/               polls the server, executes handlers
```

## Failure modes

- `cargo add` fails with a network error: retry once, then tell the user the crate resolution failed and which command to rerun.
- `cargo build` fails inside an ironflow crate: the template and the published crates drifted. Report the error verbatim with the crate version from `Cargo.lock`, do not patch the ironflow crate.
- Port 3000 busy: set `PORT` in `.env`; `scripts/dev.sh` honours it.

Files in this skill

  • SKILL.md3.8 KB
  • assets/.env.example2.8 KB
  • assets/.gitignore12 B
  • assets/Cargo.toml127 B
  • assets/scripts/dev.sh475 B
  • assets/server/Cargo.toml394 B
  • assets/server/src/main.rs7.7 KB
  • assets/worker/Cargo.toml308 B
  • assets/worker/src/main.rs2.3 KB
  • assets/workflows/Cargo.toml264 B
  • assets/workflows/src/hello.rs1.6 KB
  • assets/workflows/src/lib.rs455 B
  • assets/workflows/tests/hello.rs1.7 KB
  • references/options.md5.5 KB
  • scripts/scaffold.sh2.7 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…