vite-proxy-folder-name-conflict

vite-proxy-folder-name-conflict is a skill for Claude Code, Codex from divinevideo/divine-mobile. It costs 132 tokens per session (1,356 once invoked), scanned C, original, MPL-2.0.

A troubleshooting guide for a naming conflict between a Vite frontend folder and a proxy route such as "/api". Vite is a development server and build tool for frontend applications.

In plain words
What is it for?
Use it to diagnose and fix Vite projects where a client folder name overlaps with a configured proxy path.
Why use it?
It explains why existing JavaScript files can return 404 errors or be replaced by HTML when their paths are mistaken for proxied API requests.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: mentions Claude Code; installed under .agents/ (shared by several agents).

Needs its repository: it reads a path above its own folder, which exists only inside the repository. The line is import { usePeople } from '../api/hooks/usePeople.js';.

Good fit Use it to diagnose and fix Vite projects where a client folder name overlaps with a configured proxy path.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/divinevideo/divine-mobile
agentmods
npx agentmods add skills/divinevideo/divine-mobile/vite-proxy-folder-name-conflict

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for vite-proxy-folder-name-conflict

README.md
[![agentmods](https://agentmods.dev/badge/skills/divinevideo/divine-mobile/vite-proxy-folder-name-conflict/github.svg)](https://agentmods.dev/skills/divinevideo/divine-mobile/vite-proxy-folder-name-conflict)
Your own site
<a href="https://agentmods.dev/skills/divinevideo/divine-mobile/vite-proxy-folder-name-conflict"><img src="https://agentmods.dev/badge/skills/divinevideo/divine-mobile/vite-proxy-folder-name-conflict/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for vite-proxy-folder-name-conflict

Your own site · 80×15
<a href="https://agentmods.dev/skills/divinevideo/divine-mobile/vite-proxy-folder-name-conflict"><img src="https://agentmods.dev/badge/skills/divinevideo/divine-mobile/vite-proxy-folder-name-conflict.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 132 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,356 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 2 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00132 $0.01356
Opus 5.5 $0.00053 $0.00542
Sonnet 5.5 $0.00026 $0.00271
Haiku 4.5 $0.00013 $0.00136

Measured 1mo ago against content hash 5e0406cbf19e, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade C, and why

vite-proxy-folder-name-conflict scanned grade C with 2 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Recursive force deletehighDestructive command

rm -rf with a variable or a broad path is one typo away from removing the wrong tree.

1. Clear Vite's cache: `rm -rf node_modules/.vite`

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

- Frontend file serving: `curl http://localhost:5173/services/hooks/usePeople.js` should return JavaScript
.agents/skills/vite-proxy-folder-name-conflict/SKILL.md · 183 lines

How it starts

The opening of the file, as written. The whole thing — 183 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Vite Proxy Folder Name Conflict

Problem

Frontend JavaScript/JSX files return 404 errors even though they exist on disk. The browser console shows errors like:

usePeople.js:1 Failed to load resource: the server responded with a status of 404 (Not Found)
useMedia.js:1 Failed to load resource: the server responded with a status of 404 (Not Found)

The files exist at paths like src/client/api/hooks/usePeople.js, but Vite returns 404 or serves HTML instead of JavaScript.

Context / Trigger Conditions

This issue occurs when ALL of these conditions are true:

  1. Vite dev server with proxy configuration in vite.config.js:

    server: {
      proxy: {
        '/api': {
          target: 'http://localhost:3001',
          changeOrigin: true,
        },
      },
    }
    
  2. Client-side folder with the same name as the proxy path:

    src/client/
    ├── api/           ← Folder name matches proxy path "/api"
    │   ├── client.js
    │   └── hooks/
    │       ├── usePeople.js
    │       └── useMedia.js
    
  3. Imports that resolve to the proxied path:

    // In src/client/pages/Directory.jsx
    import { usePeople } from '../api/hooks/usePeople.js';
    // Vite transforms this to: /api/hooks/usePeople.js
    // This matches the proxy rule and gets sent to backend!
    

Root Cause

Vite's module resolution transforms relative imports to absolute paths. When you import ../api/hooks/usePeople.js from a page, Vite resolves it to /api/hooks/usePeople.js.

The proxy configuration matches paths starting with /api and forwards them to the backend server. Since /api/hooks/usePeople.js starts with /api, it gets proxied to the backend instead of being served as a static file.

The backend doesn't have a route for /api/hooks/usePeople.js, so it returns 404.

Solution

Option 1: Rename the client folder (Recommended)

Rename the conflicting folder to something that won't match the proxy path:

# Rename api to services (or lib, helpers, etc.)
mv src/client/api src/client/services

# Update all imports
find src/client -name "*.jsx" -o -name "*.js" | xargs sed -i '' 's|from.*['"'"'"]\.\.\/api|from "../services|g'

Read the full file on GitHub · 183 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago First seen · 183 lines · 132 tokens per session scan C 5e0406cbf19e

Subscribe to this mod's changes

vite-proxy-folder-name-conflict is a skill published in the GitHub repository divinevideo/divine-mobile (264 stars, last pushed today), licensed MPL-2.0. It adds 132 tokens to every session and 1,356 once invoked, about $0.0005 per session on Opus 5.5. A static security scan graded it C with 2 findings (recursive force delete, makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

Other skills, from other repositories

inspecting-hermes-desktop-dom

Read the live Hermes desktop DOM/CSS over CDP.

NousResearch/hermes-agent · 20 tokens

fixing-motion-performance

Audit and fix animation performance issues including layout thrashing, compositor properties, scroll-linked motion, and blur effects. Use when animations stutter, transitions jank, or reviewing CSS/JS animation performance.

ibelick/ui-skills · 45 tokens

optimize-web-animations

Profile, audit, and optimize frontend page performance with emphasis on animation work, memory-leak risks, long-session slowdowns, CSS animations, canvas/WebGL requestAnimationFrame loops, marquees, skeletons, GSAP/Three/Matter effects, timers, listeners, and observers. Use when the user asks to make animations…

MengTo/Skills · 126 tokens

performance-audit

Performance audit — bundle size, image opt, lazy load, code split, caching, CWV. Deep-dive for /launch-check performance.

me2resh/apexyard · 33 tokens

frontend-testing-debugging

Use when testing, debugging, or making targeted improvements to rendered frontend apps through the Frontend Design Skills or web dev plugin: local dev servers, UI regressions, interaction bugs, console errors, responsive layout, and visual QA. Check whether the Browser plugin is available and use it first when it is…

fcakyon/claude-codex-settings · 76 tokens

weapp-tailwindcss-troubleshoot

A troubleshooting guide for weapp-tailwindcss and its CLI when generated styles, class conversion, builds, or hot reload do not work as expected.

sonofmagic/weapp-tailwindcss · 130 tokens