Create LLM Chat Context is a lightweight VS Code extension designed to combine selected files and folders into a structured Markdown document optimized for LLM input.
Instead of manually copying code blocks one by one, simply select your files in the Explorer, right-click, and generate a workspace context file ready for further editing, reviewing and removing unnecessary content, or providing as context to LLM like ChatGPT, Claude, DeepSeek, or Gemini.
✨ Features
📁 Select Files and Folders: Select single or multiple files and folders directly from the VS Code Explorer context menu.
📝 Output to Markdown File: Automatically generates a new .md file, allowing you to review, edit, or adjust the context before sending it to an LLM.
🛡️ Smart Binary Detection: Safely skips binary files (images, audio, compiled binaries) to prevent garbled text in your prompt.
🔒 Safe Markdown Fencing: Dynamically calculates and adapts backtick fences (e.g., ```, ````) to safely wrap code containing backticks without breaking Markdown syntax.
🌲 Excluded Files and Directories: Ignores common system and output directories like .git, node_modules, dist, out, dist, .env, .vercel, .next,and .vscode-test.
🚀 Getting Started
Open the Explorer panel in VS Code.
Hold Ctrl (or Cmd) / Shift and select the files or folders you want to include as LLM context.
Right-click on any selected item and choose Create LLM Chat Context.
A new Markdown file will be opened automatically in your editor.
Review, refine, and copy the context into your chat with your LLM!