From 02d51afe09340db99e38102df05da7850d82c0c8 Mon Sep 17 00:00:00 2001 From: gavrielc Date: Sat, 21 Mar 2026 18:53:53 +0200 Subject: [PATCH] trim diagnostics verbosity Co-Authored-By: Claude Opus 4.6 (1M context) --- .claude/skills/setup/SKILL.md | 4 +- .claude/skills/setup/diagnostics.md | 39 +++++------------- .claude/skills/update-nanoclaw/SKILL.md | 4 +- .claude/skills/update-nanoclaw/diagnostics.md | 41 +++++-------------- 4 files changed, 24 insertions(+), 64 deletions(-) diff --git a/.claude/skills/setup/SKILL.md b/.claude/skills/setup/SKILL.md index c1c5d60..2041f80 100644 --- a/.claude/skills/setup/SKILL.md +++ b/.claude/skills/setup/SKILL.md @@ -218,6 +218,6 @@ Tell user to test: send a message in their registered chat. Show: `tail -f logs/ **Unload service:** macOS: `launchctl unload ~/Library/LaunchAgents/com.nanoclaw.plist` | Linux: `systemctl --user stop nanoclaw` -## Diagnostics (Optional) +## Diagnostics -After completing all steps above, read and follow [diagnostics.md](diagnostics.md). +Read and follow [diagnostics.md](diagnostics.md). diff --git a/.claude/skills/setup/diagnostics.md b/.claude/skills/setup/diagnostics.md index 4741777..a76b4ab 100644 --- a/.claude/skills/setup/diagnostics.md +++ b/.claude/skills/setup/diagnostics.md @@ -1,8 +1,6 @@ -# Diagnostics (Optional) +# Diagnostics -After setup is complete, offer to send anonymous diagnostics. - -## 1. Gather system info +Gather system info: ```bash node -p "require('./package.json').version" @@ -11,15 +9,13 @@ uname -m node -p "process.versions.node.split('.')[0]" ``` -## 2. Write the event - -Write a JSON file to `/tmp/nanoclaw-diagnostics.json`. Fill in system info from the commands above and the outcome from the session. Use only non-identifying information — no paths, usernames, hostnames, or IP addresses. +Write `/tmp/nanoclaw-diagnostics.json`. No paths, usernames, hostnames, or IP addresses. ```json { "api_key": "phc_fx1Hhx9ucz8GuaJC8LVZWO8u03yXZZJJ6ObS4yplnaP", "event": "setup_complete", - "distinct_id": "", + "distinct_id": "", "properties": { "success": true, "nanoclaw_version": "1.2.21", @@ -33,33 +29,18 @@ Write a JSON file to `/tmp/nanoclaw-diagnostics.json`. Fill in system info from } ``` -## 3. Show and ask - -Show the contents of the file to the user and ask: - -> "Would you like to send anonymous diagnostics to help improve NanoClaw? Here's exactly what would be sent:" -> -> (show the entire JSON file) -> -> **Yes** / **No** / **Never ask again** - -Use AskUserQuestion. - -## 4. Handle response +Show the entire JSON to the user and ask via AskUserQuestion: **Yes** / **No** / **Never ask again** **Yes**: ```bash curl -s -X POST https://us.i.posthog.com/capture/ -H 'Content-Type: application/json' -d @/tmp/nanoclaw-diagnostics.json rm /tmp/nanoclaw-diagnostics.json ``` -Confirm: "Diagnostics sent." -**No**: `rm /tmp/nanoclaw-diagnostics.json` — do nothing else. +**No**: `rm /tmp/nanoclaw-diagnostics.json` -**Never ask again**: Opt out of diagnostics in both setup and update-nanoclaw: -1. Replace the contents of `.claude/skills/setup/diagnostics.md` with just `# Diagnostics — opted out` -2. Replace the contents of `.claude/skills/update-nanoclaw/diagnostics.md` with just `# Diagnostics — opted out` -3. Remove the "Diagnostics (Optional)" section from the end of both `.claude/skills/setup/SKILL.md` and `.claude/skills/update-nanoclaw/SKILL.md` +**Never ask again**: +1. Replace contents of `.claude/skills/setup/diagnostics.md` with `# Diagnostics — opted out` +2. Replace contents of `.claude/skills/update-nanoclaw/diagnostics.md` with `# Diagnostics — opted out` +3. Remove the "Diagnostics" section from both `.claude/skills/setup/SKILL.md` and `.claude/skills/update-nanoclaw/SKILL.md` 4. `rm /tmp/nanoclaw-diagnostics.json` - -Confirm: "Got it — you won't be asked again." diff --git a/.claude/skills/update-nanoclaw/SKILL.md b/.claude/skills/update-nanoclaw/SKILL.md index e8197d2..0af5713 100644 --- a/.claude/skills/update-nanoclaw/SKILL.md +++ b/.claude/skills/update-nanoclaw/SKILL.md @@ -235,6 +235,6 @@ Tell the user: - If running manually: restart `npm run dev` -## Diagnostics (Optional) +## Diagnostics -After completing all steps above, read and follow [diagnostics.md](diagnostics.md). +Read and follow [diagnostics.md](diagnostics.md). diff --git a/.claude/skills/update-nanoclaw/diagnostics.md b/.claude/skills/update-nanoclaw/diagnostics.md index 46286b7..bc659ab 100644 --- a/.claude/skills/update-nanoclaw/diagnostics.md +++ b/.claude/skills/update-nanoclaw/diagnostics.md @@ -1,8 +1,6 @@ -# Diagnostics (Optional) +# Diagnostics -After the update is complete, offer to send anonymous diagnostics. - -## 1. Gather system info +Gather system info: ```bash node -p "require('./package.json').version" @@ -12,17 +10,13 @@ node -p "process.versions.node.split('.')[0]" git log -1 --format=%ci HEAD@{1} 2>/dev/null || echo "unknown" ``` -The last command gets the date of the previous HEAD (before the update) to estimate version age. - -## 2. Write the event - -Write a JSON file to `/tmp/nanoclaw-diagnostics.json`. Fill in system info from the commands above and the outcome from the session. Use only non-identifying information — no paths, usernames, hostnames, or IP addresses. +Write `/tmp/nanoclaw-diagnostics.json`. No paths, usernames, hostnames, or IP addresses. ```json { "api_key": "phc_fx1Hhx9ucz8GuaJC8LVZWO8u03yXZZJJ6ObS4yplnaP", "event": "update_complete", - "distinct_id": "", + "distinct_id": "", "properties": { "success": true, "nanoclaw_version": "1.2.21", @@ -38,33 +32,18 @@ Write a JSON file to `/tmp/nanoclaw-diagnostics.json`. Fill in system info from } ``` -## 3. Show and ask - -Show the contents of the file to the user and ask: - -> "Would you like to send anonymous diagnostics to help improve NanoClaw? Here's exactly what would be sent:" -> -> (show the entire JSON file) -> -> **Yes** / **No** / **Never ask again** - -Use AskUserQuestion. - -## 4. Handle response +Show the entire JSON to the user and ask via AskUserQuestion: **Yes** / **No** / **Never ask again** **Yes**: ```bash curl -s -X POST https://us.i.posthog.com/capture/ -H 'Content-Type: application/json' -d @/tmp/nanoclaw-diagnostics.json rm /tmp/nanoclaw-diagnostics.json ``` -Confirm: "Diagnostics sent." -**No**: `rm /tmp/nanoclaw-diagnostics.json` — do nothing else. +**No**: `rm /tmp/nanoclaw-diagnostics.json` -**Never ask again**: Opt out of diagnostics in both setup and update-nanoclaw: -1. Replace the contents of `.claude/skills/setup/diagnostics.md` with just `# Diagnostics — opted out` -2. Replace the contents of `.claude/skills/update-nanoclaw/diagnostics.md` with just `# Diagnostics — opted out` -3. Remove the "Diagnostics (Optional)" section from the end of both `.claude/skills/setup/SKILL.md` and `.claude/skills/update-nanoclaw/SKILL.md` +**Never ask again**: +1. Replace contents of `.claude/skills/setup/diagnostics.md` with `# Diagnostics — opted out` +2. Replace contents of `.claude/skills/update-nanoclaw/diagnostics.md` with `# Diagnostics — opted out` +3. Remove the "Diagnostics" section from both `.claude/skills/setup/SKILL.md` and `.claude/skills/update-nanoclaw/SKILL.md` 4. `rm /tmp/nanoclaw-diagnostics.json` - -Confirm: "Got it — you won't be asked again."