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 rules/dmenchaca/webflow-to-react/marketing-global-effectsgit clone --depth 1 https://github.com/dmenchaca/webflow-to-reactWrote 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/dmenchaca/webflow-to-react/marketing-global-effects)<a href="https://agentmods.dev/rules/dmenchaca/webflow-to-react/marketing-global-effects"><img src="https://agentmods.dev/badge/rules/dmenchaca/webflow-to-react/marketing-global-effects.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 | $0.00000 | $0.00508 |
| Opus 5 | $0.00000 | $0.00254 |
| Sonnet 5 | $0.00000 | $0.00102 |
| Haiku 4.5 | $0.00000 | $0.00051 |
Grade A, and why
marketing-global-effects 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 3d 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.
What it actually says
Global effects live in MarketingSiteRoot
This project replaced Webflow's jQuery-based runtime with React hooks. All cross-cutting side effects (touch detection, tooltips, iframe resize, keyboard shortcuts, Rive animations) are centralized in MarketingSiteRoot.tsx on a single container ref.
Do
- Add new global-effect hooks to
src/hooks/with auseFoonaming pattern. - Wire them in
MarketingSiteRootnext to the existing hooks. - Keep hooks idempotent and have them clean up on unmount (return teardown from
useEffect). - Accept a
containerRefif the hook needs DOM scope; usedocument-scoped listeners only when truly global. - Give
MarketingSiteRoot's divclassName="contents"so the wrapper doesn't affect layout.
Don't
- Don't attach global event listeners (
window.addEventListener) from inside section components — it's hard to trace, easy to leak. - Don't replicate the same effect across multiple sections. Promote to
MarketingSiteRoot. - Don't forget cleanup — React 19 + StrictMode will surface leaks by double-invoking effects in dev.
Typical hooks in this project
useTouchClass— toggles.touchon root based on(pointer: coarse).useKeyboardShortcuts(containerRef)— global hotkeys scoped to the marketing tree.useTestimonialIframeResize— listens forpostMessageto resize embedded iframes.useRelumeTooltips— attaches shadcn tooltips to legacy Relume tooltip markup.useRiveAnimations(containerRef)— plays Rive artboards with IntersectionObserver.
Section-level vs global
| Use case | Where it lives |
|---|---|
| A scroll reveal for one section | The section itself (AnimatedBlock / whileInView) |
| Local tab/accordion state | The section itself |
| Tooltip detection across the tree | MarketingSiteRoot hook |
| Keyboard shortcuts that navigate sections | MarketingSiteRoot hook |
| Iframe resize for testimonial widget | MarketingSiteRoot hook |
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.
- 3d ago First seen · 42 lines · 0 tokens per session scan A 6076ae7e5bea
marketing-global-effects is a cursor rule published in the GitHub repository dmenchaca/webflow-to-react (27 stars, last pushed 2mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 508 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
this is a simple react and vite project that allows users to manage a JSON file on their computer with a nice UI.
nextjs
Next.js 16 App Router Standards & Constraints.
react-components
Rules for writing React components in this project.
react-best-practices
USE WHEN: Designing React components, implementing hooks, and managing component lifecycles.
CreateStorybookStories
This document provides instructions for generating Storybook stories for React components in the Social Bristol project.
NewComponent
This rule provides instructions for creating a new React component in the Social Bristol project.