aboutsummaryrefslogtreecommitdiff
path: root/skills/vfs-path-normalize.json
diff options
context:
space:
mode:
Diffstat (limited to 'skills/vfs-path-normalize.json')
-rw-r--r--skills/vfs-path-normalize.json14
1 files changed, 14 insertions, 0 deletions
diff --git a/skills/vfs-path-normalize.json b/skills/vfs-path-normalize.json
new file mode 100644
index 0000000..b1bc670
--- /dev/null
+++ b/skills/vfs-path-normalize.json
@@ -0,0 +1,14 @@
+{
+ "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"
+} \ No newline at end of file