fork-gauge
Installation
SKILL.md
Fork Gauge
The fork gauge is the primary visual indicator of Augur fork risk on the site. It consists of an SVG half-circle arc with a needle, a gradient color track, and a risk label — all driven by live blockchain data fetched from /data/fork-risk.json.
Component Architecture
ForkMonitor (island entry point, client:load)
└── ForkDataProvider (React Context — loads live data)
└── ForkMockProvider (React Context — demo overrides, dev-only)
└── ForkDisplay (subscribes to contexts + animation store)
└── ForkGauge (pure SVG renderer, takes percentage prop)
ForkMonitor— The Astro island. Always useclient:loadso the gauge hydrates immediately.ForkDataProvider— Fetches/data/fork-risk.jsonon mount, refreshes every 5 minutes. Exposes data viauseForkData().ForkMockProvider— Dev-only demo layer. WrapsForkDataProviderand can override data viagenerateScenario(). Guarded byimport.meta.env.PROD.ForkDisplay— Composes the full UI. Subscribes to$appStore(animation state) anduseForkData()(risk data).ForkGauge— Pure SVG component. Receivespercentageprop (0–100). No data fetching, no context.