Blogmark
Ask an LLM to anonymize command output or code snippets
via jbranchaud@gmail.com
I write a lot of TILs. My source of inspiration for those micro-posts varies. Sometimes it's related to a side project or a feature someone posted about or maybe I happen to find something interesting while reading through a manpage.
More often than not though, the problems I run into and solutions I come up with while working on client projects end up being the main source of inspiration. Usually the thing I've learned is generic enough or applies to other things I'm already thinking about, that it is easy to write a post as is.
Sometimes the context or command output that really drives home the TIL is a little too tied to specifics like filenames and domain concepts. Though there is no risk of exposing IP in any of the TIL writing I do, I still like to translate those examples to something completely anonymous. This usually involves me racking my brain and then manually translating all the pieces.
This is a good place where an LLM can help with my writing without touching any of my prose.
Here is an example of a prompt that I used recently to do that:
In @claude-code/ask-an-agent-to-fix-merge-conflicts.md, can you do a light rewrite of the response from claude that appears in the code block to basically translate the project concepts and filenames referenced to some fictionalized project as a way of anonymizing that output so that I can publish this publicly?
It translated the example (in this TIL) to some other domain that was still coherent, fit with the context of the command and its output, but was completely divorced from the original project context.