spaces-data
БесплатноБез исполняемых скриптовНе проверенDesign Gymnasium action and observation spaces, validate samples, flatten/unflatten data, serialize JSONable batches, and debug dtype/shape mismatches.
от lza6★ 19 звёзд на GitHubОб этом скилле
Gymnasium Spaces and Data Contracts
Use this sub-skill when a task involves choosing Gymnasium action or observation spaces, validating samples with contains, seeding or sampling spaces, flattening nested data for model inputs, unflattening model vectors back to structured observations/actions, or serializing space samples.
Start Here
- For constructor choices and data contracts, use
references/space-design.mdbefore modifying an environment'saction_spaceorobservation_space. - For
flatdim,flatten_space,flatten,unflatten,to_jsonable, andfrom_jsonable, usereferences/flattening-and-json.md. - For
Box.containssurprises, integer starts, nested flatten shape mismatches, dynamic spaces, and wrapper space updates, usereferences/troubleshooting.md. - To smoke-test the local Gymnasium install and demonstrate the core contract, run
python sub-skills/spaces-data/scripts/space_contract_smoke.py --helpand thenpython sub-skills/spaces-data/scripts/space_contract_smoke.pyfrom the root Gymnasium skill directory.
Scope Boundaries
- Use
../environment-api/SKILL.mdfor customEnvlifecycle,reset/step, registration,check_env, and seeding an environment throughreset(seed=...). - Use
../wrappers-recording/SKILL.mdwhen a wrapper changesobservation_space,action_space, observations, actions, rewards, rendering, or recording behavior. - Use
../vectorization/SKILL.mdfor batched/vector spaces,gym.vectorutilities,single_observation_space,single_action_space, and vector wrapper space transforms.
Minimum Correct Patterns
import numpy as np
from gymnasium import spaces
observation_space = spaces.Dict({
"position": spaces.Box(low=-1.0, high=1.0, shape=(2,), dtype=np.float32),
"inventory": spaces.Tuple((spaces.Discrete(5), spaces.MultiBinary(3))),
})
observation = observation_space.sample()
assert observation_space.contains(observation)
from gymnasium.spaces import utils as space_utils
flat = space_utils.flatten(observation_space, observation)
restored = space_utils.unflatten(observation_space, flat)
assert observation_space.contains(restored)
Keep runtime guidance self-contained. Do not depend on Gymnasium source, tests, examples, or documentation paths at runtime.
Установить spaces-data в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл spaces-data?
Design Gymnasium action and observation spaces, validate samples, flatten/unflatten data, serialize JSONable batches, and debug dtype/shape mismatches.
Как установить скилл spaces-data?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл spaces-data запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
skill-creator
Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an…
от Anthropicdiscernment-nudge
After you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals…
от Anthropicdata-consolidate
Joins the plant's scheduled exports and connector data into one working dataset — ERP items (NetSuite or Infor M3), sales orders, production work orders…
от Anthropicinspection-to-capa
Runs the quality chain end to end: writes the nonconformance against the requirement it violates, searches history at the moment of writing to say whether…
от Anthropic