diff --git a/6-ready/claude-virtual-filesystem-guide.md b/6-ready/claude-virtual-filesystem-guide.md index c5fd011..7260975 100644 --- a/6-ready/claude-virtual-filesystem-guide.md +++ b/6-ready/claude-virtual-filesystem-guide.md @@ -729,6 +729,15 @@ Fixed: Passing to @editor for verification. +@seo 07 Jan 2026. 22:30 +Applied SEO improvements to text.md: +- H2 headings: added keywords ("Claude's Sandbox", "Claude File Problems", "Claude File Commands") +- Image alt texts: optimized 7 screenshots with keyword-rich descriptions +- Body text: added target keywords naturally ("claude file creation", "claude sandbox environment") +- First 100 words: added long-tail phrase "where claude saves files" + +Minimal changes, preserves readability. + --- # SEO Optimization diff --git a/assets/claude-virtual-filesystem-guide/text.md b/assets/claude-virtual-filesystem-guide/text.md index 610bafe..f3d6cbf 100644 --- a/assets/claude-virtual-filesystem-guide/text.md +++ b/assets/claude-virtual-filesystem-guide/text.md @@ -1,10 +1,10 @@ Did you know that every Claude conversation runs in its own sandbox container with a real filesystem? Understanding how it works gives you a significant advantage. Without this knowledge, it's easy to lose work or spend time debugging "missing" files that aren't actually missing. -Let me show you what's actually happening under the hood. +Ever wondered where Claude saves files when you ask it to create something? The answer lies in understanding this sandbox environment. Let me show you what's actually happening under the hood. **Note:** File creation requires a paid plan (Pro, Max, Team, or Enterprise). Free users only have access to Artifacts. -## The Filesystem Structure +## Claude's Sandbox Filesystem Structure Here's the thing about Claude's sandbox: it's a proper Ubuntu container with a defined directory structure. Knowing these paths saves debugging time. @@ -28,13 +28,15 @@ When you ask Claude to create a file, it follows a two-step process. First, Clau This is where things get interesting — and where most confusion happens. When Claude uses `present_files`, you end up with two copies of the same file. One in Claude's working directory, one in outputs. This duplication is the source of most confusion around file management. -## Common Problems and How to Solve Them +Understanding this **Claude file creation** process is key to avoiding the "where did my file go?" frustration. + +## Common Claude File Problems and Solutions In simple scenarios, Claude handles files well. But in longer conversations with multiple file operations, things can go sideways. The most common issues are: Claude created a file but didn't copy it to outputs (invisible file), Claude edited the version in `/home/claude/` instead of `/mnt/user-data/outputs/` (changes don't appear), and confusion about which files you shared during the conversation. Don't panic. Once you understand the filesystem layout, fixing these is straightforward. -## Walkthrough: The File Lifecycle in Action +## How Claude Creates Files: Step-by-Step Walkthrough Let me demonstrate with a real example. We'll build a news compilation document and watch exactly how Claude handles the file through multiple edits. @@ -61,7 +63,7 @@ Search for: the funniest AI news from the last two months Here's what happened: -![Claude creates ai-news-compilation.md in /home/claude working directory](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0f1g3jfyvki6zxlt2epv.png) +![Claude file creation: new file appears in /home/claude sandbox directory](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0f1g3jfyvki6zxlt2epv.png) Notice: I deliberately didn't specify where to create the file. Moreover, I hinted to Claude that work on the file would continue through my subsequent requests — this pushes it toward working with an internal file. In practice, this is a common scenario: Claude works with files internally without showing them to the user until completion. As a result, Claude created `ai-news-compilation.md` in `/home/claude/`. The file is NOT visible in the sidebar. @@ -73,7 +75,7 @@ I continued with another request: Now find the most important news about AI image generation for the last two months ``` -![Claude uses str_replace tool to append content to the file](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/mmtyamq5d4r0gh61clvc.png) +![Claude sandbox file editing using str_replace tool](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/mmtyamq5d4r0gh61clvc.png) Claude uses `str_replace` to append content. The file still isn't in the sidebar — it's an internal working file. @@ -81,11 +83,11 @@ Claude uses `str_replace` to append content. The file still isn't in the sidebar What if I want to see the contents? Click the filename in Claude's tool output. -![Clickable filename in Claude's tool output panel](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/caree0wcy94nveatvi8f.png) +![Accessing Claude sandbox files through tool output panel](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/caree0wcy94nveatvi8f.png) The file opens in the sidebar preview panel: -![File preview panel open in sidebar showing internal file](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/s73vumqfpzbcy7zkk2pm.png) +![Claude sandbox file preview - not yet in outputs folder](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/s73vumqfpzbcy7zkk2pm.png) But notice: it's a preview, not an entry in the file list. This file is still in `/home/claude/` and could disappear. @@ -120,7 +122,7 @@ Find the most performant AI coding agent released in the last two months ``` Check the file in sidebar. -![Sidebar shows outdated file version after editing wrong copy](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ezynvzpfasnrcidexbvn.png) +![Claude file creation problem: wrong file edited in sandbox](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ezynvzpfasnrcidexbvn.png) What happened? Claude edited a file in `/home/claude/` — not the one in `/mnt/user-data/outputs/`. If `present_files` was used earlier, both locations have the file. Claude picked the working copy. @@ -136,7 +138,7 @@ Simple solution: move this file from /home/claude to /mnt/user-data/outputs/ (override the existing file) ``` -![File moved to outputs, sidebar now shows updated content](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/q3tecpo2id57n14ax9u9.png) +![Claude file successfully moved to /mnt/user-data/outputs folder](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/q3tecpo2id57n14ax9u9.png) The updated file overwrites the old one. Sidebar now shows all content including the latest addition. @@ -144,7 +146,7 @@ The updated file overwrites the old one. Sidebar now shows all content including What we learned: Claude creates working files in `/home/claude/` by default. Files only appear in sidebar when in `/mnt/user-data/outputs/`. The `present_files` tool creates a copy, resulting in two files. Claude may edit the "wrong" file when duplicates exist. Solution: explicitly move or copy to outputs when needed. -## Quick Reference: Tools and Commands +## Claude File Commands: Quick Reference Claude uses these tools internally: `view` for reading files and directories, `str_replace` for editing content, `create_file` for new files, `bash_tool` for shell commands, and `present_files` for making files downloadable. @@ -166,7 +168,7 @@ Filesystem MCP gives Claude access to your local disk. True persistence, files l But here's the catch. Adding MCP complicates the system: it's no longer enough to say "create a file" or "copy file to folder." You need to be more precise with your commands and clarify which filesystem you mean — the internal sandbox or your local disk via MCP. -Use sandbox for quick explorations. Use MCP for serious projects where files need to persist. +Use the **Claude sandbox environment** for quick explorations. Use MCP for serious projects where files need to persist. The most productive approach — edit files with Claude in its sandbox, then save them to disk: @@ -202,7 +204,7 @@ output the content of that file Claude reads the file: -![Two-tab experiment result showing changed file content](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/jpz4sbc1zhibzht7q1e4.png) +![Claude sandbox shared state: file changes visible across browser tabs](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/jpz4sbc1zhibzht7q1e4.png) The content is "hello claude". Claude in Tab 1 is confused — it doesn't see the modification command in its conversation history, but the file has changed.