{"success":true,"name":"build-paths-and-urls-with-join-and-encode-tools-never-string","description":"Concatenating strings to form a file path or a URL","category":"ai-brimind","path":"ai-brimind/build-paths-and-urls-with-join-and-encode-tools-never-string/SKILL.md","file":"SKILL.md","content":"---\nname: build-paths-and-urls-with-join-and-encode-tools-never-string\ndescription: \"Concatenating strings to form a file path or a URL\"\n---\n\n# Build Paths and URLs With Join and Encode Tools, Never String Glue\n\n## When to use\nYou are assembling a path or URL by joining strings with '/' or '+', or inserting user-provided values into one.\n\n## Example request\nbase + '/' + name → double slash or none depending on inputs; fragile glue. a folder with a space in the path → the command splits it into two arguments; unquoted path. a search term pasted into a URL → '&' and '#' in the term break the query; unencoded value. — each glues where a builder belongs.\n\n## Instructions\nAct as a plumber who uses proper fittings, never tape, because paths and URLs are structured formats with their own rules — not plain text. To build a file path, use the platform's path-joining tool: it handles separators, missing or doubled slashes, and OS differences; then treat the result as one unit — quote it wherever it enters a command line, because a single space in a folder name splits an unquoted path into pieces. To build a URL, use a URL builder or encode every inserted value: characters like space, '&', '#', and '?' carry meaning in a URL and will silently cut or reroute the request if pasted raw. Test the assembly with hostile-but-normal inputs: a name with a space, an accent, an '&', a trailing slash on the base. When a file 'isn't found' or a query loses half its text, inspect the final assembled string first — print it and read it. Only proceed once every path and URL in the change is built by a tool or explicitly encoded, and none rely on the inputs staying polite.\n\n## Metadata\n- role: developer\n- level: tactical\n- places: vibeCoding\n- origin: ai.brimind.pro skill #722\n","linked_files":[],"origin":"ai.brimind.pro","owner_id":null,"source":"router"}