Working with diverse data formats: binary, text, structured, and custom
How to work with diverse and unknown data formats.
Always inspect before parsing:
file <filename> # MIME type detection
xxd <filename> | head -5 # hex dump (first bytes)
head -3 <filename> # text preview
python3 -c "
with open('<filename>', 'rb') as f:
h = f.read(16)
print(h, h.hex())
"
\x7fELF, PNG: \x89PNG)struct.unpack('<I', ...) vs '>I')python3 -c "import json; json.load(open('f'))"python3 -c "import tomllib; ...".pt, .pth → torch.load(f, map_location='cpu').ckpt → index + data files, use tf.train.load_checkpoint().npy, .npz → numpy.load()config.json + model.safetensorsonnx.load()file says "SQLite 3.x database" → sqlite3 <file> ".tables"sqlite3 PRAGMAxxd file | head -16head, tail, shuf -n 10head -1 file | awk -F',' '{print NF}'Search for places (restaurants, cafes, etc.) via Google Places API proxy on localhost.
Interact with GitHub using the `gh` CLI. Use `gh issue`, `gh pr`, `gh run`, and `gh api` for issues, PRs, CI runs, and advanced queries.
Create or update AgentSkills. Use when designing, structuring, or packaging skills with scripts, references, and assets.
Start voice calls via the OpenClaw voice-call plugin.
Notion API for creating and managing pages, databases, and blocks.
Gemini CLI for one-shot Q&A, summaries, and generation.
Category:developer