litprompt: a markdown preprocessor for LLM prompts
Read OriginalThis article introduces litprompt, a markdown preprocessor designed for managing LLM prompts as files in a git repository. It addresses common challenges with complex prompts, such as comment-prompt confusion, wasted tokens on commentary, and copy-paste drift across files. litprompt provides two main features: annotated comments that are stripped from the output (using <!-- @ ... -->) and imports that allow including content from other files or remote URLs. It supports transitive imports, YAML frontmatter stripping, and circular import detection. The tool enables developers to keep prompts in pure markdown while adding internal notes, TODOs, and shared fragments, making it suitable for teams treating prompts as software artifacts.
Comments
No comments yet
Be the first to share your thoughts!
Browser Extension
Get instant access to AllDevBlogs from your browser
Top of the Week
No top articles yet