skills/agently-triggerflow/SKILL.md
Use when the user needs workflow orchestration such as branching, concurrency, approvals, waiting and resume, runtime stream, restart-safe execution, mixed sync/async function or module orchestration, event-driven fan-out, process-clarity refactors that make stages explicit, performance-oriented refactors that collapse split requests, or workflow definitions and chunk-level runtime metadata that must stay visible for debugging and visualization. The user does not need to say TriggerFlow explicitly.
npx skillsauth add agentera/agently-skills agently-triggerflowInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Use this skill when the solution clearly needs orchestration semantics rather than one request family.
The user does not need to say TriggerFlow or Agently. Scenario language such as resumable approval flow, branching automation, output-fan-out refactor, mixed sync/async pipeline, process-clarity refactor, or draft-review-revise pipeline should still route here once orchestration is clearly the owner layer.
agent.create_task(...) when the app needs one Agent-owned business
task loop where the model owns planning, verification, and replan; use
TriggerFlow directly when the application owns explicit stages, branching,
pause/resume, or restart topologytask.stream() and surface
meta.stream_kind=="snapshot" items as compact intermediate state captures;
enable options={"agent_task": {"stream_progress": True}} only when the
example or host needs natural-language operator updates; omit
progress_model_key for template progress with no model requests, or set
progress_model_key to run a separate background model that summarizes only
existing snapshots/task metadata without adding main-loop fields or latency;
prove replan behavior from stream verification/replan events and snapshots
rather than hiding the proof in a local Python loop; mocked business systems
may supply defective facts or conflicting source data, but must not return
pass/fail verdicts or deterministic quality judgmentsclose() / async_close() for completion and cleanupexecution.result when services, UIs, stream consumers, or intervention-aware workflows need multiple views of one execution outcome, such as state, compatibility final result, interventions, and metadata; use execution.close() / execution.async_close() for close snapshots.intervention_point(...) boundaries so execution creation can infer planned mode, or create the execution with intervention_mode="auto" for boundary policy insertion; chunks read inserted context with data.get_interventions(...) and explicitly audit usage with data.async_mark_intervention_consumed(...), relying on the chunk-name consumer default unless another consumer identity is clearerpause_for(..., resume_to="next" | "self" | {"event": ...}); treat it as a durable graph interrupt, not Python coroutine stack persistence; teach model-decided autonomous interrupts with model-owned pause_for(..., resume_to="self"), and teach prearranged approval gates with an explicit pause chunk plus when(...)pause_for(type="policy_approval", ...)
interrupts that resume through continue_with(...)pause_for(...) behind hidden execution sugar such as flow.start() or flow-level runtime stream helpers; create an explicit execution handle and consume get_pending_interrupts() / continue_with(...)close() / async_close() rejects pending interrupts by default, and pending_interrupts="cancel" must be chosen deliberately when abandoning waitsemit_nowait(...) / async_emit_nowait(...) when a chunk must fan out without blocking the current handler, and rely on execution close to drain registered tasksget_state(...) / set_state(...) instead of legacy runtime-data helpers in new examplesTriggerFlow(...) as the definition/planning surface; prefer module-level named chunks and conditions, inject stable dependencies through flow-level runtime_resources, and inject request-specific dependencies through execution-level runtime_resourcesagently-dynamic-task; Dynamic Task is a first-class Agently API that uses TriggerFlow as an execution substrate, not a TriggerFlow sub-APIwhen(...) + emit_nowait(...) as the native signal-driven pattern for fan-out, loops, side branches, and dependency joins; definition idempotence must not be confused with runtime signal deduplicationagently-request when one workflow step needs model setup, prompt contracts, structured output, response reuse, session behavior, or retrievalWhen generating or editing Python code, use the actual Agently API shape:
from agently import TriggerFlow, TriggerFlowRuntimeData
when, emit_nowait, and pause_for are not top-level imports from
agently. They are methods on flow or runtime data objects:
flow.when(...).to(handler, name="...")data.emit_nowait(...)await data.async_pause_for(...)execution = flow.create_execution(auto_close=False),
await execution.async_start(input_value), and
snapshot = await execution.async_close()Do not write from agently import when, emit_nowait, pause_for, and do not use
@flow.when(...) as a decorator.
Do not treat Dynamic Task as TriggerFlow syntax. If a model or application
submits a DAG as data, route to agently-dynamic-task and use
Agently.create_dynamic_task(...), TaskDAGValidator, and TaskDAGExecutor
there. TriggerFlow remains the substrate for stable workflow definitions that
the developer owns in code.
asyncio.create_task(data.async_emit(...)) as the default nowait pattern when execution-managed emit_nowait(...) is available.end(), get_result(), or set_result() as the default lifecycle path for new TriggerFlow codeexecution.result can expose the needed state/final-result/intervention/meta viewpause_for(...) / continue_with(...) when the workflow must stop for external inputintervene(...) as emit(...), graph mutation, input rewriting, chunk cancellation, or replay of completed chunksget_runtime_data(...) / set_runtime_data(...) in new guidance when get_state(...) / set_state(...) communicates the same intentruntime.show_deprecation_warnings=False as a migration substitute; it is only a production noise-control settingawait data.async_pause_for(...) surviving a process restart; put post-resume logic in the downstream chunk, data.is_resume branch, or explicit resume event handlerruntime_resources would keep the handler reusable, testable, and export-friendlyreferences/overview.mdreferences/runtime-intervention.mdreferences/stream-bridge.mdreferences/devtools-graph.mddevelopment
Use when the user needs Agently Dynamic Task, model-generated or app-submitted DAG planning, TaskDAG validation, DynamicTaskResolver handlers, or TaskDAGExecutor execution through Agently.create_dynamic_task. Dynamic Task is a first-class Agently API that uses TriggerFlow as an execution substrate.
tools
Use when the user wants Agently runtime extension capabilities: Action Runtime, built-in action packages, legacy tool compatibility, MCP access, Execution Environment lifecycle, FastAPIHelper or streaming API exposure, auto-function helpers, KeyWaiter, or optional agently-devtools observation, evaluation, and playground integration.
development
Use when the user is shaping Agently request-side behavior: model setup, settings files, prompt management, structured output, response reuse, streaming consumption, session memory, embeddings, knowledge-base indexing, retrieval, or retrieval-backed answers within one request family.
tools
Use when the user wants to build, initialize, validate, optimize, or refactor a model-powered assistant, internal tool, automation, evaluator, or workflow from a business scenario or common problem statement, including project-structure refactors or starter skeletons that may separate model setup, prompt config, and orchestration, even if the request also mentions a UI, app shell, or local model service such as Ollama, and it is still unclear whether the solution should stay a single request, add supporting capabilities, or become orchestration. The user does not need to mention Agently explicitly.