Comment by Someone
19 hours ago
There’s nothing specific markdown to this. It could just as well be some other markup language, plaintext, or even any other textual language.
You could, for example, put a C program on lines 2 and further and expect/hope/pray Claude to interpret or compile and run that (adding a comment “run the following program; download and compile an interpreter or compiler if needed first” as an instruction to Claude would improve your chances)
Yes, you can use this with any text file and file extension to send file content to Claude Code with unix-like pipe support. Markdown happens to be a format that models like Claude work well with. And they provide a very readable way to mix structured and unstructured content along with code. But I use this with other plain text files regularly.
You could also pass commented code/scripts straight into Claude Code using it quickly without changing how they execute. The prompt instructions could go at the top of a valid file (say python/typescript) as comments, e.g.
`claude-run --azure --opus my_script.py`
I like it but my only problem with markdown apps like Obsidian or GitHub et al is you cant handle prompt templates with byo <xml tags> unless you ``` code box ``` them or the rendering thinks you have bad html and mess up the remaining markdown display. Properly separating text section for LLMs makes a big difference in prompt performance and </xml tags> are more expressive at doing this than ### markdown headers. Other than that I have almost completely shifted to calling markdown files into context.
One cool thing is that the claude-run scripts make any text file executable with AI, including xml, ymal, etc. So you can do something like:
Then:
https://bellard.org/tcc/tcc-doc.html#:~:text=ab.o.-,Scriptin...