Are you an LLM? Read llms.txt for a summary of the docs, or llms-full.txt for the full context.
Skip to content

Templates

rflow ships a first-party template registry: 27 productized recipes that turn "I want to watch a Safe / relay deposits / page on dead-letters" into a validated, production-shaped project in one command. A template is not a snippet — it knows rflow semantics end to end: typed inputs, networks, contracts, packaged ABIs, relayers, notification channels, secrets, safety defaults, replay fixtures, a docs recipe and snapshot tests.

rflow templates ls                    # browse (filter: --category, --risk, --json)
rflow new --template safe-monitor     # scaffold a complete project
rflow add workflow workflow-error-pager   # compose into an EXISTING rflow.yaml

See Using templates for the full command walkthrough, Creating templates to add your own, and the use-case recipes for one page per template. The runnable walkthrough lives at examples/template-gallery (make run-template-gallery from the repo root).

Beyond the builtin set there is a community registry: templates submitted by PR into the rflow repo, fetched SHA-pinned and hash-verified at install time (rflow templates ls --community, rflow new --template community/<id>) — merged today, installable today by every existing binary.

The registry

idcategoryrisksummary
aave-health-guardiankeepermoney_movingPoll an Aave v3 position's health factor and park an approval-gated repay when it drops
bridge-message-watchbridge-opsmonitor_onlyCross-reference a bridge's MessageSent/MessageReceived by nonce and alert on missed delivery
chainlink-deviation-alertmonitoringmonitor_onlyCron-compare two Chainlink feeds and alert when they disagree beyond a basis-point threshold
chainlink-oracle-stalenessmonitoringmonitor_onlyPoll a Chainlink feed's latestRoundData and alert when updatedAt goes stale
command-decisionexamplesmonitor_onlyCron reads a token supply on-chain, a project-owned script decides a severity, rflow reports it
command-trade-preprelayersmoney_movingA deposit event fires a project-owned quote script; rflow signs, simulates, rechecks and sends the trade
cron-http-reportoffchainmonitor_onlyA cron POSTs an HMAC-signed JSON heartbeat report to an HTTP endpoint
erc4626-vault-monitormonitoringmonitor_onlyAlert on large ERC-4626 deposits/withdrawals and when the share price drops below a floor
erc721-floor-sweep-watchmonitoringmonitor_onlyIndex an ERC-721 collection's Transfers and alert when one wallet sweeps many in a window
erc7683-solverintentsmoney_movingFill ERC-7683 intents: Open event, profitability quote, race check, fill
large-transfer-alertmonitoringmonitor_onlyAlert a notification channel when an ERC20 transfer crosses a threshold
liquidation-keeperkeepermoney_movingPoll a borrower's health factor and fire a simulated, gas-capped liquidation
native-spend-reporttreasurymonitor_onlyCron-aggregate the journal's send history into an HMAC-signed HTTP + chat spend report
price-alert-streammonitoringmonitor_onlySubscribe to a public price WebSocket feed, filter by symbol + threshold, and notify
proxy-upgrade-alertsecuritymonitor_onlyAlert when an ERC1967 proxy emits Upgraded — with the old and new implementation
relayer-low-balance-alertrelayersmonitor_onlyPoll a relayer wallet's native balance and alert once when it crosses under a floor
safe-monitorsecuritymonitor_onlyWatch a Safe for owner/threshold changes and successful executions — notify
safe-owner-change-alertsecuritymonitor_onlyWatch a Safe for AddedOwner/RemovedOwner/ChangedThreshold and report the new threshold
security-advisory-watchsecuritymonitor_onlyPoll an RSS/Atom security feed (trigger.web) and page on every NEW matching advisory — deduped by link
solver-inventory-rebalanceintentsmoney_movingPoll a solver wallet's ERC20 inventory and top it up from a funding wallet behind approval
solver-pnl-reportintentsmonitor_onlyCron-summarize a solver's fill workflow from the journal: filled, skipped/raced, failed, native spend
timelock-monitorgovernancemonitor_onlyWatch an OpenZeppelin TimelockController for scheduled/executed/cancelled operations
token-deposit-relayrelayersmoney_movingERC20 deposits into a watched address trigger a gated, relayed payout
treasury-sweep-approvaltreasurymoney_movingCron reads a hot wallet ERC20 balance and parks a sweep behind approval
uniswap-v3-lp-monitormonitoringmonitor_onlyAlert when a Uniswap v3 pool's price tick leaves an LP range — on Swap events and a slot0 poll
webhook-idempotent-handleroffchainprepares_txAn HMAC-authenticated webhook with a native idempotency_key feeds a command step that validates, dedupe-keys and prepares a transfer; rflow notifies
workflow-error-pagermonitoringmonitor_onlyPage pagerduty or telegram when ANY workflow's run dead-letters or fails

Risk labels

Every template carries an honest risk label — filter with rflow templates ls --risk <label>:

  • monitor_only — no signer, no relayer, no transactions. The generated project physically cannot move money.
  • prepares_tx — creates transaction data (calldata, dedupe keys) but never broadcasts; there is no signer in the project.
  • money_moving — sends transactions through the embedded relayer.
  • admin — contract ownership / proxy / pause / timelock actions.
  • experimental — useful, but not a recommended production starting point.

(No bundled template is currently admin or experimental.)

Safety defaults on money templates

Every money_moving template renders the full set of rails — they are in the generated YAML, not implied by the runtime:

  • pre-broadcast simulation with assert_sim: ["${{ sim.ok }}"] and gas.limit_from_simulation
  • a gas price/cost cap (gas.max_price / max_cost)
  • a recheck: re-evaluated immediately before broadcast wherever a time-varying guard exists (erc7683-solver's fill deadline, command-trade-prep's quote freshness) — flows whose only broadcast-time guard is the fresh simulation ship none rather than a recheck that only re-tests journaled constants
  • trigger-level confirmations + run_on: confirmed — a reorged deposit never even creates a run
  • wait_for: confirmed on the send and on_failure: dead_letter on the workflow
  • a concurrency group (queue for event relays, skip for keepers)
  • an approval: gate on treasury/admin flows (treasury-sweep-approval parks behind a human rflow approve)

What every template package guarantees

rflow templates doctor --all enforces, for each of the 27 packages: the manifest parses strictly, the declared output files match the packaged files, required ABIs are packaged, all inputs are well-formed, the sample answers render a project that passes rflow validate, the committed snapshot matches, and the docs page exists. Installs are recorded in .rflow/template-lock.yaml.