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.
git clone --depth 1 https://github.com/golid-ai/golidWrote 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/rules/golid-ai/golid/frontend-components-advanced)<a href="https://agentmods.dev/rules/golid-ai/golid/frontend-components-advanced"><img src="https://agentmods.dev/badge/rules/golid-ai/golid/frontend-components-advanced.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.00853 |
| Opus 5 | $0.00000 | $0.00426 |
| Sonnet 5 | $0.00000 | $0.00171 |
| Haiku 4.5 | $0.00000 | $0.00085 |
Grade A, and why
frontend-components-advanced 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 8d 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 — 76 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Advanced Component Patterns
Thesis: Browser-only components need Suspense and static DOM wrappers; production components must never ship demo behavior; two raw-
<input>cases are intentional.
Lazy Loading (Browser-Only Components)
Components that use browser APIs (Three.js, WebRTC, canvas) must be lazy-loaded with <Suspense>:
// In the CONSUMER file (e.g., a section or page):
import { lazy, Suspense } from "solid-js";
const Canvas3D = lazy(() => import("~/components/molecules/Canvas3D/Canvas3D")
.then(m => ({ default: m.Canvas3D })));
// Usage — Suspense is REQUIRED or the component silently renders nothing:
<Suspense>
<Canvas3D />
</Suspense>
Inside the lazy component, if onMount appends DOM nodes (e.g., containerRef.appendChild(canvas)), the return JSX must include a static wrapper div — not just a Switch/Match. Without a static element, onMount may not fire:
// GOOD — static div always in DOM, conditional content inside
<div ref={containerRef} class="relative w-full h-full">
<div class="absolute inset-0 pointer-events-none"
style={{ display: loading() || error() ? undefined : "none" }}>
<Switch>
<Match when={loading()}><Spinner /></Match>
<Match when={error()}><ErrorText /></Match>
</Switch>
</div>
</div>
// BAD — Switch as only child can prevent onMount from firing
<div ref={containerRef}>
<Switch>
<Match when={loading()}>...</Match>
</Switch>
</div>
Never call onCleanup() after an await — use mutable refs cleaned up in the synchronous onCleanup registered during component creation.
Do NOT
- Import from other atoms inside an atom (that makes it a molecule)
- Use
createSignalfor internal state unless the component is interactive (forms, toggles) - Use inline styles — use Tailwind classes
- Create a raw HTML element when a component exists (
<select>→ use<Select>,confirm()→ use<DestructiveModal>) - Use
lazy()without a<Suspense>boundary — it silently renders nothing - Build "demo state" (random failures, fake delays, mocked data,
simulateXhelpers) directly into a component that is also used in production. If a component needs a showcase variant, gate the demo behavior on the absence of an integration prop (Show when={hasFiles() && !props.onFilesSelected}) so the demo UI only renders when no callback is wired. The Dropzone bug (9a68b1e) shipped fake "Upload failed" badges on top of real uploads to real users for weeks becausesimulateUpload()rendered alongside the real upload state. Mock data on dedicated showcase routes (e.g.(private)/components/sections/, the/componentsshowcase) is fine — those routes are the showcase, not consumers of one.
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.
- 8d ago First seen · 76 lines · 0 tokens per session scan A e15dcb6f3179
frontend-components-advanced is a cursor rule published in the GitHub repository golid-ai/golid (40 stars, last pushed 2mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 853 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-30.
Other cursor rules, from other repositories
cursorrules
Use the latest version of Shadcn to install new components, like this command to add a button component.
state-management
Use the following stack. Do not introduce or recommend Redux or React Context for shared/global state.
frontend
You are an expert in TypeScript, Node.js, Vite, Vue.js, Vue Router, Pinia, VueUse, Ant Design Vue, and UnoCSS, with a deep understanding of best practices and performance optimization techniques in these technologies.
ui-components-and-icons
Prefer SigNoz UI and icons across frontend code.
tutorial-system-guide
This guide documents the complete tutorial infrastructure in Windmill's frontend, enabling developers to create new interactive tutorials without re-exploring the codebase.
performance
Navigation, caching and PWA contract.