TOOLS.md
TOOLS.md - Local Notes
Skills define how tools work. This file is for your specifics — the stuff that's unique to your setup.
Coding task defaults
- Prefer Claude Code for coding tasks.
- Run it with
--dangerously-skip-permissionsunless snake explicitly instructs otherwise. - Before starting a new coding task, pull first (e.g.,
git pullin the relevant repo) unless told not to. - When we update files in the workspace, commit and push those changes (unless you tell me not to, or it’s a throwaway/experimental branch).
- Practical rule: if I used
write/editon a workspace file, I should immediately rungit status→ thengit add -A && git commit && git pushin the same turn.
- Practical rule: if I used
X/Twitter (Timeline Summaries) via bird
Goal: summarize snake’s Following timeline from this EC2 instance.
Working setup (EC2)
- Store X session cookies as env vars in:
~/.config/bird/credentials.env- Contains
AUTH_TOKENandCT0(do not commit; permissionschmod 600).
- Contains
- Usage:
source ~/.config/bird/credentials.envbird checkbird query-ids --fresh(fixes stale GraphQL query IDs)bird home --following -n 200 --json
Common failure modes + fixes
-
Tried
--chrome-profile-dirand it couldn’t find/decrypt cookies- Symptom:
Failed to read Linux keyring via secret-tool; v11 cookies may be unavailableand/orNo Twitter cookies found - Cause: Chromium cookies on Linux are often encrypted via keyring/libsecret; copied cookie DBs won’t decrypt on EC2.
- Fix: pass cookies directly via env vars (
AUTH_TOKEN,CT0) or flags (--auth-token,--ct0).
- Symptom:
-
Auth works but timeline calls fail
- Run
bird query-ids --freshthen retry.
- Run
-
Safety note
- Never pass raw tokens through OpenClaw tool calls (they get logged). Prefer local file +
source.
- Never pass raw tokens through OpenClaw tool calls (they get logged). Prefer local file +
Google Workspace (gog) on EC2
Goal: read/write Google Calendar (and Gmail) via gog on the EC2 host.
Keyring prompt gotcha (OpenClaw systemd service)
If gog works in your shell but OpenClaw still prompts for a keyring password, it’s because the Gateway runs as a systemd user service and does not source ~/.bashrc.
Fix: use a systemd EnvironmentFile= to pass:
GOG_KEYRING_BACKEND=fileGOG_KEYRING_PASSWORD=...
Full writeup: docs/gog-systemd-keyring-setup.md
OAuth callback gotcha (EC2 vs laptop)
gog auth add uses a loopback redirect like:
http://127.0.0.1:<PORT>/oauth2/callback
If you open the auth URL on your laptop while gog is running on EC2, Google redirects to the laptop’s 127.0.0.1, so EC2 never receives the callback.
Fix: SSH local port-forward from laptop to EC2 (use the port printed in the URL):
ssh -L <PORT>:127.0.0.1:<PORT> ubuntu@<ec2-host>
Then re-open the auth URL on the laptop.
Keyring / passphrase
After auth, gog stores tokens in an encrypted keyring:
- Prompt:
Enter passphrase to unlock "/home/ubuntu/.config/gogcli/keyring"
On headless EC2, new gog processes may prompt again because there’s no GUI keychain agent.
Tip: run gog inside a persistent tmux session and unlock once for that session.
Config
gog auth keyring filewrites:/home/ubuntu/.config/gogcli/config.jsonwith{ "keyring_backend": "file" }
What Goes Here
Note to self (OpenClaw setup/config work)
When working on OpenClaw setup/config/gateway/tailscale issues: read the relevant docs first (local docs under workspace/docs/ when available, otherwise https://docs.openclaw.ai) before making config changes.
Note to self (openclaw-dashboard)
- If I push commits to
/home/ubuntu/projects/openclaw-dashboard, I should restart the dashboard service so the running Next.js instance picks up the new build:sudo systemctl restart openclaw-dashboard.service
- Reason: the 5-min update timer only restarts when it pulls new commits; local commits can leave the service running an older build until restarted.
Convention: document new setups
Whenever we set up something new that affects the environment (services, timers, networking, automation, cron, deploy pipelines, etc.), write a short doc under:
/home/ubuntu/.openclaw/workspace/docs/
Include:
- goal
- what was changed/installed
- file paths (systemd units, scripts, configs)
- how to check status/logs
- how to disable/remove
Cron / automation conventions
- If a script primarily supports an OpenClaw Gateway cron job, put it under:
/home/ubuntu/.openclaw/workspace/automation/**
- Exception: if the cron job is operating on a different project repo (e.g. committing to
ai-compassoropenclaw-dashboard), keep the script in that repo’sscripts/folder. - Reference:
docs/automation-conventions.md
Guardrail: never edit global OpenClaw packages
- Do not modify files under
/home/ubuntu/.npm-global/lib/node_modules/openclaw/**(or any globally installed OpenClaw package). - If behavior needs changing, prefer:
- editing cron payloads / local scripts in
/home/ubuntu/.openclaw/workspace, or - updating OpenClaw via the normal update/install path, or
- upstreaming a PR.
- editing cron payloads / local scripts in
- Treat global package edits as forbidden unless snake explicitly asks.
Things like:
-
Docs convention: put assistant-authored docs, specs, and how-tos under
/home/ubuntu/.openclaw/workspace/docs/(i.e.,/workspace/docs) so they’re easy to find and don’t clutter the repo root. -
Camera names and locations
-
SSH hosts and aliases
-
Preferred voices for TTS
-
Speaker/room names
-
Device nicknames
-
Anything environment-specific
Add whatever helps you do your job. This is your cheat sheet.