Tilt Setup
Install Tilt and scaffold or audit Tiltfile + tilt/ configurations for local Kubernetes development with ecosystem-aware templates.
Pre-flight
Run the detection script to understand current state:
python3 ${CLAUDE_SKILL_DIR}/scripts/detect_tilt.py <project-root>
The detector reports: tilt/kubectl binaries, current kubectl context (with production-pattern matching), existing Tiltfile and tilt/ modular layout (also recognizes legacy .tilt/), .tiltignore, tilt_config.json, ecosystems detected (Java/Gradle, Next.js, Python, infra), local cluster tools available, and audit violations (TILT001–TILT025) when a Tiltfile exists.
Decision Flow
Run detector
|
├── tilt_binary.installed = false → Install Tilt first
|
├── kubectl_context.is_production_pattern = true → STOP and warn user
|
├── tiltfile.exists = true → Phase 1: Audit
|
└── tiltfile.exists = false → Phase 2: Scaffold
Phase 1: Audit (Existing Tiltfile)
Summarize findings — show a status table:
| Component |
Status |
Detail |
| tilt binary |
installed/missing |
version, path |
| kubectl context |
safe/production |
current context, classification |
| Tiltfile |
found/not found |
path, line count |
| Modular layout |
yes/no |
tilt/ files (config.star, services.star, *.yaml) |
| Ecosystems |
N detected |
java-gradle, nextjs, python, infra |
| Service count |
N services |
k8s_resource calls |
| Safety guard |
yes/no |
allow_k8s_contexts or manual guard |
| .tiltignore |
yes/no |
path |
Present audit violations grouped by severity (ERROR > WARNING > INFO):
- Show rule ID, message, fix hint
- Rules cover: missing safety guard, deprecated
restart_container, missing live_update, no watch_settings, no update_settings, missing resource_deps/labels/port_forwards, monolithic Tiltfile, etc.
Use AskUserQuestion (multiSelect: true) — ask which violations to fix.
Apply selected fixes — see WORKFLOW.md for per-rule fix strategies.
Re-run detector to verify fixes were applied.
Phase 2: Scaffold (No Tiltfile)
Install tilt if missing — show commands based on os field:
- macOS:
brew install tilt-dev/tap/tilt
- Linux:
curl -fsSL https://raw.githubusercontent.com/tilt-dev/tilt/master/scripts/install.sh | bash
- Verify:
tilt version
Verify kubectl context is safe — if kubectl_context.is_production_pattern is true, STOP and ask the user to switch contexts before proceeding.
Review detected ecosystems — show what was found.
Choose Tiltfile pattern — use AskUserQuestion:
- Single-file (
Tiltfile only) — recommended for 1–3 services, single ecosystem
- Modular (
Tiltfile + tilt/config.star + tilt/services.star + tilt/service-config.yaml + tilt/environments.yaml) — recommended for 4+ services, 2+ ecosystems, or 2+ environment presets
Choose features — use AskUserQuestion (multiSelect: true):
| Feature |
When to enable |
| Manual context guard |
Always (recommended over allow_k8s_contexts alone) |
| PVC persistence toggle |
Stateful services (postgres, kafka, opensearch) |
| JDWP debug ports |
Java/Spring Boot services |
| Monitoring stack |
Prometheus + Grafana via helm_resource |
| Traefik gateway |
Multi-service projects with HTTP routing |
Generate Tiltfile + supporting files — see WORKFLOW.md for templates.
Always include in the root Tiltfile:
- Manual
validate_cluster_safety() guard at top (blocks arn:aws:eks:, gke_, prod, production, staging)
watch_settings(ignore=[...]) with build artifacts and dep dirs
update_settings(max_parallel_updates=2) for laptop-friendly CPU usage
.tiltignore next to Tiltfile
Verify — run tilt alpha tiltfile-result to validate syntax, then re-run detector.
Key Rules
- Never overwrite existing
Tiltfile or tilt/ files without asking. Offer merge/replace/skip.
- Detect first — skip steps already configured.
- Use
AskUserQuestion for every decision. Do not assume user preferences.
- Always start with safety guard — refuse to scaffold without one. The cost of accidental prod deployment is too high.
- Use
ext://restart_process not restart_container() — the latter is deprecated.
- Load extensions only from root Tiltfile — Starlark
load() of ext:// from sub-files fails.
- Externalize service definitions to YAML for modular layouts —
read_yaml("tilt/service-config.yaml") keeps config team-editable.
- PVC persistence pattern — create persistent PVCs via
local("kubectl apply") outside Tilt's lifecycle so they survive tilt down.
- Per-ecosystem live_update:
- Spring Boot:
custom_build + local_resource compile + sync of .class files
- Next.js:
local_resource with serve_cmd (preferred) OR container with WATCHPACK_POLLING=true
- Python:
docker_build + sync + uvicorn --reload (no restart_container needed)
Reference Material
The skill's reference base lives at docs/research/tilt-local-kubernetes-development-setup.md (in this repo). It contains the full Tilt API reference, ecosystem recipes, cluster comparison, audit rule definitions (TILT001–TILT025), and scaffold templates.
References
- Workflow: See WORKFLOW.md for detailed per-step flows and templates
- Examples: See EXAMPLES.md for example setup and audit sessions
- Troubleshooting: See TROUBLESHOOTING.md for common issues
- Detection Script: See scripts/detect_tilt.py for detection logic
- Research base:
docs/research/tilt-local-kubernetes-development-setup.md
Source: joaquimscosta/arkhe-claude-plugins — distributed by TomeVault.
1---2name: joaquimscosta-arkhe-claude-plugins-tilt-setup3description: Tilt Setup4---56# Tilt Setup78Install [Tilt](https://tilt.dev/) and scaffold or audit `Tiltfile` + `tilt/` configurations for local Kubernetes development with ecosystem-aware templates.910## Pre-flight1112Run the detection script to understand current state:13```bash14python3 ${CLAUDE_SKILL_DIR}/scripts/detect_tilt.py <project-root>15```1617The detector reports: tilt/kubectl binaries, current kubectl context (with production-pattern matching), existing Tiltfile and `tilt/` modular layout (also recognizes legacy `.tilt/`), `.tiltignore`, `tilt_config.json`, ecosystems detected (Java/Gradle, Next.js, Python, infra), local cluster tools available, and audit violations (`TILT001`–`TILT025`) when a Tiltfile exists.1819## Decision Flow2021```22Run detector23 |24 ├── tilt_binary.installed = false → Install Tilt first25 |26 ├── kubectl_context.is_production_pattern = true → STOP and warn user27 |28 ├── tiltfile.exists = true → Phase 1: Audit29 |30 └── tiltfile.exists = false → Phase 2: Scaffold31```3233## Phase 1: Audit (Existing Tiltfile)34351. **Summarize findings** — show a status table:3637 | Component | Status | Detail |38 |-----------|--------|--------|39 | tilt binary | installed/missing | version, path |40 | kubectl context | safe/production | current context, classification |41 | Tiltfile | found/not found | path, line count |42 | Modular layout | yes/no | `tilt/` files (config.star, services.star, *.yaml) |43 | Ecosystems | N detected | java-gradle, nextjs, python, infra |44 | Service count | N services | `k8s_resource` calls |45 | Safety guard | yes/no | `allow_k8s_contexts` or manual guard |46 | .tiltignore | yes/no | path |47482. **Present audit violations** grouped by severity (ERROR > WARNING > INFO):49 - Show rule ID, message, fix hint50 - Rules cover: missing safety guard, deprecated `restart_container`, missing `live_update`, no `watch_settings`, no `update_settings`, missing `resource_deps`/`labels`/`port_forwards`, monolithic Tiltfile, etc.51523. **Use `AskUserQuestion`** (multiSelect: true) — ask which violations to fix.53544. **Apply selected fixes** — see [WORKFLOW.md](WORKFLOW.md) for per-rule fix strategies.55565. **Re-run detector** to verify fixes were applied.5758## Phase 2: Scaffold (No Tiltfile)59601. **Install `tilt`** if missing — show commands based on `os` field:61 - **macOS**: `brew install tilt-dev/tap/tilt`62 - **Linux**: `curl -fsSL https://raw.githubusercontent.com/tilt-dev/tilt/master/scripts/install.sh | bash`63 - Verify: `tilt version`64652. **Verify kubectl context is safe** — if `kubectl_context.is_production_pattern` is true, STOP and ask the user to switch contexts before proceeding.66673. **Review detected ecosystems** — show what was found.68694. **Choose Tiltfile pattern** — use `AskUserQuestion`:70 - **Single-file** (`Tiltfile` only) — recommended for 1–3 services, single ecosystem71 - **Modular** (`Tiltfile` + `tilt/config.star` + `tilt/services.star` + `tilt/service-config.yaml` + `tilt/environments.yaml`) — recommended for 4+ services, 2+ ecosystems, or 2+ environment presets72735. **Choose features** — use `AskUserQuestion` (multiSelect: true):7475 | Feature | When to enable |76 |---------|----------------|77 | Manual context guard | Always (recommended over `allow_k8s_contexts` alone) |78 | PVC persistence toggle | Stateful services (postgres, kafka, opensearch) |79 | JDWP debug ports | Java/Spring Boot services |80 | Monitoring stack | Prometheus + Grafana via `helm_resource` |81 | Traefik gateway | Multi-service projects with HTTP routing |82836. **Generate Tiltfile + supporting files** — see [WORKFLOW.md](WORKFLOW.md) for templates.8485 Always include in the root Tiltfile:86 - Manual `validate_cluster_safety()` guard at top (blocks `arn:aws:eks:`, `gke_`, `prod`, `production`, `staging`)87 - `watch_settings(ignore=[...])` with build artifacts and dep dirs88 - `update_settings(max_parallel_updates=2)` for laptop-friendly CPU usage89 - `.tiltignore` next to Tiltfile90917. **Verify** — run `tilt alpha tiltfile-result` to validate syntax, then re-run detector.9293## Key Rules9495- **Never overwrite** existing `Tiltfile` or `tilt/` files without asking. Offer merge/replace/skip.96- **Detect first** — skip steps already configured.97- **Use `AskUserQuestion`** for every decision. Do not assume user preferences.98- **Always start with safety guard** — refuse to scaffold without one. The cost of accidental prod deployment is too high.99- **Use `ext://restart_process` not `restart_container()`** — the latter is deprecated.100- **Load extensions only from root Tiltfile** — Starlark `load()` of `ext://` from sub-files fails.101- **Externalize service definitions to YAML** for modular layouts — `read_yaml("tilt/service-config.yaml")` keeps config team-editable.102- **PVC persistence pattern** — create persistent PVCs via `local("kubectl apply")` outside Tilt's lifecycle so they survive `tilt down`.103- **Per-ecosystem live_update**:104 - Spring Boot: `custom_build` + `local_resource` compile + `sync` of `.class` files105 - Next.js: `local_resource` with `serve_cmd` (preferred) OR container with `WATCHPACK_POLLING=true`106 - Python: `docker_build` + `sync` + uvicorn `--reload` (no `restart_container` needed)107108## Reference Material109110The skill's reference base lives at `docs/research/tilt-local-kubernetes-development-setup.md` (in this repo). It contains the full Tilt API reference, ecosystem recipes, cluster comparison, audit rule definitions (TILT001–TILT025), and scaffold templates.111112## References113114- **Workflow**: See [WORKFLOW.md](WORKFLOW.md) for detailed per-step flows and templates115- **Examples**: See [EXAMPLES.md](EXAMPLES.md) for example setup and audit sessions116- **Troubleshooting**: See [TROUBLESHOOTING.md](TROUBLESHOOTING.md) for common issues117- **Detection Script**: See [scripts/detect_tilt.py](scripts/detect_tilt.py) for detection logic118- **Research base**: `docs/research/tilt-local-kubernetes-development-setup.md`119120---121> Source: [joaquimscosta/arkhe-claude-plugins](https://github.com/joaquimscosta/arkhe-claude-plugins) — distributed by [TomeVault](https://tomevault.io).122<!-- tomevault:4.0:skill_md:2026-05-22 -->