К основному содержанию
скилл CX Codex

new-demo — скилл для Claude Code: создание демо

Скилл new-demo для Claude Code превращает идею в демо для CardboardXR. Он включается, когда нужно спроектировать, создать или подготовить каркас нового приложения, игры или другого опыта.

Apache-2.0 ★ 348 обновлён 2026-11-06

Установить в Claude Code · Через Skills CLI (Vercel) Все способы и платформы ↓
npx skills add brenpoly/CardboardXR --skill new-demo -a claude-code
Открыть на GitHub

Что делает new-demo

Скилл помогает создать демо для CardboardXR по описанию идеи. Сначала он предлагает изучить ADDING_A_DEMO.md и похожие демо, уточнить детали и согласовать короткую спецификацию. Затем создаёт каркас через Tools/new-demo/scaffold.py и помогает написать код, тесты и сцену.

Демо должно обращаться к Core через CoreServices, а интерфейс строиться средствами WorldUi и M3. Новые файлы размещаются в папке демо; сетевые ресурсы и материалы вне репозитория запрещены. Для проверки нужны Python 3 и Unity; пакетный режим Unity требует закрытого редактора.

Какие задачи решает

  • превратить описание идеи в структуру демо CardboardXR
  • выбрать требования к AR, отслеживанию рук и движению
  • создать каркас демо с настройкой сцены
  • добавить тесты для логики и математики

Примеры запросов агенту

  • Создай демо CardboardXR по идее: виртуальный сад, в котором можно размещать растения.
  • Подготовь каркас игры для CardboardXR, где игрок рисует жестами рук.
  • Спроектируй AR-демо с объектами на столе и стенах.

Как установить new-demo

1Через Skills CLI (Vercel)

npx skills add brenpoly/CardboardXR --skill new-demo -a claude-code

2Вручную: положить файлы

~/.claude/skills/new-demo/SKILL.md

Папка скилла целиком; для одного проекта — .claude/skills/new-demo/

По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов

Вопросы о new-demo

Как установить new-demo в Claude Code?

Выполни npx skills add brenpoly/CardboardXR --skill new-demo -a claude-code.

Что делает new-demo?

Скилл помогает спроектировать и собрать новое демо CardboardXR: от согласования требований до каркаса, кода и тестов.

Что нужно для работы new-demo?

Нужен клон репозитория CardboardXR. Для проверки демо используются Python 3 и Unity; пакетный режим Unity запускается при закрытом редакторе.

Исходный текст

SKILL.md · Apache-2.0
---
name: new-demo
description: Turn a description of a new CardboardXR demo (an experience in the app's library) into a working demo built on Core's shared head tracking, AR, hand tracking, gaze-and-pinch input and Material UI. Use when someone wants to add, make, prototype or scaffold a new demo, app, game or experience for CardboardXR, or describes an idea for one.
---

# New CardboardXR demo

A demo is one folder, `Assets/_Project/Demos/<Name>/`, that reaches Core through `CoreServices` and
joins the app through its `DemoSetup`. Your job is to turn the person's idea into that folder, keep
the idea within the project's design rules, and leave it compiling with its tests passing.

Work from the root of a CardboardXR clone. Every path below is relative to it, wherever this file
is installed. The script and templates are always used from the clone's `Tools/new-demo`, so they
match the code.

## 1. Read before planning

- Read all of `ADDING_A_DEMO.md`. It's the contract: the folder, what Core provides, the pinch
  order, the requirements and the design rules.
- Read the existing demo closest to the idea, setup and scripts both:
  - **Portal** places a prefab on the floor and has a panel. It's the smallest one.
  - **Paint** takes pinches (`IPinchHandler`) and follows the hand.
  - **Rush** is a game with rounds, a score, and a pause while the settings panel is open.
  - **Video** is 3DoF content with no hands.
  - **Sandbox** is only Core's own placing and grabbing.

## 2. Pin the idea down

Work out these answers from the description. Ask only about what you can't infer, in one round of at
most four questions:

- **What the person does**, moment to moment, and what in it is new compared with the five demos
  above.
- **Where it happens:**
  - in their real room (passthrough);
  - in a virtual world;
  - or a doorway from one into the other.
- **The hand:** does it need the hand's position (hitting, drawing, reaching), or only clicks?
  Gaze and pinch clicks work without hand tracking.
- **Real surfaces:** does it put things on the floor (`Placer`), or on tables and walls as well
  (`ScanSurfaces`)?
- **Moving:** does the person walk around (6DoF), or sit and look around (3DoF is enough)?

Then map the answers to requirements:

| The idea | SixDof | Passthrough | Hands | Other |
|---|---|---|---|---|
| Something to look around at, sitting | `Off` or `Any` | `Off` | `Off` | |
| A virtual world to walk around | `On` | `Off` | `Any` | |
| Virtual things in the real room | `On` | `On` | `Any` | `ScanSurfaces` for tables and walls |
| Uses the hand's position | `On` | either | `On` | |

Use `Any` wherever the demo doesn't care, and `Off` where it's better without. Hand tracking costs
the most heat.

## 3. Check it against the design rules

Go through each rule under "Design rules" in `ADDING_A_DEMO.md`. If the idea breaks one, say so
plainly and suggest a version that doesn't. Don't quietly build around it. The usual problems:

- moving the view without the head moving;
- dropping or undoing something when the hand goes out of view;
- grabbing with the gaze;
- needing the network;
- an idea that comes down to carrying objects around a table, which is the sandbox again.

## 4. Agree on a short spec

Write one short block and get the person's OK before writing code. It covers:

- Title, Name (folder), Id, tagline, icon, tint and requirements.
- What the person does, and what the panel shows.
- How pinches are used, and what happens when the hand is lost.
- What gets logged, and which pure logic gets tests.

For the icon, prefer a name already in `Assets/_Project/Scripts/UI/M3Icons.cs`. A new icon means one
added line in that shared file.

## 5. Scaffold

From the repository's root:

```sh
python3 Tools/new-demo/scaffold.py --name Garden --id garden --title "Garden" \
    --description "..." --tagline "..." --icon palette --tint 0.30,0.60,0.35 \
    --sixdof On --passthrough On --hands Any --scan-surfaces
```

It checks the names, the requirements and the icon, and refuses to overwrite anything. It writes
`Scripts/` (the asmdef and `<Name>Demo.cs`), `Editor/<Name>Setup.cs` and `Tests/` (the asmdef only).
It also prints the demo's index for the `demo` launch option and, if the icon is missing, the exact
line to add to `M3Icons.cs`.

## 6. Build the demo

- **Stay inside the demo's folder.** The only exceptions are `DemoCatalog.asset`, which the build
  writes, and a new icon line in `M3Icons.cs`. If the idea seems to need a change in Core, stop and
  ask, because a Core change affects every demo.
- **Reach Core only through the `CoreServices` passed to `OnDemoEnter`.**
- **Panels:** build them at runtime with `WorldUi.Panel` and `M3.Text`, `M3.Button`,
  `M3.IconButton` and `M3.Slider`.
- **Pinches:** take them with `PinchRouter.Handler` only if the demo uses them for more than
  buttons. Otherwise remove `IPinchHandler` from the template.
- **The starter scene:** put what it needs (materials, prefabs, textures made in code) in
  `<Name>Setup.BuildScene`, saved in the demo's folder. The scene is made once and never
  overwritten. If you change `BuildScene` after the scene exists, and the scene hasn't been edited by
  hand, delete `<Name>.unity` so it's made again.
- **Clean up in `OnDemoExit`:** destroy anything parented into Core (such as under
  `core.Boundary.transform`) and unsubscribe from Core events.
- **Logs:** start every log line with `[<Name>]`. Log when the demo is ready, what the person
  does, and results such as a score or a count.
- **Tests:** put rules and math in static, pure functions, as `RushRules` and
  `PortalWorld.Crossing` do, and test them in `Tests/` (see `RushRulesTests`). Use the namespace
  `CardboardXR.Demos.<Name>.Tests`.
- **Assets:** no network, and no assets from outside the repository. Make them in code, or add
  files whose license allows it.

## 7. Check it

Unity's batch mode needs the project closed in the Editor. Check with
`pgrep -f Unity.app/Contents/MacOS/Unity`. If the Editor is open, ask the person to close it, or to
use **CardboardXR > Make Missing Demo Scenes** and the Test Runner instead.

```sh
U=${UNITY:-/Applications/Unity/Hub/Editor/$(sed -n 's/^m_EditorVersion: //p' ProjectSettings/ProjectVersion.txt)/Unity.app/Contents/MacOS/Unity}
"$U" -batchmode -quit -projectPath . -executeMethod ProjectBootstrap.DemoScenes.MakeMissing -logFile make.log
"$U" -batchmode -projectPath . -runTests -testPlatform EditMode -testResults results.xml -logFile tests.log
```

- In `make.log`, look for `[DemoScenes] Added <id> to the catalog`, `Made .../<Name>.unity`, and no
  `error CS` or `[DemoScenes]` errors.
- In `results.xml`, every test should pass, including the demo's own.
- In `git status`, only the demo's folder (with the `.meta` files Unity made), `DemoCatalog.asset`
  and possibly `M3Icons.cs` should have changed.

Don't build for a phone or install unless the person asks. Building and installing are theirs to
start, with `zsh Tools/build_and_run.sh --ei demo <index>` (Android) or
`zsh Tools/ios_build_and_run.sh --ei demo <index>` (iOS).

## 8. Hand it over

Tell the person:

- what the demo does;
- which files it has;
- the command to start straight in it.

Give them a test checklist for this demo in particular: the general checks under "Testing" in
`ADDING_A_DEMO.md`, plus what's specific to it (for example "hit an orb with your hand half out of
view"). Don't commit unless they ask.

The demo stays in the person's own build. The CardboardXR repository doesn't take new demos, so
don't suggest a pull request upstream. If they plan to install it next to the released app or share
it, point them to "Your own build" in `ADDING_A_DEMO.md`.

© brenpoly · Apache-2.0 · brenpoly/CardboardXR

Похожие скиллы

Все скиллы по теме «Геймдев и 3D: Unity, Unreal, Godot, Blender» →
ar-vr-xr travisjneuman Скилл ar-vr-xr для Claude Code помогает проектировать AR-, VR- и XR-приложения для Unity, WebXR и устройств Apple и Meta. Помогает продумывать взаимодействия, интерфейс и производительность в пространстве. CX Codex +1 125установок new-unity-project Unity-Technologies Скилл new-unity-project автоматизирует создание проекта в Unity: от концепта до инициализации git, пакетов и фоновой установки редактора. CX Codex +1 8 000установок godot-platform-vr thedivergentai Скилл godot-platform-vr для Claude Code задаёт правила проектирования VR в Godot: OpenXR, комфортное перемещение, hand tracking и контроль производительности для VR-шлемов. CX Codex +1 323установок threejs-xr cesartevisual Скилл threejs-xr для Claude Code помогает добавлять VR- и AR-сессии в проекты на Three.js. Он подключается к задачам про XR-ввод, пространства отсчёта и жизненный цикл сессии. CX Codex +1 577установок game-demo-feedback-triage akillness Скилл game-demo-feedback-triage превращает заметки плейтестов, отзывы стримеров и баг-листы в приоритетный план исправлений. Нужен перед следующей сборкой, фестивалем или запуском. CX Codex +1 306установок realitykit dpearson2699 Учит агента строить AR-приложения на RealityKit и ARKit. Покрывает RealityView, загрузку USDZ-моделей, якорение объектов, рейкастинг и жесты — под Swift 6.3 и iOS 26+. CX Codex +1 3 500установок

Спонсоры проекта

Компании, которые помогают держать аналитику открытой