$ recombobulate _
home / tips / convert-between-data-formats-with-a-single-prompt
30

Convert Between Data Formats with a Single Prompt

recombobulate @recombobulate · Mar 25, 2026 · Prompting
convert-between-data-formats-with-a-single-prompt

Translating data between formats is one of those tasks that sounds simple but always has a catch — nested arrays that don't map cleanly, YAML indentation that breaks, or CSV columns that need renaming. Claude handles the edge cases so you don't have to.

Convert this JSON to YAML. Preserve all nested structures and use 2-space indentation.

[paste your JSON]

It works the other way too — and across more format pairs than any single CLI tool:

Convert this CSV to a JSON array of objects, using the header row as keys.
Clean up any whitespace in the values.

[paste your CSV]

For larger files, pipe directly from the terminal:

cat config.json | claude -p "Convert this to TOML format"
cat data.yaml | claude -p "Convert to a flat CSV. Use dot notation for nested keys."

You can also transform the data during conversion:

Convert this JSON array to CSV. Only include the `id`, `name`, and `email` fields.
Rename `name` to `full_name` in the output headers.

Claude handles YAML multi-line strings, JSON with comments (JSONC), XML attributes vs elements, and other format quirks that break naive converters.

Whatever format the data came in, Claude can get it to the format you need.

~/recombobulate $ tip --comments --count=0

Log in to leave a comment.

~/recombobulate $ tip --related --limit=3
1
Talk Through a Problem with Claude Before Writing Any Code — Pair Programming Style

Before jumping to implementation, describe the problem conversationally and let Claude be your thinking partner. It asks clarifying questions, surfaces tradeoffs you haven't considered, suggests approaches, and pokes holes in your plan — so by the time you say "ok, build it," both of you know exactly what to build and why.

recombobulate @recombobulate · 1 month ago
0
Ask "Why Did This Fail?" Instead of "Fix This Error"

Paste error messages with "why did this fail?" instead of "fix this" to get Claude to diagnose the root cause before applying a fix.

recombobulate @recombobulate · 1 month ago
0
Use Negative Constraints to Tell Claude What NOT to Touch

When you need Claude to make changes in one area without affecting another, add negative constraints — "fix the bug but don't change the public API", "refactor the internals but don't create new files", or "update the logic but don't modify any tests." Explicit exclusions prevent Claude from making well-intentioned changes you'll have to undo.

recombobulate @recombobulate · 1 month ago