Files to LLM Prompt
Convert your workspace files into well-structured prompts for Large Language Models (LLMs), with special optimization for Claude's XML format.

Features
File Management:
- Interactive file explorer with fuzzy search
- Smart filtering with .gitignore support
- Custom ignore patterns with glob support
- Visual tracking of excluded content
Preview & Output:
- Split-view interface with real-time preview
- Token counting using o200k_base encoder (±15% accuracy)
- Claude-optimized XML format
- One-click copy to clipboard
Screenshots


Requirements
Settings
files-to-llm-prompt.includeHidden: Show files starting with dot (.)
files-to-llm-prompt.overrideGitignore: Show all files, including those in .gitignore
files-to-llm-prompt.includeDirectories: Apply ignore patterns to folders
files-to-llm-prompt.ignorePatterns: Patterns for files and folders to hide from the explorer (e.g., *.log, node_modules)
files-to-llm-prompt.outputFormat: 'default' or 'claude-xml'
files-to-llm-prompt.pathStyle: 'absolute' or 'relative' paths in generated output
files-to-llm-prompt.treeScope: 'workspace' (full tree) or 'selected' (selected-files-only tree)
files-to-llm-prompt.stripPatternsEnabled: Enable custom regex-based content stripping before prompt generation
files-to-llm-prompt.stripPatterns: Regex patterns (one per line) applied sequentially to remove matching content
files-to-llm-prompt.fuzzySearchThreshold: Search sensitivity (0-1, default: 0.6)
Usage
- Open the Files to LLM Prompt sidebar (click the icon in the activity bar)
- Use the file explorer to select files:
- Click files/folders to toggle selection
- Use the search bar to quickly find files
- Use bulk selection buttons in the title bar
- Configure settings in the Settings panel below the file explorer
- Click "Generate Prompt" (available in multiple locations):
- Status bar
- Title bar
- Preview panel
- Preview the generated prompt and copy to clipboard when ready
Claude XML
<documents>
<document index="1">
<source>path/to/file.js</source>
<document_content>
// File contents here
</document_content>
</document>
</documents>
path/to/file.js
---
// File contents here
---
Development & Testing
Running the Extension for Testing
To test the extension during development:
- Quick Start: Press
F5 or go to Run > Start Debugging
- Manual Launch: Open Run and Debug panel (
Ctrl+Shift+D), select "Run Extension", then click play
- Extension Development Host: A new VSCode window will open with
[Extension Development Host] in the title
- Testing: In the Development Host window, you can:
- Access your extension via Command Palette (
Ctrl+Shift+P)
- Test all functionality in real-time
- Check the Extensions view
- Debug Output: Console logs appear in the original window's Debug Console
- Reloading: After code changes, press
Ctrl+R (or Cmd+R on Mac) in the Development Host to reload
Make sure your .vscode/launch.json file is properly configured (automatically created with the Extension template).
- Fuzzy search is optimized with debouncing
- Efficient file filtering system
- Handles workspace changes well
Known Issues
- Very large files/code-bases may impact performance
- File operations (rename/delete) are not provided by this extension's custom file explorer. Use the regular VS Code Explorer for file management.
Contributing
Found a bug or have a feature request? Please open an issue or submit a pull request on our GitHub repository.
| |