Trigger.dev Agent Patterns
papermark/papermark
Patterns for building LLM agents on Trigger.dev tasks: prompt chaining, routing, parallel workers, orchestrator-workers, evaluator loops and human approval gates.
Runs or authors Smithers TypeScript flows for ordered agent stages with retries, approvals, bounded loops and crash-safe recovery, built from Flow.make, Action.make and Effect.
$ npx skills add smithersai/smithers --skill smithers -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install smithersai/smithers smithers --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/smithersai/smithers.git skills-src && mkdir -p .claude/skills && cp -r skills-src/packages/smithers/skills/smithers .claude/skills/smithers && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "smithers" agent skill from https://github.com/smithersai/smithers/tree/main/packages/smithers/skills/smithers into .claude/skills/smithers/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "smithers", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/smithersai/smithers/tree/main/packages/smithers/skills/smithersType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add smithersai/smithers --skill smithers -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install smithersai/smithers smithers --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/smithersai/smithers.git skills-src && mkdir -p .agents/skills && cp -r skills-src/packages/smithers/skills/smithers .agents/skills/smithers && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "smithers" agent skill from https://github.com/smithersai/smithers/tree/main/packages/smithers/skills/smithers into .agents/skills/smithers/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "smithers", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add smithersai/smithers --skill smithers -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install smithersai/smithers smithers --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/smithersai/smithers.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/packages/smithers/skills/smithers .cursor/skills/smithers && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "smithers" agent skill from https://github.com/smithersai/smithers/tree/main/packages/smithers/skills/smithers into .cursor/skills/smithers/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "smithers", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/smithersai/smithers.git --path packages/smithers/skills/smithers--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add smithersai/smithers --skill smithers -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install smithersai/smithers smithers --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/smithersai/smithers.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/packages/smithers/skills/smithers .gemini/skills/smithers && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "smithers" agent skill from https://github.com/smithersai/smithers/tree/main/packages/smithers/skills/smithers into .gemini/skills/smithers/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "smithers", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install smithersai/smithers smithersInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add smithersai/smithers --skill smithers -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/smithersai/smithers.git skills-src && mkdir -p .github/skills && cp -r skills-src/packages/smithers/skills/smithers .github/skills/smithers && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "smithers" agent skill from https://github.com/smithersai/smithers/tree/main/packages/smithers/skills/smithers into .github/skills/smithers/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "smithers", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add smithersai/smithers --skill smithers -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install smithersai/smithers smithers --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/smithersai/smithers.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/packages/smithers/skills/smithers .opencode/skills/smithers && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "smithers" agent skill from https://github.com/smithersai/smithers/tree/main/packages/smithers/skills/smithers into .opencode/skills/smithers/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "smithers", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
smithersRuns or authors Smithers TypeScript flows for ordered agent stages with retries, approvals, bounded loops and crash-safe recovery, built from Flow.make, Action.make and Effect.
The skill's first rule is to check SMITHERS_INSIDE_RUN before doing anything: if it is set, the agent is a worker executing one assigned step with its ordinary tools, and must never launch, steer or poll another run from inside that step, declaring a HumanTask in the flow instead of improvising orchestration when a person must decide. Otherwise it routes the request: clarify missing acceptance criteria, handle a single clear goal directly however large, reach for a flow only when there are ordered stages with real gates, durability, approvals, bounded loops or reusable work, and prefer running an existing flow over writing a new one.
The mental model separates a Flow (a tagged durable program with payload, success and error schemas, whose body plans while actual effects live in actions), an Action (a named recorded side effect declared with Action.make), a Node (the plan-time graph composed with helpers like Node.map and Node.branch) and a Plan (the compiled graph and approval envelope, which executes authoring callbacks but does not sandbox untrusted JavaScript). Completed actions are recorded so recovery resumes at the frontier rather than from the start.
A file flow lives at flows/name/flow.ts with a literal default export so discovery can read its metadata without executing the module, and the smthrs CLI lists, plans and starts flows, with the run's actual result checked rather than assuming the start receipt means success. Only Effect 4.0.0-rc.115 and the Smithers 1.0 API are used, never JSX or 0.x APIs.
4 steps, taken from the first numbered list in SKILL.md.
Read from SKILL.md and the folder at commit b7f0898. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
No scripts in the folder and no shell commands in SKILL.md (its code samples are bash).
From the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Smithers Durable Flow Driver loads about 3k tokens when it runs. Until then it costs about 77 tokens; SKILL.md has 1,583 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from smithersai/smithers at commit b7f0898, republished under its MIT licence (© smithersai). 1,583 words, ~2,991 tokens.
.claude/skills/smithers/SKILL.md (or your agent's skills folder).A flow is ordinary TypeScript built from Flow.make, Action.make, and
Effect. Completed actions are recorded; recovery resumes at the frontier.
Use Effect 4.0.0-rc.115 and the Smithers 1.0 APIs. Read the owning package's
README and docs before authoring. Never use JSX or 0.x APIs.
Check SMITHERS_INSIDE_RUN before routing. If set, you are a worker executing
one step. Do the assigned work with your ordinary tools and finish your turn.
Never launch, steer, or poll another run from inside that step. Declare a
HumanTask in the flow when a person must decide; do not improvise orchestration
from inside an agent.
Flow. A tagged durable program with payload, success, and error schemas. Its body builds a plan; effects belong in action implementations.
Action. A named recorded side effect. Declare it with Action.make and
attach its implementation with Declared.toLayer.
Node. The plan-time graph from @smthrs/plan. Compose nodes with Node.map,
Node.andThen, Node.bindPlanned, Node.branch, and Node.all.
Plan. The compiled graph and approval envelope. Planning executes authoring callbacks; it does not sandbox untrusted JavaScript.
Step key. Persisted identity derived from declarations, dependencies, and callback captures. Change meaning deliberately; keep secrets out of payloads and captures.
smthrs flow list
smthrs flow plan hello --data '{"name":"world"}'
smthrs flow start hello --data '{"name":"world"}' --json
smthrs runs show <run-id>
smthrs runs logs <run-id> --followRead the run ID from the receipt. Admission is not completion. Check the run's
actual result before reporting success. Use smthrs <command> --help or
--schema for the installed command contract.
Put a file flow at flows/<name>/flow.ts. Default-export a literal tagged
Flow.make("<name>", { description, capabilities, effects, payload, success, error?, body }) from @smthrs/flow. Discovery reads metadata without executing
that module. Keep metadata literal; helpers and computed metadata can hide an
entry from discovery.
Export action implementations as the optional named layer: use
Declared.toLayer, AgentAction.layer, or Layer.mergeAll. The local CLI/TUI
host composes that layer with FileSystem, Path, ChildProcessSpawner, HttpClient,
and agent services (#2923). Export implementations directly; the host owns
Action.Implementations. Acquire extra dependencies during layer construction
so missing services are refused at load.
Sleep.action, WaitFor.action, and
HumanTask.action carry no compile-time implementation requirement. Merge
the corresponding Sleep.layer, WaitFor.layer, and HumanTask.layer into
your implementations unless your host already provides them. A missing
handler is refused as unresolved_action: Action "system/sleep" has no implementation.flow.ts may
export const layer = Layer.mergeAll(...). Include declared action layers
and AgentAction.layer; use the host services above rather than rebuilding
the host (#2923).Flow.start and Flow.ensure return after admission and scheduling; the
child runs detached (#2932). Give each logical launch a stable ensure key
that includes its round or execution component. Reuse it only for retries
of the same payload; different payloads raise ExecutionIdentityConflict.
Fan out with Effect.forEach(items, launch, { concurrency }); wrap each
launch in Effect.exit so one refusal does not fail the batch. Retain exits
and execution IDs; inspect completion separately.["fs:read:**", "fs:write:**", "proc:spawn:*", "net:get:*", "net:post:*", "model:call:*"]. smthrs flow start refuses to auto-approve
["*"].Node.bindPlanned builders, and other persisted callbacks in Node.capture.
Declare every semantic closed-over value and an explicit version for
imported behavior. Bump the version when topology or meaning changes; plan
a new run. Captures must be inert data, not service or function objects..to an explicit Flow.Flow<...> annotation to break recursive inference.
For discovery, put the typed loop beside a literal
export default Flow.make( entry that hands off to it. Keep the entry's
description, capabilities, effects, payload, and success literal. Register
the loop's interpreter in the exported layer.<seat>@<account>, such as
claude-code:opus@claude-9 or sol@codex-3. Check the selected login;
never accidentally send subscription work through a paid API route.
Unpinned Claude aliases select the API when an Anthropic key is available;
explicit claude-code: seats refuse an unavailable subscription rather
than falling back to a key.CommandSandbox defaults to 15 seconds;
each probe times out after twice that interval, and two silent probes fail
the command. Loaded hosts can delay probes and kill healthy commands.
Configure heartbeat for local placements; prefer remote placement for
fleets.smthrs loads source even if dist exists;
half-written modules can fail startup or body loading, and source drift is
refused. Keep the host source fixed for its lifetime.Keep clocks, filesystem reads, network calls, and other effects inside actions.
Use Sleep.action for a planned timer, WaitFor.action for a durable wait,
and HumanTask.action for a person's decision. Register their layers.
Use @smthrs/patterns before hand-rolling familiar topology. Give irreversible
work an idempotency strategy before retrying it; no retry rolls effects back.
Read state before acting. On failure, inspect smthrs runs show <run-id>, then
the events if needed. Fix the cause before retrying. Preserve failed launch
receipts, cancellation, and completion evidence. Report the result, the run ID,
and the next action in a few words; never call an accepted launch completed.
Use smthrs environment for persistent local, SSH, or Cloud locations.
Tools manage their own login in the selected home; profiles describe locations.
smthrs agent — run. Configure an agentsmthrs agent edit — confirm; waits for the person's confirmation. Propose an instruction changesmthrs agents — run. The factory's agentssmthrs branch show — run. Open a branch's cardsmthrs branch add-to-stack — confirm; waits for the person's confirmation. Add a scratch branch as a TODOsmthrs branch archive — confirm; waits for the person's confirmation. Archive a scratch branchsmthrs branch fork — run. Fork a scratch branchsmthrs branch rebase — run. Rebase this branch nowsmthrs branches — run. List branches with presencesmthrs diff — run. Show a branch's changessmthrs file — run. Open and co-edit a filesmthrs files — run. Browse a branch's filessmthrs flow show — run. Show a flow's steps and versionssmthrs flow edit — confirm; waits for the person's confirmation. Propose a change to a flowsmthrs flow new — confirm; waits for the person's confirmation. Create a new flowsmthrs flow plan — run. See what a flow would runsmthrs flow run — run. Run a flow with typed inputsmthrs flow source — run. Co-edit a flow's sourcesmthrs flows — run. List the repository's flowssmthrs github — run. Show sync status and retrysmthrs issue show — run. Open an issue's cardsmthrs issue comment — confirm; waits for the person's confirmation. Comment on an issuesmthrs issue new — confirm; waits for the person's confirmation. Open a GitHub issuesmthrs issues — run. List the repository's issuessmthrs merge — confirm; waits for the person's confirmation. Review and merge the next itemsmthrs monitor — run. Every run, with its debug viewsmthrs pr — run. Open a pull request's cardsmthrs review — confirm; waits for the person's confirmation. Review a change, return findingssmthrs runs show — run. Open a run's cardsmthrs run inspect — run. Open a run's monitorsmthrs runs list — run. Active and attention-needing runssmthrs search — run. Search code, wiki and runssmthrs stack — run. Show the stack and background runssmthrs stack move — run. Reorder an itemsmthrs todo show — run. Open a TODOsmthrs todo amend — confirm; waits for the person's confirmation. Change an unmerged TODO's promptsmthrs todo answer — run. Answer the agent's questionsmthrs todo drop — confirm; waits for the person's confirmation. Abandon an unmerged TODOsmthrs todo from-issue — confirm; waits for the person's confirmation. Draft a TODO from an issuesmthrs todo new — confirm; waits for the person's confirmation. Write and place a TODOsmthrs todo resume — run. Resume a paused TODOsmthrs todo retry — run. Retry a failed TODOsmthrs todo steer — run. Send the agent a correctionsmthrs todo stop — run. Pause a working TODOsmthrs wiki show — run. Open the wikismthrs wiki page — run. Open or create a pagesmthrs wiki save — run. Save this answer as a page© smithersai, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
Just SKILL.md in packages/smithers/skills/smithers of smithersai/smithers.
Open the folder on GitHubat commit b7f0898
Smithers Durable Flow Driver next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Smithers Durable Flow Driver this skillsmithersai/smithers | 430 | — | ~3k | Automated safety check: Pass | MIT | |
| Trigger.dev Agent Patternspapermark/papermark | 9.2k | — | ~2k | Automated safety check: Pass | Custom licence | |
| Sol and Luna Worker Routermajiayu000/spellbook | 287 | — | ~3.3k | Automated safety check: Pass | MIT | |
| Fleet Manager for Agent Sessionsasgeirtj/system_prompts_leaks | 69k | — | ~2.5k | Automated safety check: Pass | CC0-1.0 | |
| Codewhale Fleet Managercodewhale-hq/Codewhale | 41k | — | ~1.2k | Automated safety check: Pass | MIT | |
| Ultraapp InterviewEnderfga/claw-orchestrator | 589 | — | ~1.7k | Automated safety check: Pass | MIT |
papermark/papermark
Patterns for building LLM agents on Trigger.dev tasks: prompt chaining, routing, parallel workers, orchestrator-workers, evaluator loops and human approval gates.
majiayu000/spellbook
Splits substantial coding or repository-review work between a Sol commander that decides and verifies and a separate Luna Max worker that implements, with an auditable run log.
asgeirtj/system_prompts_leaks
Shows one digest of coding-agent sessions across your connected machines and lets you open, read, steer, approve, stop and close them, over Herdr, tmux or MSP.
codewhale-hq/Codewhale
Triages and manages Codewhale fleet runs and workers with typed commands, classifying failures and choosing a safe restart, resume or escalation.
Enderfga/claw-orchestrator
A skill your agent uses when the user opens a Forge tab in the claw-orchestrator dashboard to start building a new ultraapp.
google/adk-python
Builds ADK (Agent Development Kit) Python agents: LLM agents with tools, graph workflows of function and agent nodes, conditional routing, fan-out and join, schema-validated delegation between…
smithersai/smithers
Guides changes to the Smithers agent loop's host wiring: credentialed model seats, budget accounting, sandbox limits and flow-call authorization.
smithersai/smithers
Documents how Smithers discovers and registers workflow flow files, so catalog listings stay metadata-only while running a flow loads its full body and action layers.
smithersai/smithers
Points agents to the right sources when changing the Smithers workspace graph, generated docs, benchmark and eval evidence, or durable flows in the Smithers repository.
smithersai/smithers
Procedure for changing or verifying the flows-jj native and WASM ABI, its committed artifact and its reproducibility campaign in the Smithers repository.
smithersai/smithers
Maintain the existing @smthrs/chain runner, journal replay, catalog handlers, or sandbox boundary.
smithersai/smithers
Change local coding-harness discovery, account status, model flag detection, or version probes.
Works with
Categories
Runs or authors Smithers TypeScript flows for ordered agent stages with retries, approvals, bounded loops and crash-safe recovery, built from Flow.make, Action.make and Effect. The skill's first rule is to check SMITHERS_INSIDE_RUN before doing anything: if it is set, the agent is a worker executing one assigned step with its ordinary tools, and must never launch, steer or poll another run from inside that step, declaring a HumanTask in the flow instead of improvising orchestration when a person must decide. Otherwise it routes the request: clarify missing acceptance criteria, handle a single clear goal directly however large, reach for a flow only when there are ordered stages with real gates, durability, approvals, bounded loops or reusable work, and prefer running an existing flow over writing a new one.
Smithers Durable Flow Driver fits situations like: writing a durable, retryable multi-stage agent workflow in TypeScript; running an existing Smithers flow instead of writing a new one; adding a human-approval gate to a multi-step agent process; executing one assigned step correctly when already running inside a flow.
Run `npx skills add smithersai/smithers --skill smithers -a claude-code`. Or copy the skill folder (packages/smithers/skills/smithers in smithersai/smithers) into .claude/skills/smithers in your project. Claude Code loads it when a task matches its description.
Run `npx skills add smithersai/smithers --skill smithers -a codex`. Or copy the skill folder (packages/smithers/skills/smithers in smithersai/smithers) into .agents/skills/smithers in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add smithersai/smithers --skill smithers -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/smithers, .gemini/skills/smithers, .github/skills/smithers and .opencode/skills/smithers in your project.
SKILL.md names no scripts, command-line tools or credentials: Smithers Durable Flow Driver is instructions for the agent only. Our summary lists: Effect 4.0.0-rc.115; The smthrs CLI and the Smithers 1.0 APIs.
SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.
Smithers Durable Flow Driver is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 3k tokens (SKILL.md is roughly 12k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with Smithers Durable Flow Driver: Trigger.dev Agent Patterns (papermark/papermark, 9.2k stars), Sol and Luna Worker Router (majiayu000/spellbook, 287 stars), Fleet Manager for Agent Sessions (asgeirtj/system_prompts_leaks, 69k stars) and Codewhale Fleet Manager (codewhale-hq/Codewhale, 41k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
smithersai (a GitHub organization) maintains it in smithersai/smithers, which has 430 GitHub stars. The repository holds 9 skills in this directory. The repository was last updated on October 10, 2026.
Source: smithersai/smithers on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.