chore: scrub personal infra from main cheat-sheet

All three docs now use generic examples only.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Mortdecai
2026-04-06 23:02:15 -04:00
parent 25e64c1f06
commit 77c2d4bfd3
2 changed files with 123 additions and 26 deletions
+95
View File
@@ -0,0 +1,95 @@
# Claude Shorthand Cheat-Sheet
## Core Operators
| Pattern | Meaning | Example |
|---------|---------|---------|
| `→` | then (sequential) | `ssh pve173 → zpool status` |
| `+` | and (parallel) | `check caddy + check pihole` |
| `X ? Y : Z` | if X then Y else Z | `port open ? connect : debug` |
| `!X` | don't / skip | `!error handling` |
| `w/` | with | `py script w/ argparse` |
| `@` | at path/location | `new config @ /etc/caddy/` |
| `re:` | regarding | `fix re: tank degraded drive` |
| `=` | set/assign | `port=3000, lang=python` |
| `~` | approximately / like | `~50 lines, ~yesterday` |
| `>>` | output to / save to | `results >> /tmp/report.txt` |
| `<-` | from / source | `data <- freshrss API` |
## Spec Block (complex tasks)
```
feat: <short description>
- lang: <language>
- deps: <dependencies>
- in: <input/source>
- out: <output/target>
- !: <things to skip>
```
## Examples
### Verbose → Compressed
**Service setup:**
```
# Before (~80 tokens):
"Please create a new Python service in the printer-automation directory
that connects to the FreshRSS API, fetches today's articles, formats
them for the receipt printer, and runs as a systemd service"
# After (~20 tokens):
feat: daily print @ printer-automation/
- freshrss API → format → receipt printer
- systemd service
```
**Infra task:**
```
# Before (~50 tokens):
"SSH into pve173, check if any drives in the tank pool are degraded,
and if so tell me which ones need replacement"
# After (~12 tokens):
pve173 → tank degraded drives? → list replacements
```
**Multi-step:**
```
# Before (~60 tokens):
"First read the Caddyfile, then add a new reverse proxy entry for
wiki.sethpc.xyz pointing to 192.168.0.160 port 3000, and also
add it to the Pi-hole DNS"
# After (~15 tokens):
add wiki.sethpc.xyz → .160:3000 to caddy + pihole
```
**Conditional:**
```
# Before (~45 tokens):
"Check if ollama is running on pve197. If it is, test the qwen model.
If it's not running, start it first then test."
# After (~15 tokens):
pve197: ollama running ? test qwen : start → test
```
## Anchors (use known names)
| Say | Not |
|-----|-----|
| `pve173` | "the PowerEdge node at 192.168.0.173" |
| `tank` | "the ZFS pool on node-173" |
| `caddy` | "the reverse proxy in CT 600" |
| `pihole` | "the DNS server at 192.168.0.153" |
| `steel141` | "this machine, my gaming PC" |
| `ollama` | "the LLM inference service" |
## Quick Rules
1. Drop articles (a, the, an) — Claude doesn't need them
2. Drop politeness (please, could you, I'd like) — zero effect on output
3. Use aliases from CLAUDE.md — they're shared vocabulary
4. Bullets > paragraphs — less ambiguous, fewer tokens
5. Imply obvious steps — "add X to caddy" implies read/edit/save
+28 -26
View File
@@ -4,17 +4,17 @@
| Pattern | Meaning | Example | | Pattern | Meaning | Example |
|---------|---------|---------| |---------|---------|---------|
| `→` | then (sequential) | `ssh pve173 → zpool status` | | `→` | then (sequential) | `ssh server → check status` |
| `+` | and (parallel) | `check caddy + check pihole` | | `+` | and (parallel) | `check proxy + check dns` |
| `X ? Y : Z` | if X then Y else Z | `port open ? connect : debug` | | `X ? Y : Z` | if X then Y else Z | `port open ? connect : debug` |
| `!X` | don't / skip | `!error handling` | | `!X` | don't / skip | `!error handling` |
| `w/` | with | `py script w/ argparse` | | `w/` | with | `py script w/ argparse` |
| `@` | at path/location | `new config @ /etc/caddy/` | | `@` | at path/location | `new config @ /etc/nginx/` |
| `re:` | regarding | `fix re: tank degraded drive` | | `re:` | regarding | `fix re: pool degraded drive` |
| `=` | set/assign | `port=3000, lang=python` | | `=` | set/assign | `port=3000, lang=python` |
| `~` | approximately / like | `~50 lines, ~yesterday` | | `~` | approximately / like | `~50 lines, ~yesterday` |
| `>>` | output to / save to | `results >> /tmp/report.txt` | | `>>` | output to / save to | `results >> /tmp/report.txt` |
| `<-` | from / source | `data <- freshrss API` | | `<-` | from / source | `data <- rss API` |
## Spec Block (complex tasks) ## Spec Block (complex tasks)
@@ -34,57 +34,59 @@ feat: <short description>
**Service setup:** **Service setup:**
``` ```
# Before (~80 tokens): # Before (~80 tokens):
"Please create a new Python service in the printer-automation directory "Please create a new Python service in the automation directory
that connects to the FreshRSS API, fetches today's articles, formats that connects to the RSS API, fetches today's articles, formats
them for the receipt printer, and runs as a systemd service" them for the printer, and runs as a systemd service"
# After (~20 tokens): # After (~20 tokens):
feat: daily print @ printer-automation/ feat: daily print @ automation/
- freshrss API → format → receipt printer - rss API → format → printer
- systemd service - systemd service
``` ```
**Infra task:** **Infra task:**
``` ```
# Before (~50 tokens): # Before (~50 tokens):
"SSH into pve173, check if any drives in the tank pool are degraded, "SSH into the storage server, check if any drives in the pool are
and if so tell me which ones need replacement" degraded, and if so tell me which ones need replacement"
# After (~12 tokens): # After (~12 tokens):
pve173 → tank degraded drives? → list replacements storage-server → pool degraded drives? → list replacements
``` ```
**Multi-step:** **Multi-step:**
``` ```
# Before (~60 tokens): # Before (~60 tokens):
"First read the Caddyfile, then add a new reverse proxy entry for "First read the proxy config, then add a new reverse proxy entry for
wiki.sethpc.xyz pointing to 192.168.0.160 port 3000, and also wiki.example.com pointing to the backend on port 3000, and also
add it to the Pi-hole DNS" add it to DNS"
# After (~15 tokens): # After (~15 tokens):
add wiki.sethpc.xyz → .160:3000 to caddy + pihole add wiki.example.com → backend:3000 to proxy + dns
``` ```
**Conditional:** **Conditional:**
``` ```
# Before (~45 tokens): # Before (~45 tokens):
"Check if ollama is running on pve197. If it is, test the qwen model. "Check if the LLM service is running on the inference server. If it is,
If it's not running, start it first then test." test the model. If it's not running, start it first then test."
# After (~15 tokens): # After (~15 tokens):
pve197: ollama running ? test qwen : start → test inference: llm running ? test model : start → test
``` ```
## Anchors (use known names) ## Anchors (use known names)
Define short aliases in your CLAUDE.md, then use them everywhere:
| Say | Not | | Say | Not |
|-----|-----| |-----|-----|
| `pve173` | "the PowerEdge node at 192.168.0.173" | | `db-server` | "the PostgreSQL database server at 10.0.1.50" |
| `tank` | "the ZFS pool on node-173" | | `pool` | "the ZFS storage pool on the NAS" |
| `caddy` | "the reverse proxy in CT 600" | | `proxy` | "the Caddy/nginx reverse proxy container" |
| `pihole` | "the DNS server at 192.168.0.153" | | `dns` | "the Pi-hole DNS server" |
| `steel141` | "this machine, my gaming PC" | | `workstation` | "this machine, my desktop PC" |
| `ollama` | "the LLM inference service" | | `llm` | "the LLM inference service" |
## Quick Rules ## Quick Rules