From 7ff7c8ddfd694cb3a716b361fd4a5f2528aee820 Mon Sep 17 00:00:00 2001 From: ikrispin Date: Tue, 16 Jun 2026 13:51:54 +0300 Subject: [PATCH 1/2] Add UI capability detection to cluster-creator skill Step 1 When open_cluster_creator is available, call it immediately to open the interactive Creator form, skipping text-based parameter gathering (Steps 2-6). Text-only environments fall back to the existing workflow. Co-authored-by: Cursor --- ocp-admin/skills/cluster-creator/SKILL.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/ocp-admin/skills/cluster-creator/SKILL.md b/ocp-admin/skills/cluster-creator/SKILL.md index 0f832060..9f02129e 100644 --- a/ocp-admin/skills/cluster-creator/SKILL.md +++ b/ocp-admin/skills/cluster-creator/SKILL.md @@ -20,7 +20,7 @@ description: | license: Apache-2.0 model: inherit color: green -allowed-tools: list_versions create_cluster cluster_info set_cluster_vips set_host_role cluster_iso_download_url install_cluster cluster_credentials_download_url cluster_logs_download_url list_static_network_config generate_nmstate_yaml validate_nmstate_yaml alter_static_network_config_nmstate_for_host +allowed-tools: open_cluster_creator list_versions create_cluster cluster_info set_cluster_vips set_host_role cluster_iso_download_url install_cluster cluster_credentials_download_url cluster_logs_download_url list_static_network_config generate_nmstate_yaml validate_nmstate_yaml alter_static_network_config_nmstate_for_host metadata: mcp_server: openshift-self-managed mcp_tools_priority: true @@ -120,11 +120,13 @@ TaskCreate(subject: "#12 Retrieve credentials", description: "Download kubeconfi **During execution**: Update task status to "in_progress" when starting, "completed" when done. -### Step 1: Prerequisites Check +### Step 1: Environment Detection and Prerequisites **TaskUpdate**: Mark task #1 as `in_progress` -**Prerequisites Check**: Execute verification from Prerequisites section. +**Check for interactive UI**: If the `open_cluster_creator` tool is available, call it immediately. The interactive Creator form handles Steps 2 through 6 (prerequisites, parameter gathering, networking, review, and cluster creation). Once the cluster is created via the form, resume this workflow from **Step 7** (Apply Platform Configuration) using the cluster ID returned by the form. + +**Otherwise (text-only environment)**: Execute the prerequisites verification from the Prerequisites section above, then continue to Step 2. **On Failure**: If prerequisites fail, consult [troubleshooting.md](docs/troubleshooting.md) for common setup issues, then stop and report error to user. From beeab05ab36d161e1e7001b80fc53bd65e385e54 Mon Sep 17 00:00:00 2001 From: ikrispin Date: Tue, 16 Jun 2026 14:49:35 +0300 Subject: [PATCH 2/2] Update CLAUDE.md with unified instructions including UI Widget Policy Co-authored-by: Cursor --- ocp-admin/CLAUDE.md | 16 ++++++++++++++++ ocp-admin/skills/cluster-creator/SKILL.md | 6 ++---- 2 files changed, 18 insertions(+), 4 deletions(-) diff --git a/ocp-admin/CLAUDE.md b/ocp-admin/CLAUDE.md index 22d9ecdb..96c139d9 100644 --- a/ocp-admin/CLAUDE.md +++ b/ocp-admin/CLAUDE.md @@ -8,6 +8,20 @@ ALWAYS use the appropriate skill for OpenShift cluster administration and securi To invoke a skill, use the Skill tool with the skill name (e.g., `/cluster-creator`). +## UI Widget Policy + +When interactive UI widgets are available, prefer calling UI-opening tools immediately without gathering parameters first. The interactive form will collect all required information from the user. + +| User intent | Tool to call | What happens | +|---|---|---| +| Create a cluster, install OpenShift, deploy SNO/HA | `open_cluster_creator` | Opens the Cluster Creator form | +| List clusters, show my clusters, cluster status | `list_clusters` | Opens the Cluster Inventory dashboard | +| Set up a cluster, configure hosts, assign roles, install | `get_cluster_hosts` with the cluster ID | Opens the Cluster Setup dashboard | + +Do NOT call `create_cluster` to open the UI — it requires cluster parameters and is used for actually creating the cluster after parameters are known. For UI-based creation, always call `open_cluster_creator`. + +In text-only environments where these tools do not render UI widgets, follow the skill workflows for step-by-step parameter gathering instead. + ## Intent Routing Match the user's request to the correct skill: @@ -24,6 +38,8 @@ Match the user's request to the correct skill: If the request doesn't clearly match one skill, ask the user to clarify. +When starting a skill workflow, read the corresponding Knowledge file for the detailed step-by-step instructions — but always respect the UI Widget Policy above for the three widget flows. + ## Skill Chaining Some workflows require multiple skills in sequence: diff --git a/ocp-admin/skills/cluster-creator/SKILL.md b/ocp-admin/skills/cluster-creator/SKILL.md index 9f02129e..74c17993 100644 --- a/ocp-admin/skills/cluster-creator/SKILL.md +++ b/ocp-admin/skills/cluster-creator/SKILL.md @@ -124,11 +124,9 @@ TaskCreate(subject: "#12 Retrieve credentials", description: "Download kubeconfi **TaskUpdate**: Mark task #1 as `in_progress` -**Check for interactive UI**: If the `open_cluster_creator` tool is available, call it immediately. The interactive Creator form handles Steps 2 through 6 (prerequisites, parameter gathering, networking, review, and cluster creation). Once the cluster is created via the form, resume this workflow from **Step 7** (Apply Platform Configuration) using the cluster ID returned by the form. +**Check for interactive UI**: If the `open_cluster_creator` tool is available, call it immediately. The interactive Creator form handles Steps 2 through 6. Once the cluster is created via the form, resume from **Step 7** using the cluster ID returned by the form. -**Otherwise (text-only environment)**: Execute the prerequisites verification from the Prerequisites section above, then continue to Step 2. - -**On Failure**: If prerequisites fail, consult [troubleshooting.md](docs/troubleshooting.md) for common setup issues, then stop and report error to user. +**Otherwise (text-only)**: Execute prerequisites verification from the Prerequisites section above, then continue to Step 2. On failure, consult [troubleshooting.md](docs/troubleshooting.md) and stop. ---