From a5023e61be61f2f2287342039addab6bb28ad2fd Mon Sep 17 00:00:00 2001 From: Agando Date: Thu, 4 Jun 2026 06:01:04 +0200 Subject: auto: 2026-06-04_06:00 changes --- skills/localize-external-assets.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 skills/localize-external-assets.md (limited to 'skills/localize-external-assets.md') diff --git a/skills/localize-external-assets.md b/skills/localize-external-assets.md new file mode 100644 index 0000000..b7a1c9b --- /dev/null +++ b/skills/localize-external-assets.md @@ -0,0 +1,18 @@ +--- +name: localize-external-assets +description: Downloads external JS/CSS assets to the VFS to bypass server-side security restrictions on external scripts. +tags: [security, assets, vfs, localization] +category: system +--- + +### Logic +1. Identify external URLs in the target HTML/CSS. +2. Use the `download ` command to save these files into a local `/assets/` directory. +3. Update the HTML file to reference local paths (e.g., `src="https://cdn..."` $\rightarrow$ `src="/assets/..."`). + +### Implementation Steps +1. **Scan**: Read the file and extract all `src` and `href` attributes pointing to external domains. +2. **Prepare**: Create an `/assets/` directory if it doesn't exist. +3. **Fetch**: Execute `download ` for every identified external dependency. +4. **Patch**: Use `write_file` to replace the remote URLs with the local VFS paths. +5. **Verify**: Confirm the file is successfully updated and assets are present in the VFS. -- cgit v1.2.3