Goal
Build a baggage-reporting skill. It plays a recording notice, collects details in order, asks for confirmation and announces a successful submission.
Teach
Reach for ordered blocks when order itself is the requirement. Most skills never need them. When they do, prose can invoke a block with @block.<id>.
Once they want to file a report, invoke @block.collect_baggage
:::ordered_block id=collect_baggage
steps:
- id: fetch_bookings
execute_tool: list_bookings
- id: select_booking
instructions: |
Ask which trip the bag belongs to. Set booking_ref.
complete_when: session.report_baggage.booking_ref
# ... more steps ...
:::
The block id goes on the fence line as id=collect_baggage. Putting it inside the body as id: is the most common mistake here, and the error you get back is “must declare an id attribute”. A step’s complete_when is the same condition expression used everywhere else, so a bare session.report_baggage.booking_ref means “this step is done once that field has a value”.
Step types:
| Type | Properties | Behaviour |
|---|---|---|
| Execute tool | execute_tool: | Framework calls the tool directly |
| Conversational | instructions: + complete_when: | LLM talks within the step |
| Collect | collect: + utter: | Framework collects a value |
tool_constraints, including requires and requires_confirmation, still apply when a block or the LLM attempts a tool call.
Paste
Copy the complete skill folder, including its instructions, memory and responses:
Source: tutorial/snippets/step-05-baggage/
Copy: skills/report_baggage/
Files: skill.md, memory.yml, responses.yml
Train and try
make train
make inspect
Try (voice if possible): “My bag did not arrive.”
Verify:
- Recording notice plays on activate
- Bookings are listed before details are collected
- Summary confirmation happens before submit
- A report id such as
BAG1001is returned
Talking point
This skill combines the controls introduced in earlier chapters. Instructions can guide the conversation around an ordered block that fixes a particular sequence. When the whole conversation needs a fixed order, the entire skill can be one ordered block.