gerrit-create
Use when creating or updating Gerrit changes — pushing code for review, amending patch sets, setting reviewers and topics.…
**Activates when:** Working in `components/ambient-api-server/` or asked about API server, REST endpoints, gRPC, OpenAPI, or plugins.
$ npx -y skills add ambient-code/platform --skill ambient-api-server --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/ambient-api-serverContext preview
The summary Claude sees to decide when to auto-load this skill.
**Activates when:** Working in `components/ambient-api-server/` or asked about API server, REST endpoints, gRPC, OpenAPI, or plugins.
**Activates when:** Working in `components/ambient-api-server/` or asked about API server, REST endpoints, gRPC, OpenAPI, or plugins.
---
You are working on the **Ambient API Server** — a Go REST + gRPC server built on the `rh-trex-ai` framework. It serves the Ambient Platform's resource API under `/api/ambient/v1/`.
Every resource kind is a self-contained plugin in `plugins/<kind>/`. The 8-file structure is mandatory:
plugins/<kind>/ plugin.go # route + gRPC registration model.go # GORM DB struct handler.go # HTTP handlers service.go # business logic dao.go # DB layer presenter.go # model → API response migration.go # DB schema mock_dao.go # test mock *_test.go # table-driven tests
Generate scaffold: `go run ./scripts/generator.go --kind Foo --fields "name:string,status:string"`
openapi/openapi.yaml → make generate → pkg/api/openapi/ (DO NOT EDIT) → ambient-sdk make generate → all SDKs
Never edit `pkg/api/openapi/` files — they are generated from `openapi/openapi.yaml`.
| `AMBIENT_ENV` | Auth | DB | Use for | |---|---|---|---| | `development` | disabled | localhost:5432 | local `make run` | | `integration_testing` | mock | testcontainer (ephemeral) | `make test` | | `production` | JWT required | cluster Postgres | deployed |
systemctl --user start podman.socket export DOCKER_HOST=unix:///run/user/$(id -u)/podman/podman.sock cd components/ambient-api-server && make test
---
1. Define schema in `openapi/openapi.yaml` 2. Run `make generate` (updates Go stubs) 3. `go run ./scripts/generator.go --kind MyResource --fields "..."` 4. Implement `service.go` and `dao.go` business logic 5. Write table-driven tests in `*_test.go` 6. Run `make test` — all green 7. Run `make generate` in `ambient-sdk` to propagate to SDKs 8. Run `make build` in `ambient-cli` to update CLI
1. Add streaming RPC to `proto/ambient/v1/<resource>.proto` 2. `make generate` → updates stubs in `pkg/api/grpc/` 3. Implement handler in `plugins/<kind>/plugin.go` — register gRPC server 4. Implement fan-out: in-memory subscriber map keyed by session ID 5. Feed events from runner gRPC push → fan-out → all subscribers 6. Skip ownership check for non-JWT tokens 7. Test with: `acpctl session messages -f --project <p> <session>`
---
Kubernetes-native AI automation platform for intelligent agentic sessions
Use when creating or updating Gerrit changes — pushing code for review, amending patch sets, setting reviewers and topics.…
Use when reviewing a Gerrit change — fetching change details, reading diffs, posting inline comments, and voting with labels.…
Use when submitting or preparing a Gerrit change for merge — checking submit requirements, rebasing, resolving comments, and…
Run a convention alignment check across the codebase to measure adherence to documented standards. Use when you want to check…
Perform a comprehensive code review using repository-specific standards. Use when reviewing code changes, checking PR quality,…
Perform any development work on the ambient-ui component. Full workflow instructions.