← Back to context

Comment by jedwhite

1 day ago

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:

        #!/usr/bin/env claude-run
    
        <instructions>
    
            Analyze this codebase.
    
        </instructions>
    

    Then:

        chmod +x task.xml && ./task.xml