Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add skills/lukasrepublic/agentic-foundry/vite-spa-patternsnpx skills add lukasrepublic/agentic-foundry --skill vite-spa-patternsgit clone --depth 1 https://github.com/lukasrepublic/agentic-foundryWrote 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.
[](https://agentmods.dev/skills/lukasrepublic/agentic-foundry/vite-spa-patterns)<a href="https://agentmods.dev/skills/lukasrepublic/agentic-foundry/vite-spa-patterns"><img src="https://agentmods.dev/badge/skills/lukasrepublic/agentic-foundry/vite-spa-patterns.svg" alt="Measured on agentmods" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00000 | $0.01673 |
| Opus 5 | $0.00000 | $0.00837 |
| Sonnet 5 | $0.00000 | $0.00335 |
| Haiku 4.5 | $0.00000 | $0.00167 |
Grade A, and why
vite-spa-patterns scanned grade A with 0 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 5d 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.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 79 lines — stays where its author put it; the contents beside it link to each section on GitHub.
When to trigger
- Implementing a spec that names a Vite + React SPA change.
- Adding or modifying a route in the SPA (auth-gated by default).
- Authoring build-config changes in
vite.config.ts. - Env-handling decisions: which variables need
VITE_prefix; distinguishing public vs. server-only values. - Code-splitting boundary decisions (lazy-loading a new feature module).
- Debugging a Vite build issue — chunk size warnings, tree-shaking problems, env-var not injected.
Procedure
-
Determine route type: default is auth-gated. A public route is an exception that requires an explicit decision recorded in the spec. If in doubt, gate it.
-
Place the route file per the routing-library convention the project uses. Follow the existing router setup in the package's
src/router/(or equivalent) before introducing a new pattern. -
Lazy-load the route via dynamic import to enforce code-splitting boundary:
const MyPage = lazy(() => import('./pages/MyPage'))wrapped in<Suspense fallback={<LoadingSpinner />}>. Every route is lazy-loaded unless it is the top-level app shell. -
Env access via
import.meta.env.VITE_*(neverprocess.env— Vite does not exposeprocess.envby default). Variables without theVITE_prefix are only available at build time invite.config.ts; they are NOT injected into the client bundle. Secret values (API keys, tokens) must NEVER use theVITE_prefix — they become part of the public bundle. -
Build-config changes go in
vite.config.tsat the package root. Document every config addition with a one-line comment explaining why. Do not add plugins speculatively. -
Build verification + lint + typecheck: confirm the package builds cleanly with
{{ profile.static_validation.build }}from the project root, scoped to the target package, and run lint + typecheck before marking the PR ready.
Dependency installation
Default command for population on a fresh worktree or after a git pull that includes a lockfile change: npm ci — lockfile-respecting, deterministic install. Run from the project root. This is the form CI workflows and Dockerfiles use. The bare npm install form is acceptable only when the lockfile is known-stale or for the initial devcontainer bootstrap; for the per-PR verifier flow, npm ci is the default.
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.
- 5d ago First seen · 79 lines · 0 tokens per session scan A 953938febbd8
vite-spa-patterns is a skill published in the GitHub repository lukasrepublic/agentic-foundry (1 stars, last pushed today), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,673 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other skills, from other repositories
react-forge
Generate production-ready React components with React Query, design tokens, and enterprise standards.
migrate
Code migration assistant — upgrade frameworks, convert languages, modernize patterns.
frontend-standards
MVVM architecture standards for React/TypeScript frontends with TanStack ecosystem, TailwindCSS, and Shadcn UI.
frontend-scaffolding
Scaffolds React/TypeScript frontend components with MVVM architecture.
create-site
Creates a new Power Pages code site (SPA) using React, Angular, Vue, or Astro. Guides through the full process from initial concept to deployed site: requirements discovery, scaffolding, component planning, design, implementation, validation, and deployment. Use when the user wants to create, build, or scaffold a new…
vercel-react-best-practices
React and Next.js performance optimization guidelines from Vercel Engineering. This skill should be used when writing, reviewing, or refactoring React/Next.js code to ensure optimal performance patterns. Triggers on tasks involving React components, Next.js pages, data fetching, bundle optimization, or performance…