/rasa-agent-skills:rasa-building-flowsfrom rasa-agent-skills
Builds conversation flows for Rasa CALM assistants using YAML. Covers scoping, branching, collect/action steps, call/link connections, and domain validation.
Ships in rasa-agent-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
data/, named after the primary flow
(see "File organization").snake_case ID (see "Naming conventions").description (see "Writing descriptions").collect for user input, action for responses or invoking custom
actions.collect steps (see "Writing descriptions").next/if/then/else where the process has decision points
(see "Branching and conditions").call (see "Connecting flows").link if a separate process should start after.A flow represents one business process from the user's perspective. Use these questions to decide whether something warrants its own flow:
if: FalseRight-sized flow - a single user goal with a clear start and end:
flows:
track_order:
description: Lets users check the delivery status of an existing order.
steps:
- collect: order_id
- action: action_fetch_order_status
- action: utter_order_status
# ... can also include branching, call, link steps as needed
Too big - multiple unrelated goals in one flow. Split them:
# BAD
flows:
shopping:
description: Handles all shopping operations.
steps:
- collect: operation_type
# ... 20 or more steps mixing order tracking, returns, payments,
# branching, sub-flow calls — too many unrelated concerns in one place
Too small - a single step that is not a business process. Inline it:
# BAD
flows:
say_goodbye:
description: Says goodbye.
steps:
- action: utter_goodbye
Before creating new files, check the existing project layout. If the project already uses a different convention, follow that convention instead.
By default, all flow files live under data/. Subdirectories are supported — Rasa
recursively scans data/ for YAML files. Each file groups a business process with its
sub-flows:
data/
├── book_appointment.yml # flow + child flows in one file
├── track_order.yml
├── transfer_money.yml
└── onboarding/ # subdirectory for a larger domain area
├── register_patient.yml
└── verify_insurance.yml
Name the file after the primary flow it contains. If book_trip has child flows
like select_destination and choose_flights, all three go in data/book_trip.yml.
Use subdirectories to group related flows by domain area when the project grows large
(e.g. data/payments/, data/scheduling/). The directory structure has no functional
impact — it's purely organizational.
This section proposes default conventions. If the user's project already follows different conventions, match those instead.
snake_case: transfer_money, book_appointment, track_ordercheck_balance, schedule_visit — not flow_1 or appointmentbook_appointment_collect_patient_infoThe optional name field is a human-readable label. It has no functional impact.
flows:
book_appointment:
name: "Book Appointment"
description: Helps patients schedule a visit with their doctor.
The description is the primary signal the LLM within the Command Generator uses to
decide when to start a flow. A bad description means the flow won't trigger — or
triggers for the wrong request.
# GOOD — information-dense, user perspective, explicit context
book_appointment:
description: Helps patients schedule a visit with their doctor.
track_order:
description: Lets users check the delivery status of an existing order.
# BAD — implementation detail, vague, no context
book_appointment:
description: Runs action_book_slot and fills the date slot.
track_order:
description: A flow for orders.
The description on a collect step tells the LLM within the Command Generator
what value to extract from the user's message. Without it, the LLM within
the Command Generator only has the slot name to guess.
# GOOD
- collect: insurance_id
description: >
Insurance member ID printed on the patient's card.
Alphanumeric, 9-12 characters (e.g. XYZ-123456789).
- collect: return_reason
description: "Reason for the return: damaged, wrong_item, changed_mind, or other."
# BAD — no useful information / describes the question, not the value
- collect: amount
description: the amount
- collect: email
description: Ask the user for their email address.
By default, slots filled in collect or set_slots steps reset when the flow ends (to
null or to the slot's initial_value from the domain). To retain a slot's value after
the flow completes, list it in persisted_slots at the flow level. Slots set in custom
actions are persistent by default and should not be listed in persisted_slots.
flows:
return_item:
description: Helps users return a purchased item for a refund or exchange.
persisted_slots:
- order_id # kept after flow ends
- return_reason # kept after flow ends
steps:
- collect: order_id
- collect: return_reason
- action: action_process_return
A collect step automatically uses a response named utter_ask_{slot_name} to prompt
the user. Override this with the utter property on the collect step, or use a custom
action named action_ask_{slot_name} instead — but not both.
- collect: account_type
utter: utter_ask_secondary_account_type # overrides default utter_ask_account_type
Use rejections on a collect step to validate values inline. The assistant re-asks
automatically on rejection. For complex validation, create a custom action named
validate_{slot_name}.
- collect: age
rejections:
- if: slots.age < 1
utter: utter_invalid_age
- if: slots.age < 18
utter: utter_must_be_18
To reset a slot mid-flow, set it to null in a set_slots step. In a custom action,
return None. Empty slots are not eligible for user correction.
- set_slots:
- amount: null
See the full reference for all collect step properties (ask_before_filling,
force_slot_filling, utter, etc.).
Any step can branch by adding a next property with if/then/else conditions.
Conditions support operators like and, or, not, <, >, =, !=, is,
is not, contains, and matches (see full reference for details).
Two namespaces are available in conditions:
slots. — slot values: slots.age < 18, slots.plan = "premium"context. — dialogue frame properties: context.previous_flow_name,
context.collect, context.canceled_nameWhen context.collect or context.validate reference a slot name, wrap them in Jinja
with the slots. prefix: "slots.{{context.collect}} is not null"
When a condition leads to next: END, the flow completes without running further steps.
Use a noop step when you need a branch point without performing any action.
- collect: membership_tier
next:
- if: slots.membership_tier = "premium"
then: premium_step
- if: slots.membership_tier = "standard"
then: standard_step
- else:
- action: utter_unknown_tier
next: END
- id: premium_step
action: utter_premium_benefits
- id: standard_step
noop: true
next:
- if: not slots.verified_email
then:
- call: verify_email
next: continue_step
- else: continue_step
- id: continue_step
action: utter_standard_benefits
call vs linkTwo step types connect flows together. Choose based on whether the current flow should continue or end:
call | link | |
|---|---|---|
| When | Sub-task needed, then parent continues | Current process is done, different one starts |
| Control | Returns to parent after child completes | Current flow ends, target starts fresh |
| Position | Anywhere in the flow | Must be the last step |
| Slots | Child slots accessible in parent | No slot sharing — target flow is independent |
| Cancellation | Cancelling child cancels parent too | N/A — current flow already ended |
Example — an orchestrator flow that sequences call steps for sub-tasks and ends
with link to hand off to a separate process. Child flows should not overlap in the
slots they collect, so the LLM within the Command Generator can unambiguously
route user input.
flows:
book_trip:
description: Guides the user through booking a complete trip with flight and hotel.
steps:
- call: book_flight # sub-task: returns here when done
- call: book_hotel # sub-task: returns here when done
- action: utter_trip_summary
- link: process_payment # done — hand off to a separate process
book_flight:
description: Helps the user search and select a flight.
if: False
steps:
# ... collect destination, dates, search, select flight
book_hotel:
description: Helps the user search and select a hotel at the destination.
if: False
steps:
# ... search hotels, select hotel
process_payment:
description: Handles payment for a completed booking using a saved or new card.
steps:
# ... independent business process, starts fresh after link
Guards control whether a flow can be started by the LLM within the Command Generator:
# Only start if patient is verified
view_medical_records:
if: slots.authenticated AND slots.identity_verified
# Never start directly — only via call or link
collect_patient_info:
if: False
Every element a flow references must be defined in the domain (domain.yml or split
domain files). After writing or editing a flow, walk through each step and verify the
items below are present. Missing entries cause validation errors or silent runtime
failures.
slots:
(see rasa-managing-slots)collect: slot_name → utter_ask_{slot_name} in responses:
(see rasa-writing-responses)action: utter_* step → matching entry in responses:actions:
(see rasa-writing-custom-actions)responses:When validation fails, preserve the user's intent — what the flow is supposed to accomplish. The flow steps themselves can change, but the intended behavior must not be lost.
Never strip down a flow's intended behavior to make validation pass. If needed, fix the domain: slots, responses, and actions to support what the user asked for.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
Other plugins' skills for the same job
npx claudepluginhub rasahq/rasa-agent-skills --plugin rasa-agent-skills18 skills in this plugin
/rasa-building-skillsBuilds skills (capabilities) for a Rasa CALM assistant. Use when the user asks to create, add, or build a skill, capability, or feature for their Rasa assistant.
/rasa-calling-mcp-tools-from-flowsCalls MCP tools directly from Rasa flow steps. Use when invoking an MCP tool via a call step, mapping slot values to tool parameters, or extracting tool results into slots. This replaces custom action code for simple API integrations.
/rasa-configuring-assistantConfigures config.yml and endpoints.yml for Rasa CALM assistants. Covers pipeline (command generators, flow retrieval), policies (FlowPolicy), action endpoint, and language settings. Use when setting up a new project or modifying pipeline components.
/rasa-configuring-mcp-serverConfigures MCP (Model Context Protocol) servers in a Rasa CALM assistant. Use when defining MCP servers in endpoints.yml, setting up authentication (API key, OAuth 2.0, pre-issued token), or connecting to multiple external services.
/rasa-configuring-model-groupsConfigures model_groups in endpoints.yml for LLM and embedding providers. Covers single and multi-deployment setups, routing strategies, failover, self-hosted models, and caching. Use when adding or changing LLM providers or setting up multi-LLM routing.
/rasa-integrating-asrIntegrates a custom automatic speech recognition (ASR/STT) provider with Rasa voice channels from provider documentation. Use when implementing an ASREngine, mapping streaming transcripts and turn detection to Rasa events, or configuring custom ASR credentials.