new-playground
Creates a Gravitee Lab playground, personal or shared, when someone wants a use case with its apps, sample data and guide.
- License 许可
- AGPL-3.0
- 最近更新
- 2026-11-09
- Stars
- ★ 4
- Forks
- 1
01 前言 Front Matter
- name
- new-playground
- description
- Creates a Gravitee Lab playground, personal or shared, when someone wants a use case with its apps, sample data and guide.
03 SKILL.md 正文
New playground
A playground is a use case started in one click: the add-ons it needs, its apps, sample data in Gravitee and a guide.
The rules are in docs/units.md, and the authoring reference in docs/playgrounds.md.
-
Read
AGENTS.md,docs/units.mdanddocs/playgrounds.md. Start from a complete playground of a catalog. The catalogs are in.lab/catalogs/, which git ignores: name the folder (.lab/catalogs/<catalog id>/playgrounds/, the id of the default catalog is incatalogs.default.json) and do not search the tree by pattern, which skips it. -
Settle what the request does not say. Infer what you can, ask the rest:
- Its name, and its id: the name in lower case, with every run of characters other than a-z and 0-9 one dash and
no dash at either end (Acme Shop is
acme-shop). The id names its folder, and the check refuses another (ST23). Notlocal, and not the id of a playground of any catalog. Its own settings start with its id (ACME_SHOP_*). - The use case: the add-ons and setups it needs, its apps and where they are built from (their own folder or a repository), what it creates in Gravitee (APIs, applications, users) and the lessons of its guide.
- Whether it also deploys to Gravitee Cloud: nothing to declare, the Lab works it out. A seed of
seed/apim/,seed/am/andseed/openfga/at most, backend apps, no change to the core. - Whether a lesson teaches a protection that starts switched off (a control) or spends a budget that Re-seed puts back (a refill).
- Its category, a description, its tags and the time the guide takes (
20 min,1 h 30 min), and how long the first start takes: a playground kept in a catalog has them all, and the check asks for them. The description is a noun phrase without a leading article or final period, such as "Protection of a shop's REST API and AI assistant, one lesson at a time". - Where it is kept: Personal, on this machine only, or a catalog that is a folder of the person's (a folder
catalog: the Lab UI's New catalog, or the
new-catalogskill). Personal unless the person names a catalog.
- Its name, and its id: the name in lower case, with every run of characters other than a-z and 0-9 one dash and
no dash at either end (Acme Shop is
-
Write its folder where it belongs:
Kept Folder Personal .lab/catalogs/local/playgrounds/<id>/In a folder catalog <the folder of the catalog>/playgrounds/<id>/compose.yml: the metadata, what it includes, its apps and its seed.services: {}when it has none.- Its secrets: every password, secret, token and key is a setting, never a literal, the
passwordandkeyof each account included (the check refuses a literal in the item of a catalog). Define them once as anchors in anx-<id>-secretsblock placed beforex-gravitee, and alias them from the accounts and the services (the first lines of thecompose.ymlof a complete playground show it). guide.md: a title, an introduction, then one## 1. Titlesection per lesson, in order.apps/<app>/, with itsDockerfile: only when it ships an app.seed/, with the seed service that reads it: only when it creates something in Gravitee.
-
An add-on it needs is missing: create it first, with the
new-addonskill. -
Check it. For an item of a folder catalog, run
python3 -I lab-ui/catalog.py check <catalog id>from the project's folder and fix what it says until it prints "All good". A personal item is read by Compose when the Lab UI shows it: the page says why one does not load. Run the tests of an app it ships, in its image, when Docker runs. -
In a catalog, write
README.mdin its folder for what a user needs to know before and after. Ask the person which versions they built it and checked it on, and write them asx-gravitee.tested: CI starts the playground on each set. Never write versions nobody ran it on. -
Tell the person where the folder is, and that the playground shows on the Playgrounds page of the Lab UI (
make ui). Ask them to start it from its page and go through the guide: starting changes their lab, so do not start it yourself.
To share a personal playground later, use the share-item skill.
04 同仓库更多 Skills
acme-bakery-complaint-handling
How the Acme Bakery assistant takes a customer complaint. It listens, records the facts, says what happens next and hands the case to a teller when money or a card is involved. Use when a customer is unhappy, disputes a charge or reports a mistake.
share-item
Shares a personal Gravitee Lab add-on, setup or playground to a catalog, as a branch to propose or a copy into a folder.
prepare-pull-request
Prepares a Gravitee Lab change for review by running the checks that match it and printing the pull request description.
new-setup
Creates a Gravitee Lab setup, personal or shared, when someone wants add-ons that start and stop as one.
new-playground
Creates a Gravitee Lab playground, personal or shared, when someone wants a use case with its apps, sample data and guide.
new-catalog
Creates a Gravitee Lab catalog, a folder of add-ons, setups and playgrounds to keep or to share, when someone has built something and has nowhere to put it.