diff --git a/.claude/CLAUDE.md b/.claude/CLAUDE.md index 88a84a41..9a6f49dc 100755 --- a/.claude/CLAUDE.md +++ b/.claude/CLAUDE.md @@ -7,6 +7,7 @@ - **After every significant change**: Proactively update this file (`.claude/CLAUDE.md`) to reflect what changed — new services, config changes, version bumps, new patterns, etc. This ensures knowledge persists across sessions automatically. - **After updating any `.claude/` files**: Always commit them immediately (`git add .claude/ && git commit -m "[ci skip] update claude knowledge"`) to avoid building up unstaged changes. - **Skills available**: Check `.claude/skills/` directory for specialized workflows (e.g., `setup-project.md` for deploying new services) +- **CRITICAL: All infrastructure changes must go through Terraform**. NEVER modify cluster resources directly (e.g., via kubectl apply/edit/patch, helm install, docker run). Always make changes in the Terraform `.tf` files and apply with `terraform apply`. ## Execution Environment @@ -15,15 +16,8 @@ - **Git commands**: git status, git log, git diff, git add, git commit, git reset, etc. - **Basic shell**: ls, cat, head, tail, find, grep, etc. -### Remote Commands (via `/remote` skill) -**NEVER use SSH directly** (e.g., `ssh wizard@10.0.10.10`). SSH is not allowed. -For commands that need cluster access, use the `/remote` skill or the `tf-apply`/`tf-plan` skills: -- **terraform**: Use `/remote terraform apply ...` or the `tf-apply`/`tf-plan` skills -- **kubectl**: Use `/remote kubectl ...` or the `kubectl` skill -- **helm**: Use `/remote helm ...` -- **docker**: Use `/remote docker ...` -- **python/pip**: Use `/remote python ...` -- **Any command interacting with**: Proxmox, Kubernetes cluster, NFS server, other infrastructure +### Remote Commands +For commands that need cluster access (terraform, kubectl, helm, docker, python), run them directly. These tools are available in the local environment. --- diff --git a/.claude/commands/kubectl.md b/.claude/commands/kubectl.md index e3a68fe9..73591328 100755 --- a/.claude/commands/kubectl.md +++ b/.claude/commands/kubectl.md @@ -1,9 +1,9 @@ # Kubectl Command -Run kubectl commands on the cluster via the `/remote` skill. +Run kubectl commands on the cluster. -``` -/remote kubectl $ARGUMENTS +```bash +kubectl $ARGUMENTS ``` Examples: diff --git a/.claude/commands/tf-apply.md b/.claude/commands/tf-apply.md index 7d49e96d..87787f86 100755 --- a/.claude/commands/tf-apply.md +++ b/.claude/commands/tf-apply.md @@ -1,9 +1,9 @@ # Terraform Apply -Run terraform apply to deploy infrastructure changes via the `/remote` skill. +Run terraform apply to deploy infrastructure changes. -``` -/remote terraform apply -target=module.kubernetes_cluster.module. -auto-approve +```bash +terraform apply -target=module.kubernetes_cluster.module. -auto-approve ``` ALWAYS use -target to speed up execution. Monitor the output and report any errors or successful completions. diff --git a/.claude/commands/tf-plan.md b/.claude/commands/tf-plan.md index acc51230..02a5d300 100755 --- a/.claude/commands/tf-plan.md +++ b/.claude/commands/tf-plan.md @@ -1,9 +1,9 @@ # Terraform Plan -Run terraform plan to preview infrastructure changes via the `/remote` skill. +Run terraform plan to preview infrastructure changes. -``` -/remote terraform plan -target=module.kubernetes_cluster.module. +```bash +terraform plan -target=module.kubernetes_cluster.module. ``` ALWAYS use -target to speed up execution. Summarize the planned changes, highlighting any resources being destroyed or recreated. diff --git a/.claude/skills/home-assistant/SKILL.md b/.claude/skills/home-assistant/SKILL.md index 0ded33a4..5e00e2d5 100644 --- a/.claude/skills/home-assistant/SKILL.md +++ b/.claude/skills/home-assistant/SKILL.md @@ -38,10 +38,10 @@ Need to control smart home devices, check sensor states, or run automations via ``` ### Execution Pattern (CRITICAL) -Always activate the venv to get environment variables, then run via `/remote` skill: +Always activate the venv to get environment variables: ```bash -/remote source ~/.venvs/claude/bin/activate && cd /home/wizard/code/infra && python .claude/home-assistant.py [command] [options] +source ~/.venvs/claude/bin/activate && cd ~/code/infra && python .claude/home-assistant.py [command] [options] ``` ### Available Commands @@ -134,7 +134,7 @@ python .claude/home-assistant.py notify "Hello" --target notify.mobile_app To turn on the living room light: ```bash -/remote source ~/.venvs/claude/bin/activate && cd /home/wizard/code/infra && python .claude/home-assistant.py on light.living_room +source ~/.venvs/claude/bin/activate && cd ~/code/infra && python .claude/home-assistant.py on light.living_room ``` ## Common Entity Domains diff --git a/.claude/skills/nextcloud-calendar/SKILL.md b/.claude/skills/nextcloud-calendar/SKILL.md index ce725bd6..3d293dd6 100644 --- a/.claude/skills/nextcloud-calendar/SKILL.md +++ b/.claude/skills/nextcloud-calendar/SKILL.md @@ -34,10 +34,10 @@ Need to create, query, or manage calendar events in the user's Nextcloud calenda ``` ### Execution Pattern (CRITICAL) -Always activate the venv to get environment variables, then run via `/remote` skill: +Always activate the venv to get environment variables: ```bash -/remote source ~/.venvs/claude/bin/activate && cd /home/wizard/code/infra && python .claude/calendar-query.py [command] [options] +source ~/.venvs/claude/bin/activate && cd ~/code/infra && python .claude/calendar-query.py [command] [options] ``` ### Available Commands @@ -103,7 +103,7 @@ python .claude/calendar-query.py week To create an event "Team offsite" from March 20-22, 2026: ```bash -/remote source ~/.venvs/claude/bin/activate && cd /home/wizard/code/infra && python .claude/calendar-query.py create --title "Team offsite" --start "2026-03-20" --end "2026-03-23" --all-day +source ~/.venvs/claude/bin/activate && cd ~/code/infra && python .claude/calendar-query.py create --title "Team offsite" --start "2026-03-20" --end "2026-03-23" --all-day ``` ## Important Notes diff --git a/.claude/skills/setup-project.md b/.claude/skills/setup-project.md index 5900393a..7edd31fe 100644 --- a/.claude/skills/setup-project.md +++ b/.claude/skills/setup-project.md @@ -284,7 +284,6 @@ smtp_password = var.mailserver_accounts["info@viktorbarzin.me"] ### 6. Apply Terraform ```bash -# Via /remote skill terraform init terraform apply -target=module.kubernetes_cluster.module. -auto-approve ```