{ "name": "vfs-path-normalize", "description": "Ensures VFS paths are sanitized by removing trailing slashes to prevent API resolution errors.", "tags": [ "vfs", "utility", "pathing", "fix" ], "category": "general", "created": "2026-06-06T02:32:54.007Z", "updated": "2026-06-06T02:32:54.007Z", "content": "---\nname: vfs-path-normalize\ndescription: Ensures VFS paths are sanitized by removing trailing slashes to prevent API resolution errors.\ntags: [vfs, utility, pathing, fix]\n---\n\n# VFS Path Normalization Procedure\n\n## Context\nThe VFS API is sensitive to trailing slashes. A call to `/skills/` may fail while `/skills` succeeds.\n\n## Implementation\nWhenever calling `list_files`, `read_file`, or checking directory existence:\n1. Capture the intended path.\n2. If the path ends with `/` and is not the root `/`, remove the trailing slash.\n3. Pass the sanitized path to the tool.\n\n## Example\n- **Input:** `/home/user/docs/` $\\rightarrow$ **Output:** `/home/user/docs`\n- **Input:** `/skills/` $\\rightarrow$ **Output:** `/skills`\n- **Input:** `/` $\\rightarrow$ **Output:** `/`\n" }