create-cpo-override
Interactively create CPO image overrides — resolves images, verifies fixes, edits overrides.yaml, and prepares a PR
Restructure branch commits into logical component-based commits for HyperShift PRs
$ npx -y skills add openshift/hypershift --skill restructure-commits --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/restructure-commitsContext preview
The summary Claude sees to decide when to auto-load this skill.
Restructure branch commits into logical component-based commits for HyperShift PRs
name: restructure-commits description: Restructure branch commits into logical component-based commits for HyperShift PRs
Reorganize all commits on a feature branch into logical, component-based commits that match HyperShift's architecture.
Commits are created in this order. Each commit groups files by architectural boundary.
| Order | Component | Scope | File Patterns | |-------|-----------|-------|---------------| | 1 | API | `api` | `api/` (types, deepcopy, CRD manifests, go.mod) — **excluding** `*_test.go` | | 2 | Vendor | `api` | `vendor/`, `client/`, `cmd/install/assets/hypershift-operator/zz_generated.crd-manifests/` | | 3 | CLI | `cli` | `cmd/cluster/`, `cmd/install/`, `cmd/nodepool/`, `product-cli/` (source, tests, testdata) | | 4 | HO | `hypershift-operator` | `hypershift-operator/`, `support/`, `karpenter-operator/`, `kubevirtexternalinfra/`, `pkg/`, `manifests/`, `shared-ingress/`, `sharedingress-config-generator/` | | 5 | CPO | `control-plane-operator` | `control-plane-operator/`, `control-plane-pki-operator/`, `availability-prober/`, `dnsresolver/`, `etcd-backup/`, `etcd-defrag/`, `etcd-recovery/`, `ignition-server/`, `kas-bootstrap/`, `konnectivity-https-proxy/`, `konnectivity-socks5-proxy/`, `kubernetes-default-proxy/`, `sync-fg-configmap/`, `sync-global-pullsecret/`, `token-minter/` | | 6 | E2E | `e2e` | `test/`, `api/**/*_test.go` | | 7 | Docs | `docs` | `docs/`, `examples/` |
**Excluded from restructuring:** `bin/` (build output), `hack/`, `contrib/`, `hypershift-ci-python/`, `self-managed-azure-ci-setup/`, and `.claude*/` are build tooling, CI helpers, or dev config. If changed, include them in the most relevant commit based on their purpose. When ambiguous, prefer HO.
BASE_BRANCH=$(gh pr view --json baseRefName -q .baseRefName 2>/dev/null || echo "main")
MERGE_BASE=$(git merge-base ${BASE_BRANCH} HEAD)
git log --oneline ${MERGE_BASE}..HEAD # review existing commits
git diff ${MERGE_BASE}..HEAD --name-only | sort # all changed filesgit reset --soft ${MERGE_BASE} # keep everything staged
git reset HEAD # unstage everythingFor each component (in order), stage matching files and commit:
# Example: API commit (exclude test files — they belong in E2E) git add api/ && git reset HEAD 'api/**/*_test.go' 2>/dev/null || true git commit # use conventional commit format # Example: Vendor commit git add vendor/ client/ \ "cmd/install/assets/hypershift-operator/zz_generated.crd-manifests/" git commit # ... repeat for CLI, HO, CPO, E2E, Docs
git status # must be clean
git log --oneline ${BASE_BRANCH}..HEAD # verify commit structure
git push --force-with-lease # requires user confirmation**Always invoke the git-commit-format skill first** for the full formatting rules (line length, footer, Co-Authored-By, etc.). This section provides the component-specific type and scope, plus guidance on writing the subject and body.
1. Look at the actual changes in the component to determine what was done 2. Pick the type and scope from the table below 3. Write a concise subject that summarizes the *purpose* of the changes, not just "update files" 4. Use imperative mood: "add", "update", "remove" — not "added", "adds", "adding"
| Component | Type(Scope) | Example Subject | |-----------|-------------|-----------------| | API | `feat(api):` | `feat(api): add FooBar CRD and platform config` | | Vendor | `chore(api):` | `chore(api): regenerate CRDs, clients, deepcopy, and vendor` | | CLI | `feat(cli):` | `feat(cli): add --foo-bar flags for cluster creation` | | HO | `feat(hypershift-operator):` | `feat(hypershift-operator): add FooBar controller` | | CPO | `feat(control-plane-operator):` | `feat(control-plane-operator): add FooBar controllers` | | E2E | `test(e2e):` | `test(e2e): add FooBar e2e and validation tests` | | Docs | `docs:` | `docs: add FooBar documentation and architecture reference` |
Review the staged changes and write a body that describes *what* was added or changed. Use bullet points when there are multiple distinct changes. The body should give a reviewer enough context to understand the commit without reading every file. Each line must be under 140 characters (gitlint enforced).
HyperShift is a middleware for hosting OpenShift control planes at scale that solves for cost and time to provision, as well as portability cross cloud with strong separation of concerns between management and workloads.
Repo: openshift/hypershift
Interactively create CPO image overrides — resolves images, verifies fixes, edits overrides.yaml, and prepares a PR
Provides systematic debugging approaches for HyperShift hosted-cluster issues. Auto-applies when debugging cluster problems, investigating stuck deletions, or…
Build and push control-plane-operator container image. Auto-applies when testing CPO changes that require deploying to a live cluster.
Build and push hypershift-operator container image. Auto-applies when testing HO changes that require deploying to a live cluster.
Create a HyperShift HostedCluster on AWS for development and testing, with optional custom CPO/HO images.
Destroy a HyperShift HostedCluster and all associated AWS infrastructure (VPC, IAM, Route53, etc.).