Vite · apply by default
/vite-assets
Fix asset paths, public files, base paths, and deployment paths
Use for missing assets or wrong emitted URLs; vercel-routing handles platform rewrites.
Make it your own.
In Claude Code, use the slash command and add your context. In Codex, select vite-assets from the just-vibe skill picker, then send the same brief.
Version 0.11.0 also supports /jv vite-assets, /just-vibe vite-assets and /jv:vite-assets in Claude. See shortcut setup and context examples.
/just-vibe:vite-assets Fix images that work locally but fail when hosted under a subpath./just-vibe:vite-assets Fix a font referenced from CSS that returns 404 once the app is served under /app/./just-vibe:vite-assets Inspect source paths without deployment access; separate build evidence from live serving.What the agent does
- Resolve the actual mode, root, base path and deployment routing. Trace each failing URL from an imported asset, public file, CSS reference or runtime string to emitted output; compare dev and production behavior.
- Repair the owning URL construction using supported installed-version semantics. Keep case-sensitive paths, hashed output and assets consumed by lazy routes distinct; do not fix every route with an unconditional root-relative path.
- Verify root navigation, direct nested navigation, configured subpath base and refresh in a production preview. Check response status and content type: a fallback HTML page with status 200 is still a broken image or module.
Inputs
- broken asset URLs, deployment base path, source assets, and target routes.
Optional context: scope, references, constraints, successCriteria, environment, mode, budget.
Scope
- Reads
- Imported/public assets, URL construction, and base-path handling; no asset redesign.
- Writes
- Apply: only the requested local changes and relevant isolated verification. Inspect/plan requests remain inspection/planning. External actions require their exact action and target in session authorization.
- Mode
- Apply; broken asset URLs, deployment base path, source assets, and target routes.
- Prerequisites
- Project manifests, lockfile, Vite/framework/plugin versions, and existing build scripts. Verify current version-specific documentation when changing configuration. Requested isolated verification may generate disposable build/cache artifacts; inspect their scripts first and preserve product files.
Expected output
- Asset-path patch and production-build/browser verification.
- Source-to-output mapping and root/subpath/nested-route results.
How the work is checked
- Emitted asset URLs resolve under the requested base and nested routes, with correct content types and no reliance on navigation from the root.
When to stop or clarify
- Do not hard-code a development origin or copy secret files into public output. Missing deployment evidence is stated separately.
Handling missing context
- Infer
- Read manifests, lockfile, installed Vite/plugins, entry points, aliases, modes and current build scripts.
- Assume
- Preserve existing tooling and base-path conventions; in apply mode, make a local focused change when the brief identifies the behavior, and otherwise propose it.
- Ask
- Ask if the intended serving subpath or deployment target cannot be inferred and would change generated URLs; do not ask for versions present in the lockfile.
Technical guidance
- Evidence
- Trace imported assets, public files, CSS URLs and runtime-generated paths through base and nested routes.
- Method
- Use the correct asset mechanism for build-time imports versus runtime names; inspect emitted URLs under the deployed base.
- Pitfall
- A leading slash can escape a subpath deployment; a concatenated filename may never enter the build graph.
- Check
- Check direct nested loads, fonts, CSS images and dynamic assets in production output, not only the dev server.
Situational decisions
When runtime concatenation prevents static asset discovery: Use an explicit asset map or supported URL/import pattern appropriate to the installed version.
The coding agent follows this workflow using its available tools. Installation does not grant service access or guarantee an outcome. Read the compatibility notes.