create-scenic-scenario
What it does
This skill turns a plain-language description of a traffic situation into a Scenic file for the CARLA simulator. It is for people writing repeatable traffic tests without placing every car and person by hand.
When to use it
- βWhen you want to describe a traffic situation in words and get a test file for it.
- βWhen you need a scenario where a car cuts in from the side or a person crosses the road.
- βWhen you want the file checked to make sure it works before you run it on the simulator.
Skill link
https://github.com/carla-simulator/carla/blob/ue58-dev/Skills/scenic/create-scenic-scenario/SKILL.mdCopy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.
How to use
The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.
Ready-to-paste message
For Claude Code, Codex or Cursor: run it in your project folder and the skill gets installed.
Download the SKILL.md and drop it into your agentβs skills folder.
Example of what to ask your AI
βCan you write a Scenic scenario where a car cuts in from the right lane in front of my car, and check that it works?β
5 new skills a week. 1 minute to read.
How it works
The agent turns your description into a short plan, then creates the file using patterns known to work with this build. It then compiles the file and samples scenes to confirm it runs, without starting the simulator.
Technical content (original SKILL.md)
Original text by the author, straight from GitHub.
Create a Scenic scenario from a description
Paths.
scripts/β¦andreferences/β¦below are relative to the directory holding this SKILL.md. Your working directory is the user's project, not that directory, so prefix them with its absolute path or the command is not found.
Scenic describes a distribution over scenes, not one scene. So a good scenario is not a script of positions β it is a set of constraints loose enough to sample and tight enough to be the situation asked for.
Translating a request has three parts, and only the first is a judgement call:
- request β spec (yours): pick the map, the placement, the actors and their relations.
- spec β file (scripts/scaffold_scenic.py): emits boilerplate and placement idioms lifted from scenarios that run on this build.
- validate (same script): compile, then sample. No server needed.
Do not hand-write the boilerplate. Three things bite every time and the generator already handles them:
assert len(x) > 0is illegal on a random value. Anything derived from aUniform(...)raisesRandomControlFlowError. Only assert on lists built deterministically fromnetwork.- Pedestrians and props need
with regionContainedIn Nonewhen placed on the road. Containment is re-checked every sample, so without it generation never converges β it looks like an unsatisfiablerequire. param mapandparam carla_mapmust name the same town.mapbuilds the road network;carla_maptells CARLA what to load. Disagree and the scene is sampled on one map and simulated on another.
Instructions
Progress:
- [ ] Step 1: Check prerequisites (bash scripts/check_env.sh)
- [ ] Step 2: Pick a map that can express the situation
- [ ] Step 3: Pick blueprints that exist in THIS build
- [ ] Step 4: Write the spec, generate, and let it validate
- [ ] Step 5: Loop on the verdict until it samples; then simulate
Step 2: The map has to support the situation
A scenario selects road features. If the map has none of them, no wording will
save it β the generated filter matches nothing and compilation fails with
tried to make discrete distribution over empty domain.
python3 ../run-scenic-scenario/scripts/list_scenic.py --check-maps
Read the 4way=N(uns M) / 3way=N(uns M) columns. Junction-negotiation
scenarios need uns > 0; dense downtown maps are usually fully signalized.
Step 3: Blueprints that exist here
python3 scripts/blueprint_table.py # inventory + gaps
python3 scripts/blueprint_table.py --category bicycle # ids Scenic offers
python3 scripts/blueprint_table.py --list vehicles # what the build has
python3 scripts/blueprint_table.py --check vehicle.lincoln.mkz vehicle.lincoln.mkz_2017
Two lists, and they disagree. blueprint_table.py reads the build's own
Content/Carla/Config/*Parameters.json β the definitive inventory β and diffs it
against Scenic's table for the installed client version.
- A category Scenic reports empty makes
new Bicyclefail at sample time even when the build has bicycles. Name the id instead:with blueprint "vehicle.bh.crossbike". - An id in the build but absent from Scenic's table is still spawnable β reference it explicitly.
- An id in neither fails at spawn time, long after sampling passed. This is
how the upstream scenarios still carrying
vehicle.lincoln.mkz_2017behave.
Step 4: Spec, generate, validate
python3 scripts/scaffold_scenic.py --example > spec.json # start from this shape
# edit spec.json
python3 scripts/scaffold_scenic.py --spec spec.json --out my.scenic
Generating with --out validates automatically. To re-validate after a hand edit:
python3 scripts/scaffold_scenic.py --validate my.scenic
Spec keys:
| Key | Meaning |
|---|---|
map |
town name; needs a matching .xodr in the assets (required) |
model |
srunner (default) or scenic β see [[run-scenic-scenario]] |
placement |
lane for road situations, intersection for junction ones |
arms, signalized |
intersection filter; signalized: false for negotiation |
ego |
{blueprint, speed, maneuver}; maneuver is straight/left/right |
actors[] |
{name, type, blueprint, relation, distance, speed, maneuver, offset, threshold} |
requires[] |
extra require lines, verbatim |
terminate |
termination condition; defa |
FAQ
Does the check need the simulator?
No. The file is compiled and sampled first, which needs no server.
Why does Scenic describe a range of scenes instead of one?
Scenic describes a set of likely situations, so each run gives a slightly different scene that still matches your description.
Can I put a pedestrian on the road?
Yes. Pedestrians and props can be placed on the road, and the skill handles their setup.
Details
Original description by the author
Writes a new Scenic scenario (.scenic) from a natural-language description β "a car cuts in from the right lane", "a pedestrian crosses in front of the ego", "negotiate an unsignalized four-way" β by turning the request into a spec, generating the file from idioms proven on this build, and validating it by compiling and sampling before any simulator is involved. Use when the user asks to "write a Scenic scenario", "create a .scenic file", "turn this description into Scenic", "generate a scenario from text", or wants a Scenic scenario authored or repaired.
repo: carla-simulator/carla
Popularity
- GitHub stars
- 15k
- Ranking position
- #11113
- License
- MIT
- Updated
- 11/2/2026
Comments
- β¦
More skills from this repository
create-leaderboard-route
15kHelps your agent build CARLA Leaderboard route files by placing waypoints and scenario triggers from the simulator camera, then checking and ordering them.
package-leaderboard-agent
15kHelps your agent package a driving agent into a Docker image for CARLA Leaderboard submission, checking the folder layout and testing that the image loads it.
read-leaderboard-results
15kHelps your agent read a CARLA Leaderboard results file, explain each route's score and infractions, and rescore a run under the other rule version.
run-leaderboard-evaluation
15kHelps your agent run the CARLA Leaderboard evaluator on a set of routes with your driving agent, checking the setup first and saving checkpoints you can resume.
Similar skills
test-driven-development
311kTeaches your agent to write a failing test first, watch it fail, then write the smallest code that passes, before building any feature or fix.
verification-before-completion
311kTeaches your agent to run real checks and read their output before claiming that a task, fix, or build is complete or passing.
migrate-to-shoehorn
310kReplaces risky type casts in your test files with the shoehorn library, so tests can use partial data and still pass type checks.