new-addon
Creates a Gravitee Lab add-on, personal or shared, when someone wants to add a service or a tool to the lab.
- License 许可
- AGPL-3.0
- 最近更新
- 2026-11-09
- Stars
- ★ 4
- Forks
- 1
01 前言 Front Matter
- name
- new-addon
- description
- Creates a Gravitee Lab add-on, personal or shared, when someone wants to add a service or a tool to the lab.
03 SKILL.md 正文
New add-on
An add-on is one capability on top of the core platform: a folder with its compose.yml. The rules are in
docs/units.md.
-
Read
AGENTS.mdanddocs/units.md. Start from the add-on of a catalog that is closest to the request. The catalogs are in.lab/catalogs/, which git ignores: name the folder (.lab/catalogs/<catalog id>/addons/, 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 Console is
acme-console). The id names its folder, and the check refuses another (ST23). Notlocal, and not the id of an add-on of any catalog or the name of a service the project has. - What it adds: the image and its version, the port to open, the settings and secrets it needs, the keys it sets
on core services, the add-ons it needs or cannot run with. Its own settings start with its id (
ACME_CONSOLE_*). - Its category and a description: a noun phrase without a leading article or final period that says what it adds, such as "Browser for what the gateway sends to Acme".
- 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 Console is
-
Write it where it belongs:
Kept Folder Personal .lab/catalogs/local/addons/<id>/In a folder catalog <the folder of the catalog>/addons/<id>/ -
Write every password, secret, token and key as a setting, never a literal:
${NAME:-default}with a public demo value as the default, or${NAME}when the person must provide it. The check refuses a literal in the item of a catalog. Put the real values in.env, in its folder, never incompose.yml. A setting is never written into aCMD-SHELLhealth check or acommandwritten as one line: the check reads the container's own variable as"$${VAR}", in double quotes, and the command is a list. -
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. A service that takes more of the machine than its container does (privileged, the host's network, the Docker socket, a folder outside the project) says why inx-gravitee.host_access; the check asks for it in the item of a catalog. -
In a catalog, write
README.mdin the add-on's folder for what it adds and how to use it: the check asks for it. -
Tell the person where the folder is, and that the add-on shows on the Add-ons page of the Lab UI (
make ui), where it is started.
To share a personal add-on 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.