Agent Skillsluxury-yacht/app › cluster-auth-lifecycle

cluster-auth-lifecycle

GitHub

管理多集群 Kubernetes 配置的认证、客户端生命周期、故障恢复及刷新子系统。涵盖前后端集群状态同步、kubeconfig 选择逻辑、对象目录管理及相关测试,确保多集群环境下的数据一致性与连接稳定性。

.agents/skills/cluster-auth-lifecycle/SKILL.md luxury-yacht/app

Trigger Scenarios

处理 kubeconfig 选择和集群客户端设置 实现认证失败后的重试与恢复机制 管理多集群环境下的刷新子系统和对象目录生命周期 修改集群标签页或前端 UI 中的集群状态展示

Install

npx skills add luxury-yacht/app --skill cluster-auth-lifecycle -g -y
More Options

Non-standard path

npx skills add https://github.com/luxury-yacht/app/tree/main/.agents/skills/cluster-auth-lifecycle -g -y

Use without installing

npx skills use luxury-yacht/app@cluster-auth-lifecycle

指定 Agent (Claude Code)

npx skills add luxury-yacht/app --skill cluster-auth-lifecycle -a claude-code -g -y

安装 repo 全部 skill

npx skills add luxury-yacht/app --all -g -y

预览 repo 内 skill

npx skills add luxury-yacht/app --list

SKILL.md

Frontmatter
{
    "name": "cluster-auth-lifecycle",
    "description": "Work on Luxury Yacht kubeconfig selection, multi-cluster client lifecycle, auth failure\/recovery, selected\/background clusters, cluster tabs, refresh subsystem rebuilds, and object catalog lifecycle"
}

Cluster Auth Lifecycle

Use this when touching kubeconfig selection, cluster client setup, auth failure overlays, retry/recovery, selected/background cluster state, cluster tabs, refresh subsystem rebuilds, object catalog start/stop, or tests for cluster add/remove behavior.

Read First

  1. AGENTS.md
  2. backend/AGENTS.md for backend lifecycle/client changes
  3. frontend/AGENTS.md for frontend cluster state or UI changes
  4. docs/architecture/multi-cluster.md
  5. docs/architecture/data-freshness.md
  6. docs/architecture/auth.md
  7. docs/architecture/refresh-system.md
  8. docs/architecture/catalog.md when object catalog lifecycle is involved

Backend Entry Points

  • backend/cluster_runtime_manager.go
  • backend/cluster_workspace_projection.go
  • backend/refresh_coordinator.go
  • backend/workspace_coordinator.go
  • backend/cluster_runtime_intent.go
  • backend/cluster_runtime_clients.go
  • backend/cluster_runtime_auth.go
  • backend/workspace_auth.go
  • backend/workspace_cluster_clients.go
  • backend/workspace_kubeconfigs.go
  • backend/workspace_state.go
  • backend/refresh_setup.go
  • backend/refresh_update.go
  • backend/refresh_subsystems.go
  • backend/refresh_recovery.go
  • backend/refresh_object_catalog.go
  • backend/internal/authstate

Frontend Entry Points

  • frontend/src/modules/kubernetes/config
  • frontend/src/modules/cluster
  • frontend/src/ui/layout/ClusterTabs.tsx
  • frontend/src/ui/overlays/AuthFailureOverlay.tsx
  • frontend/src/core/refresh
  • frontend/src/core/data-access

Checklist

  • Every cluster-data path carries clusterId; never infer the active cluster in a backend/API/cache/action path.
  • Selected and background cluster sets stay distinct and refresh scopes are rebuilt or cleared when cluster selection changes.
  • Refresh domains stay single-cluster. Cross-cluster displays fan out only for clusters they display; retained inactive tabs stay passive.
  • Cluster add/remove updates aggregate refresh handlers and object catalog services through the live update path, not only initial setup.
  • Watcher, auth, and transport callbacks publish non-blocking typed ClusterRuntimeIntent values; Workspace is the single consumer and routes accepted generations through the serialized selection mutation.
  • Auth-failed clusters do not block healthy clusters.
  • Retry/recovery rebuilds transport, refresh, object catalog, and frontend diagnostics consistently.
  • Closing/removing a cluster cleans up streams, sessions, stale scopes, and catalog state for that cluster.
  • Every frontend cluster-tab open/close affordance routes through KubeconfigContext's unified selection transition (openKubeconfig, closeKubeconfig, or setSelectedKubeconfigs); do not splice selected clusters locally or call generated backend selection/close commands from UI surfaces.
  • Tests cover at least one multi-cluster or auth-failure transition.

Validation

Use focused checks while iterating:

mise exec -- go test ./backend ./backend/internal/authstate
mise exec -- npm run typecheck --prefix frontend
mise exec -- npm run test --prefix frontend -- cluster kubeconfig auth refresh

Then follow the root final validation gate.

Version History

  • ee846a6 Current 2026-08-20 13:02

Same Skill Collection

.agents/skills/add-resource/SKILL.md
.agents/skills/app-review/SKILL.md
.agents/skills/app-shell/SKILL.md
.agents/skills/branch-review/SKILL.md
.agents/skills/browse-tables/SKILL.md
.agents/skills/draft-release-notes/SKILL.md
.agents/skills/improve-backend/SKILL.md
.agents/skills/improve-frontend/SKILL.md
.agents/skills/make-impossible-states-impossible/SKILL.md
.agents/skills/new-story/SKILL.md
.agents/skills/object-map/SKILL.md
.agents/skills/object-panel/SKILL.md
.agents/skills/operations-workflows/SKILL.md
.agents/skills/permissions-capabilities/SKILL.md
.agents/skills/refresh-subsystem/SKILL.md
.agents/skills/shared-resource-model/SKILL.md

Metadata

Files
0
Version
ee846a6
Hash
4268426b
Indexed
2026-08-20 13:02

- 위키
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-08-25 11:41
浙ICP备14020137号-1 $방문자$