agentleFS
atilladenizatilladeniz/Kubeli/CLAUDE.md

Kubeli

CLAUDE.md387 starsChanged 9 months agoMITView on GitHub

Kubeli is a modern Kubernetes management desktop application built with: - Frontend: Vite + React 19 - Desktop: Tauri 2.9 (Rust backend) - State: Zustand - Styling: Tailwind CSS - K8s Client: kube-rs (Rust) The release flow: make release → changelog generation tries Claude, then Codex, then OpenCode → if all CLIs fail, .changelog-ai-prompt.md is created for use in any AI chat and the generated bullet points can be pasted back into the terminal → release files and notes are…

The file

We split this CLAUDE.md into the rules it gives an agent

7 rules. About 0 are common, 5 are distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈5

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Use the usePlatform hook for OS-specific behavior:

    line 146
  2. Distinctive:

    Every bug fix must include a regression test when technically feasible.

    line 171
  3. Distinctive:

    If a regression test is not feasible, document the reason clearly in the PR.

    line 173
  4. Very specific:

    Use /humanizer when writing or editing:

    line 219
  5. Distinctive:

    Not needed for code comments, commit messages, or internal CLAUDE.md notes.

    line 226
  6. Distinctive:

    No emojis in commit messages

    line 233
  7. Distinctive:

    Keep commit messages clean and concise

    line 234

≈ “Common” is an estimate: at least 1 in 5 of the 26,980 CLAUDE.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
CLAUDE.md

Kubeli - Kubernetes Management Desktop App

Project Overview

Kubeli is a modern Kubernetes management desktop application built with:

  • Frontend: Vite + React 19
  • Desktop: Tauri 2.9 (Rust backend)
  • State: Zustand
  • Styling: Tailwind CSS
  • K8s Client: kube-rs (Rust)

Quick Start

# Development (Tauri + Vite)
make dev

# Web only development
make web-dev

# Production build
make build

Development Commands

Using Make (Recommended)

CommandDescription
make devStart Tauri development environment
make web-devStart Vite only (no Tauri)
make buildBuild production Tauri app (macOS)
make build-windowsCross-compile Windows NSIS installer from macOS
make build-allBuild macOS and Windows installers (Linux built by CI)
make lintRun ESLint
make formatFormat code with Prettier
make checkRun TypeScript type checking
make rust-checkCheck Rust code
make rust-fmtFormat Rust code
make cleanClean build artifacts
make installInstall all dependencies (incl. vet if Python available)
make vetAI code review of all branch changes against main
make vet-installInstall vet CLI for AI code verification
make helpShow all available commands

Release & Deploy

CommandDescription
make releaseRelease via CI: version bump, AI-generated changelog, commit, tag push → CI builds all platforms
make release-pushReview and publish a prepared release after explicit terminal confirmation
make release-ai-dry-runTest Claude, Codex, and OpenCode release integration without changing release files
make release-changelog-dry-runTest the real Claude → Codex → OpenCode fallback chain without changing release files
make release-manual-dry-runTest the Markdown prompt and terminal paste fallback without changing release files
make build-deployAlias for make release

The release flow: make release → changelog generation tries Claude, then Codex, then OpenCode → if all CLIs fail, .changelog-ai-prompt.md is created for use in any AI chat and the generated bullet points can be pasted back into the terminal → release files and notes are shown for review → pressing Enter confirms commit, push, and tag creation; any other input aborts → tag push triggers GitHub Actions → builds macOS (ARM + x86), Windows, Linux → waits for manual approval → deploys to FTP + publishes GitHub Release. After an abort, edit the prepared files and run make release-push to review and continue without another version bump.

npm scripts are listed in package.json; Rust uses the standard cargo commands in src-tauri/.

Architecture

Frontend (TypeScript/React)

  • Zustand stores manage application state
  • Tauri commands are invoked via @/lib/tauri/commands.ts
  • Types are shared between frontend and backend

Backend (Rust)

  • AppState holds the thread-safe KubeClientManager
  • KubeConfig parses kubeconfig files
  • Commands expose functionality to frontend

Local Kubernetes Testing

# Start minikube with addons and sample resources
make minikube-start

# Check status (includes sample resource count)
make minikube-status

# Apply/refresh sample resources manually
make minikube-setup-samples

# Remove sample resources
make minikube-clean-samples

# List resources
make k8s-pods
make k8s-services
make k8s-namespaces

OIDC sign-in testing

make oidc-dev        # local OIDC stack: HTTPS Dex + minikube that trusts it
make oidc-dev-stop   # tear it down

Brings up a local Dex provider and a dedicated minikube profile so a Kubeli OIDC sign-in connects all the way through. See .dev/oidc/README.md for details (needs a build for the kubeli:// callback, and one /etc/hosts line via sudo).

Sample Resources (kubeli-demo namespace)

The make minikube-start command automatically creates sample Kubernetes resources covering all major workload and policy types. The manifests (and the authoritative list of what gets created) live in .dev/k8s-samples/.

Windows Development

Building for Windows (from macOS)

# Install cross-compile dependencies (one-time)
make install-windows-build-deps

# Build Windows NSIS installer
make build-windows

# Build both macOS and Windows
make build-all

Output: src-tauri/target/x86_64-pc-windows-msvc/release/bundle/nsis/Kubeli_*_x64-setup.exe

Windows VM Testing

For testing in Windows VMs (UTM, VirtualBox) without nested virtualization:

# On Mac: Expose minikube API
make minikube-serve

# On Windows: Connect to Mac's minikube
.\connect-minikube.ps1 -HostIP <mac-ip>

See .dev/windows/WINDOWS-SETUP.md for full documentation.

Platform Detection

Use the usePlatform hook for OS-specific behavior:

import { usePlatform } from "@/lib/hooks/usePlatform";

function MyComponent() {
  const { isMac, isWindows, modKeySymbol } = usePlatform();

  // modKeySymbol: "⌘" on Mac, "Ctrl+" on Windows/Linux
  return <Kbd>{modKeySymbol}S</Kbd>;
}

The full property list is in src/lib/hooks/usePlatform.ts.

Key Files

  • src/lib/stores/cluster-store.ts - Cluster state management
  • src/lib/tauri/commands.ts - Tauri command bindings
  • src-tauri/src/commands/clusters.rs - Cluster command handlers
  • src-tauri/src/k8s/client.rs - Kubernetes client manager
  • src-tauri/src/k8s/config.rs - Kubeconfig parsing

Testing Rule

  • Every bug fix must include a regression test when technically feasible.
  • The test should cover the failure mode that caused the bug, not just the happy path.
  • If a regression test is not feasible, document the reason clearly in the PR.

Code Quality Skills

This project includes custom Claude skills for code quality based on industry best practices.

Available Skills

SkillPurposeUsage
/software-design-reviewAnalyzes code against 15 Ousterhout principles/software-design-review src/lib/stores/cluster-store.ts
/refactorStrategic refactoring with safety-first approach/refactor src/lib/stores/cluster-store.ts
/humanizerRemove AI writing patterns from text/humanizer

/software-design-review (Analysis)

Based on John Ousterhout's "A Philosophy of Software Design". Checks for:

  • Module Depth (Deep vs. Shallow)
  • Information Hiding & Leaks
  • Generalization vs. Specialization
  • Error Handling (Define errors away)
  • Consistency & Obviousness
  • Strategic vs. Tactical Programming

/refactor (Action)

Combines Ousterhout principles with Clean Code (Robert Martin) smells. Includes:

  • Phase 1-2: Analysis + Safety checklist (tests, git state)
  • Phase 3: Clean Code smells (F1-F4, G1-G36, N1-N7, T1-T9)
  • Phase 4: Stack-specific patterns (Vite/React, Zustand, Tauri/Rust)
  • Phase 5-6: Workflow + Prioritization

Key rules enforced:

  • Functions: Small, one task, max 3 args
  • Law of Demeter: No train wrecks (a.b().c().d())
  • DRY: No duplication
  • F.I.R.S.T.: Fast, Independent, Repeatable, Self-validating, Timely tests
  • Boy Scout Rule: Leave code cleaner than you found it

/humanizer (Writing Quality)

Detects and removes 24 common AI writing patterns (based on Wikipedia's "Signs of AI writing"). Use /humanizer when writing or editing:

  • README, CHANGELOG, PR descriptions - user-facing documentation
  • Landing page copy (web/) - marketing text on kubeli.dev
  • Release notes (.release-notes.md) - announcement text
  • CONTRIBUTING, SECURITY, AI_POLICY - community-facing docs

Not needed for code comments, commit messages, or internal CLAUDE.md notes.

Git Commit Guidelines

IMPORTANT: Do NOT add the following to commit messages:

  • No "Generated with Claude Code" text
  • No "Co-Authored-By: Claude" lines
  • No emojis in commit messages
  • Keep commit messages clean and concise

Resource Diagram (React Flow)

Design decisions, viewport rules and flicker-prevention patterns for the visual resource diagram live in src/components/features/visualization/CLAUDE.md (loaded automatically when working in that area).

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.