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 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/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.
<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="Reviewed on agentmods" width="80" 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.5 | $0.00000 | $0.00669 |
| Sonnet 5.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 2mo 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.
- 2mo 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 (0 stars, last pushed yesterday), 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.
vite-spa-patterns compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| vite-spa-patternslukasrepublic/agentic-foundry | Skill | 0 | yesterday | MIT | A | 0 | Claude Code |
| prism-componenttonone-ai/tonone | Skill | 77 | 23d ago | MIT | A | 43 | Claude Code |
| component-newMuhammadUsmanGM/claude-code-best-practices | Skill | 106 | 13d ago | MIT | A | 45 | Claude Code |
| volt-firmwaretonone-ai/tonone | Skill | 77 | 23d ago | MIT | A | 76 | Claude Code |
| atlas-reporttonone-ai/tonone | Skill | 77 | 23d ago | MIT | A | 44 | Claude Code |
| forge-costtonone-ai/tonone | Skill | 77 | 23d ago | MIT | A | 58 | Claude Code |
| lens-metricstonone-ai/tonone | Skill | 77 | 23d ago | MIT | A | 76 | Claude Code |