Build workflows with AWS Step Functions state machines using the JSONata query language. Covers Amazon States Language (ASL) structure, state types, variables, data transformation, error handling, AWS service integration, and migrating from the JSONPath to the JSONata query language.
SkillScore95Maintained
Automatic
◆DevOps & SRE pack
Last verified 8/16/2026
What it changes
Passed 21 of 22 test cases with the skill, and 18 of 22 without it.
Without skill82%
With skill95%
Checks it passed that the model alone missed
Includes top-level QueryLanguage set to JSONata in state machine syntax.
Identifies States.QueryEvaluationError as the thrown runtime error code.
Identifies synchronous Express workflows as having at-most-once execution semantics.
and 1 more in the full report
3 fixed18 passed either way1 still failing0 broke
Pass-rate lift
+14 pp
Tokens
+68%
Agent turns
0%
Response time
-43%
Model gemini-3.6-flashMeasured 8/16/2026v121 of 22 cases passed with skill
Tokens, turns and time describe resource use, not a dollar price.
See it in action
One of 3 test cases the skill fixed. Same model, same prompt, with and without the skill.
1 of 3
Prompt
In a JSONata-enabled state machine state, we evaluate an expression accessing optional field middleName on incoming payload objects. What specific runtime error code does the service throw when a JSONata expression attempts to evaluate an undefined field?
What was checked, without and with the skill
Checked
Without skill
With skill
Identifies States.QueryEvaluationError as the thrown runtime error code.
Missed
Passed
case-08 · gemini-3.6-flash · 8/16/2026 · answers are capped and redacted
What's inside
The instructions your model reads when the skill loads.
SKILL.md96 lines9 files
AWS Step Functions
Overview
AWS Step Functions uses Amazon States Language (ASL) to define state machines as JSON. With AWS Step Functions, you can create workflows, also called State machines, to build distributed applications, automate processes, orchestrate microservices, and create data and machine learning pipelines.
This skill provides comprehensive guidance for writing state machines in ASL, covering:
ASL structure and JSONata expression syntax
Details on the eight available workflow states
The $states reserved variable
Workflow variables with Assign
Error handling
AWS Service integration patterns
Example code for data transformation and architecture
Validation and testing of state machines
How to migrate from JSONPath to JSONata
When to Load Reference Files
Load the appropriate reference file based on what the user is working on:
ASL structure, state types, Task, Pass, Choice, Wait, Succeed, Fail, Parallel, Map → see references/asl-state-types.md
Service integrations, Lambda invoke, DynamoDB, SNS, SQS, SDK integrations, Resource ARN, sync, async → see references/service-integrations.md
Migrating from JSONPath to JSONata, migration, JSONPath to JSONata, InputPath, Parameters, ResultSelector, ResultPath, OutputPath, intrinsic functions, Iterator, payload template → see references/migrating-from-jsonpath-to-jsonata.md
Validation, linting, testing, TestState, test state, mock, mocking, unit test, inspection level, DEBUG, TRACE, validate state, test in isolation → see references/validation-and-testing.md
Architecture patterns, examples, polling, saga, compensation, scatter-gather, semaphore, lock, human-in-the-loop, escalation, Express to Standard → see references/architecture-patterns.md
Data transformation, JSONata expressions, filtering, aggregation, string operations, $reduce, $lookup, $toMillis, $partition, $parse, $hash, $uuid → see references/transforming-data.md
State input/output, $states, Assign, Output, Arguments, variable scope, variable limits, evaluation order, passing data between states → see references/processing-state-inputs-and-outputs.md
Deployment, SAM, CloudFormation, IaC, DefinitionSubstitutions, X-Ray tracing, logging → see the aws-serverless-deployment skill or deploy-on-aws plugin