VirtualTabs – VS Code Extension for Virtual Tabs & Custom File Grouping

繁體中文 | English

🚀 What is VirtualTabs?
VirtualTabs is a VS Code extension that provides custom "Virtual File Directories" outside of your native file system. Unlike standard directories, VirtualTabs helps you create independent logical file groups based on your current development theme, while also providing AI-Ready Coding Context for quick copying. It is perfectly suited for Monorepo projects or large-scale applications using MVVM or MVC architectures.
⚡ VirtualTabs vs. Native VS Code Tabs
| Feature |
Native VS Code Tabs |
VirtualTabs Extension |
| Persistence |
Cleared on session close |
Saved permanently per workspace |
| Grouping |
Folder-based only |
Logic-based (Cross-directory support) |
| AI Context |
Hard to gather manually |
One-click context generation for LLMs |

🧩 Solving Modern Workflow Pain Points
In MVC/MVVM or large-scale projects, related files are often scattered across deep directory structures, making switching a repetitive chore:
❌ Traditional File Structure:
├── config.json (Root Config)
├── styles/theme.css (Style Layer)
├── src/components/ (View Layer)
├── tests/__tests__/ (Testing Layer)
✅ Theme-Based Virtual Directory:
📁 Feature: Theme System
├── 📁📚 Configuration
│ └── config.json
├── 📁📚 Style Definitions
│ └── theme.css
├── 📁📚 Components (View Layer)
│ └── ThemeProvider.tsx
│ └── 🔖 Line 45: Context setup
└── 📁📚 Unit Tests (Logic/Testing)
│ └── theme.test.ts
🤖 Born for AI Collaboration
In the era of Copilot and LLMs, precise context is the key to high-quality results:
- Curated Selection: Create groups with only the files relevant to your current task.
- One-Click Export: Convert entire groups into AI-friendly Markdown blocks (v0.3.0).
- Reduced Noise: Isolate core logic to help AI focus and prevent hallucinations.
- Persistent Context: Your curated AI prompts and file sets stay ready even after a restart.
"VirtualTabs helps me define the exact boundary of what the AI should see."
✨ Key Features
Core Capabilities
- 📁 Cross-Directory Grouping — Organize files from anywhere, breaking free from folder constraints
- 🔖 Task-Oriented Bookmarks — Mark specific lines of code within your groups for quick navigation
(v0.2.0)
- 📂 Sub-Groups & Nesting — Create hierarchical structures for better organization
(v0.3.0)
- 🤖 AI Context Export — One-click copy all files as LLM-ready context
(v0.3.0)
- ▶️ Script Execution — Inline run button for
.bat and .exe files (v0.3.2)
- 💾 Portable Config — Settings saved to
.vscode/virtualTab.json for team sharing (v0.3.2)
- 🔌 AI Agent Integration (MCP) — Connect AI agents (Cursor, Copilot, Claude, Kiro, Antigravity) to manage your groups programmatically via the Model Context Protocol
(v0.4.0)
⚡ Workflow Boosters
- 📋 Smart Copy Menu — Unified copy options for files and groups
(v0.3.0)
- 📁 Directory Drag & Drop — Drag folders to add all files recursively
(v0.3.0)
- ✂️ Full Clipboard Operations — Cut/Copy/Paste support for files and groups
(v0.3.0)
- ⇵ Group Reordering — Easily move groups up and down via context menu
(v0.3.2)
- 📊 Smart Organization — Auto-group by extension, date, or sort by various criteria
⚡ Latest Highlights
v0.4.0 brings full AI agent integration — let your AI assistant manage VirtualTabs groups directly:
🔌 MCP Server Integration — A fully bundled MCP server (dist/mcp/index.js) ships with the extension, exposing 15+ tools for AI agents to create groups, manage files, handle bookmarks, and explore the project.
🛡️ Agent Skill Generation — One command generates a tailored skill file for your AI tool (Cursor .mdc, or SKILL.md for Copilot, Claude, Antigravity, Kiro). Includes a four-layer safety decision tree and a CRITICAL CONCEPT warning that VirtualTabs groups are purely virtual — no files are ever moved on disk.

⚙️ MCP Config Panel — Get ready-to-paste MCP server configuration for your AI tool with a single click.
📦 Bundled CLI Fallback (vt.bundle.js) — A self-contained CLI co-located with each generated skill file provides a last-resort editing path when MCP tools are unavailable.
MCP Configuration in Your IDE — Setup for Each AI Agent
| Cursor |
Antigravity (Google) |
Kiro |
 |
 |
 |
| Configure MCP in Cursor settings |
Configure MCP in Antigravity environment |
Configure MCP in Kiro IDE |
Use the MCP Config Panel (command: VirtualTabs: Show MCP Config) to generate ready-to-paste configuration for your chosen AI tool.
v0.3.6 introduced powerful multi-select copy & system improvements:

- 🎯 Multi-select Copy Support (Core Update) — Select multiple files or groups and copy everything at once.
- One-click copy for: File Names, Relative Paths, and Absolute Paths.
- Enhanced "Copy Context for AI" handles mixed selections (files + groups + bookmarks) with automatic content deduplication.
- 🎨 Smart Unified Menu — Replaced redundant menus with a single, intelligent copy submenu.
- 🔧 Enhanced Reliability — Implemented robust cycle detection and improved type safety using
instanceof checks for smoother performance in large projects.
v0.3.3 enhanced user experience:
- ⚙️ Configurable Confirmations — Toggle delete confirmation dialogs via settings.
- 🌍 Better i18n — Fully localized messages for English, Traditional Chinese, and Simplified Chinese.
🚀 Quick Start
Installation
- Open VS Code
- Press
Ctrl+Shift+X (or Cmd+Shift+X)
- Search for VirtualTabs and click Install
First Time Setup
- Click the VirtualTabs icon in the Activity Bar (left sidebar)
- Right-click in the panel → Create New Group
- Drag files from Explorer into your group
📖 User Guide
📁 Group Management
- Create/Rename: Right-click panel or groups to manage.
- Sub-Groups: Right-click a group → Add Sub-Group (or drag one group into another) to create nested structures.
- Auto-Sync: The built-in "Open Editors" group automatically tracks your open tabs.
- Open/Close All: Includes files in sub-groups recursively.
- Drag & Drop:
- Files: Drag files from Explorer into groups.
- Folders: Drag folders to recursively add all files inside.
- Multi-select: Hold
Ctrl/Cmd to select multiple files to drag at once.

🔖 Task-Oriented Bookmarks (v0.2.0)
- Right-click any line of code → Add Bookmark to VirtualTabs
- The bookmark appears nested under the file in your group.
- Click to jump instantly to that exact line.
- Edit label/description to document why this line is important.

🤖 AI Context Export (v0.3.0)
The "Killer Feature" for LLM workflows.
- Setup a group with all relevant files for your current task.
- Right-click the group → Copy... → Copy Context for AI.
- Paste into ChatGPT/Claude.
- Smart: Binary files are skipped. Large files (>50KB) are opened for review.
- Clean: All code is formatted in markdown blocks with file paths.

Everything you need in one place. Right-click any file or group:
- Copy Name/Path: Standard path copying.
- Copy Context: Get the code content.
- Multi-select: Select 5 files → Copy Paths → Get a list of 5 paths.
📊 Sorting & Organization
- Sort: Right-click group → Sort Files (Name, Path, Extension, Date).
- Auto-Group: Right-click group → Auto Group by Extension/Date.
- Reorder: Use Right-click → Move Up/Down to manually order groups.
🎯 Use Cases
- Monorepo Management: Group related configs and logic across multiple packages.
- Architecture-Oriented Dev: Organize by logic layers (MVC/MVVM) rather than physical disk paths.
- AI Context Curation: Build precise file sets for LLMs to maximize prompt accuracy.
- Code Review (CR): Centralize all changed files for a specific feature for efficient review.
- Micro-Tutorials: Create curated code paths for onboarding or technical reference.
💡 Best Practices
- Group by Task, Not Folder: Think about what you're working on, not where files live
- Use Sub-Groups: Organize large groups with nested structure (v0.3.0)
- Use Bookmarks for Logic Flow: Mark key decision points in your code
- Create AI Context Groups: Group 5-10 files for focused AI assistance
- Export Before Prompting: Use "Copy Context for AI" before asking LLMs
- Review and Refine: Periodically clean up unused groups to stay organized
❓ FAQ
Q1: I don't see the VirtualTabs panel?
Check:
- The extension is enabled
- Your VS Code version is 1.75+
- VirtualTabs has its own icon in the Activity Bar (left sidebar)
Q2: How do I create sub-groups?
Right-click any group → Add Sub-Group. You can also drag a group onto another group to nest it.
Q3: How does "Copy Context for AI" work?
It reads all files in the group (including sub-groups), formats them as markdown code blocks, and copies to clipboard. Binary files are automatically skipped.
Q4: Can I share my groups with my team?
Currently, groups are saved in workspaceState (local) or .vscode/virtualTab.json (shareable). v0.3.2 introduced support for .vscode storage!
Q5: Do bookmarks work across file renames?
Yes! Bookmarks track file paths and will update if you rename files within VS Code.
Q6: How do I drag folders into groups?
Simply drag a folder from the Explorer panel onto a group. VirtualTabs will automatically add all files recursively, skipping the directory entry itself.
🤝 Contributing
We welcome community contributions!
🔧 For Developers
Interested in code contributions? Please check DEVELOPMENT.md for:
- Environment setup
- Debugging & publishing guide
- Module structure
- Common error troubleshooting
🤝 Recommended Companion
🔥 Quick Prompt
The perfect partner for VirtualTabs.
While VirtualTabs organizes your Context (Files), Quick Prompt organizes your Instructions (Prompts).
- VirtualTabs: Defines where the AI should look (File Groups).
- Quick Prompt: Defines what the AI should do (Prompt Management).
Together, they create the ultimate AI-coding workflow.
Get Quick Prompt on VS Code Marketplace | Open VSX Registry
📅 Changelog
👉 See CHANGELOG.md for full release history.
✅ v0.4.0 (Latest)
- 🔌 MCP Server — Bundled MCP server enabling AI agents to manage groups via the Model Context Protocol
- 🛡️ Agent Skill Generation — Generates target-specific skill files for Cursor, Copilot, Claude, Kiro, and Antigravity
- ⚙️ MCP Config Panel — One-click config snippet for every supported AI client
- 📦 Bundled CLI Fallback — Self-contained
vt.bundle.js as a last-resort editing path when MCP is unavailable
v0.3.6
- 🎯 Multi-select Copy Support — All copy commands now support selecting multiple files/groups
- 🎨 Unified Copy Menu — Consolidated 4 duplicate submenus into one smart menu
- 🔧 Enhanced Reliability — Improved type safety with
instanceof checks and Set-based cycle detection
- 🐛 Bug Fixes — Fixed command namespace conflicts and bookmark context handling
❤️ Support
If you find this extension helpful, please consider supporting the development!

📄 License
Licensed under MIT License. Free for personal and commercial use.
Organize smarter, code faster. 🚀