openshift/assisted-service-dev-mode
Build and code-generate assisted-service using skipper with podman. Use when running make targets, building the service, regenerating code from swagger or CRDs, running linters, or any containerized development task. Also use when the user encounters build errors, needs to set up their development environment, or asks about how to run tests.
npx skills add https://github.com/openshift/assisted-service --skill assisted-service-dev-mode
This project uses skipper to run make targets inside a container built from Dockerfile.assisted-service-build. The container runtime is podman.
Skipper is a Python CLI tool. Always activate the project venv before using it:
source .venv/bin/activate
If .venv does not exist, create it using the system python (some IDEs bundle their own Python which can hijack venv symlinks):
env -i HOME=$HOME PATH=/usr/bin:/usr/sbin:/bin:/sbin /usr/bin/python3 -m venv .venv
source .venv/bin/activate
pip install 'setuptools<81' strato-skipper
Key details:
env -i ... /usr/bin/python3 -m venv to avoid IDE-bundled python interceptionsetuptools<81 is required because skipper depends on pkg_resources which was removed in setuptools 82+Always activate the venv first, then run make targets through skipper:
source .venv/bin/activate
skipper make <target>
Skipper builds the container image defined in skipper.yaml and runs the make target inside it. The inner Makefile is hack/Makefile.
CONTAINER_HOST in skipper.yaml)skipper.env/go/pkg/mod (from ~/.cache/go-build)After modifying swagger.yaml:
skipper make generate-from-swagger
After modifying CRD types in api/:
skipper make generate
The generate target runs (in order):
generate-from-swagger — regenerates restapi/, client/, models/generate-go — runs go mod tidy && go mod vendor for all modulesgenerate-events — regenerates event typesgenerate-mocks — regenerates mock filesgenerate-configuration — regenerates configgenerate-bundle — regenerates OLM bundle and CRD manifestsCRD manifests are generated by controller-gen inside generate_manifests / generate_bundle in hack/generate.sh. This produces:
config/crd/bases/*.yamlconfig/crd/resources.yamldeploy/olm-catalog/manifests/*.yamlskipper make build-minimal # Build binary only
skipper make build-image # Build container image
skipper make all # Lint + test + build
skipper make lint # Run all linters
skipper make format # Auto-format code
skipper make unit-test # Full unit tests (needs DB)
skipper make subsystem-test # Subsystem tests (needs k8s)
Variables listed in skipper.env are automatically forwarded into the container. To pass additional variables for a single invocation, use the -e flag:
skipper -e FOO=bar make target
skipper -e SERVICE_IMAGE=quay.io/user/img:tag make build-image
Multiple variables can be passed by repeating -e:
skipper -e VAR1=val1 -e VAR2=val2 make target
skipper: command not foundThe venv is not activated. Run:
source .venv/bin/activate
If .venv doesn't exist, follow the Prerequisites section above to create it.
pkg_resources import errors / ModuleNotFoundError: No module named 'pkg_resources'The installed setuptools version is too new (82+). Reinstall with the pinned version:
source .venv/bin/activate
pip install 'setuptools<81'
Skipper builds its container from Dockerfile.assisted-service-build (referenced in skipper.yaml). If the build fails:
systemctl --user status podman.socketpodman rmi the cached build image, then re-runCONTAINER_HOST is set correctly in skipper.yamlsystemctl --user start podman.socket$XDG_RUNTIME_DIR/podman/podman.sock exists and is accessiblevenv creates broken symlinksSome IDEs bundle their own Python, causing python3 -m venv to create symlinks pointing at the IDE's Python rather than the system one. Always create the venv with the explicit system path:
env -i HOME=$HOME PATH=/usr/bin:/usr/sbin:/bin:/sbin /usr/bin/python3 -m venv .venv
Makefile delegates to hack/Makefile via skippergenerate_manifests() in hack/generate.sh requires ENABLE_KUBE_API=true (set automatically by generate_bundle)vendor/, api/vendor/, client/vendor/) are managed by generate-go target — don't manually edit vendored filesapi/hiveextension/v1beta1/, run skipper make generate to regenerate CRD YAMLs and vendored copiesTake openshift/assisted-service-dev-mode from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.
The instructions reference pip.
Without those the skill loads but fails at the first command.