Skills DirectorySkills Directory
SkillsLearnSecurityCategoriesDocsBlogPro
Sign InSubmit Skill
Skills Directory

Security-tested agent skills for Claude, coding agents, and AI workflows.

Directory

  • Browse Skills
  • All Skills A–Z
  • Claude Skills
  • Claude Code Skills
  • Agent Skills
  • Categories
  • Authors
  • Submit a Skill

Learn

  • Learn Hub
  • Install Claude Skills
  • Write SKILL.md
  • Skills vs MCP
  • Directories Compared

Security

  • Security
  • Methodology
  • Secure Claude Skills
  • Security Badges
  • Chrome Extension
  • Skill Manager

Company

  • About
  • Community
  • Blog
  • API Docs
  • Advertise

2026 Skills Directory. All rights reserved.

ProTermsPrivacyRefunds
Back to skills

Toggle Env Objects

ASecurity

Lists and toggles a map's static environment objects via get_environment_objects / enable_environment_objects — hide or show buildings, vegetation, poles, fences, traffic signs and other baked assets by CityObjectLabel (and optional name filter). Use when the user asks to "hide/remove the buildings", "turn off the trees/vegetation", "show only the roads", "disable the fences", or "list the environment objects". Affects rendering and collision; resets on map reload.

14,461 stars
0 votes
0 copies
0 views
Added 10/6/2026
ai-agentspythongobashapi

Works with

cliapi

Security Analysis

A100/100

Pro scans all 5 files and shows the line behind each finding

Scanned 10/6/2026

$npx -y skills add carla-simulator/carla --skill toggle-env-objects --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Toggle Env Objects?

Add the live security badge to your README — it updates automatically with every re-scan.

Security grade badge for Toggle Env Objects
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/carla-simulator-toggle-env-objects-carla/badge)](https://www.skillsdirectory.com/skills/carla-simulator-toggle-env-objects-carla)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
Files
SKILL.md
---
name: toggle-env-objects
description: Lists and toggles a map's static environment objects via get_environment_objects / enable_environment_objects — hide or show buildings, vegetation, poles, fences, traffic signs and other baked assets by CityObjectLabel (and optional name filter). Use when the user asks to "hide/remove the buildings", "turn off the trees/vegetation", "show only the roads", "disable the fences", or "list the environment objects". Affects rendering and collision; resets on map reload.
license: MIT
compatibility: Any OS with the CARLA PythonAPI installed for the active interpreter and a reachable, already-running CARLA server. Visual effect needs a rendered view; listing/toggling work headless. Tested against CARLA 0.9.16.
metadata:
  group: python-api
  prerequisites: scripts/check_env.sh
  reference: references/env-objects.md
---

# Toggle CARLA environment objects

> **Paths.** `scripts/…` and `references/…` 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.

Show or hide the map's **static, baked** assets — buildings, vegetation, poles,
fences, walls, signs — grouped by `CityObjectLabel`. These are not spawned
actors: they come with the map. Toggling changes both **rendering and
collision**, applies to the whole matching set at once, and **resets on a map
reload**.

## Resolving words to a label

The agent maps the request to a `CityObjectLabel` (run `labels` for the list),
then acts:

- "hide the buildings" → `disable --label Buildings`
- "remove the trees" → `disable --label Vegetation`
- "turn off street poles" → `disable --label Poles`
- "show only the roads" → disable the other big labels (Buildings, Vegetation,
  Fences, Walls…), or re-`enable` selectively.

Narrow within a label by asset name with `--name` (substring).

## Instructions

```
Progress:
- [ ] Step 1: Check prerequisites (bash scripts/check_env.sh), clear FAILs
- [ ] Step 2: List to see labels/counts (labels, list --label X)
- [ ] Step 3: disable / enable the matching set (use --dry-run first if unsure)
- [ ] Step 4: Confirm on a rendered view (effect is visual + collision)
```

Commands need `CARLA_HOST`/`CARLA_PORT` from `scripts/env.sh`.

### Step 1: Check prerequisites

```bash
bash scripts/check_env.sh
```

### Step 2-3: List and toggle

```bash
source scripts/env.sh

python3 scripts/toggle_env.py labels                      # valid CityObjectLabel names
python3 scripts/toggle_env.py list                        # whole-map summary by type
python3 scripts/toggle_env.py list --label Buildings      # count + sample of buildings

python3 scripts/toggle_env.py disable --label Buildings   # hide all buildings
python3 scripts/toggle_env.py disable --label Vegetation --dry-run   # preview first
python3 scripts/toggle_env.py disable --label Poles --name lamp      # subset by name
python3 scripts/toggle_env.py enable  --label Buildings   # bring them back
```

### Step 4: Confirm

The effect is visual + collision on a rendered server. `enable_environment_objects`
returns nothing to read back, so the command reports the **count toggled**;
confirm the change in a windowed/packaged view.

## On CARLA 0.10.0 (the UE5 line: 5.5 and 5.8)

`get_environment_objects()` and `enable_environment_objects()` — what this skill
uses — work normally. Measured on Town10HD_Opt: 59 102 objects, 48 369 of them
`Buildings`, then `Vegetation` 4 270, `Fences` 1 767, `Static` 1 223,
`Dynamic` 489, `Sidewalks` 269, `TrafficSigns` 147, `Poles` 120,
`TrafficLight` 62, `Bicycle` 56, plus 1 768 labelled `NONE`.

`CityObjectLabel` gained **`Rock` (= 29)**, which does not exist on 0.9.x
(`LibCarla/source/carla/rpc/ObjectLabel.h:48`). Code that iterates the enum by
name is fine; code that hard-codes label integers is not.

**Do not reach for map layers as an alternative here.** `load_map_layer` /
`unload_map_layer` are accepted and silently do nothing on 0.10.0 — see
[[load-map]] for the measurement and the cause. `enable_environment_objects` is
the mechanism that actually hides geometry on this version.

## Examples

**Example 1: clear the buildings**

User says: "hide all the buildings"

`disable --label Buildings` → reports N buildings hidden; the town goes bare.
`enable --label Buildings` restores them.

**Example 2: strip vegetation for a clean capture**

User says: "remove the trees and bushes"

`disable --label Vegetation`. Combine with a weather/settings setup for dataset
capture.

**Example 3: preview before a big toggle**

User says: "what would hiding the fences affect?"

`disable --label Fences --dry-run` lists the count and sample without changing
anything.

## Troubleshooting

**Problem: nothing changes visually**
Cause: headless `-nullrhi` server (no rendering), or wrong label.
Solution: use a rendered server; `list --label X` to confirm the set is non-empty.

**Problem: objects came back after loading a map**
Cause: toggles are per-world; a map load/reload rebuilds all objects.
Solution: re-apply the toggles after `load-map`.

**Problem: `list --label X` is empty but I see those assets**
Cause: the assets may be tagged under a different label (e.g. Static/Other).
Solution: `list` (no label) for the by-type summary, then target the right label.

## Outputs

Server-side visibility/collision state of static map assets. No file. The
reported count is the record of what was toggled.

Detail (the label taxonomy, name filtering, rendering/collision semantics) in
[references/env-objects.md](references/env-objects.md).

Attribution

carla-simulatorcarla-simulator
View sourceSee grades on GitHubMore from carla-simulator →
SSkills DirectorySkills Directory

Ship a skill? Prove it's safe.

Free 120-pattern security scan, letter grade, and an embeddable README badge.

Submit a skill

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments (0)

No comments yet. Be the first to comment!

SSkills DirectorySkills Directory

Ship a skill? Prove it's safe.

Free 120-pattern security scan, letter grade, and an embeddable README badge.

Submit a skill

Related Skills

Caveman

Terse caveman voice: answer first, fluff gone, every technical fact kept. Use for /caveman, "caveman mode", "talk like caveman", "be brief", "less tokens". Stays on until "stop caveman" or "normal mode".

1100021 votes

Hyperplan

Adversarial multi-agent planning skill. Self-orchestrates 5 hostile category members (unspecified-low, unspecified-high, deep, ultrabrain, artistry) via team-mode for ruthless cross-critique debate, distills only the defensible insights, then MANDATORILY hands the distilled insight bundle to the `plan` agent for executable plan formalization. Use when planning needs maximum rigor and surfacing of weak assumptions, blind spots, and over-engineering. Triggers: 'hyperplan', 'hpp', '/hyperplan', ...

698461 votes

Writing Skills

Create and manage Claude Code skills in HASH repository following Anthropic best practices. Use when creating new skills, modifying skill-rules.json, understanding trigger patterns, working with hooks, debugging skill activation, or implementing progressive disclosure. Covers skill structure, YAML frontmatter, trigger types (keywords, intent patterns), UserPromptSubmit hook, and the 500-line rule. Includes validation and debugging with SKILL_DEBUG. Examples include rust-error-stack, cargo-dep...

3931 votes

Mcp Code Execution

Routes multi-tool workflows through MCP servers for large datasets and pipelines. Use when Bash tool overhead is limiting throughput on data-heavy tasks.

3421 votes

catchup

Recovers the conversation and failed tool calls of a previous Codex, Amp, Claude Code, Antigravity, Cline, Copilot CLI, Cursor, DeepSeek Harness, Grok Build, Kimi, OpenCode, Pi Agent, or ZCode session. Use when the user says "catch up", "what did the last session do", "get me up to speed", "I switched agents", asks to recover/summarize a previous session before continuing, or asks to diagnose or report a catchup failure. Do NOT use for the current conversation, git history, or any non-agent log.

741 votes
View all in ai-agents →