web

web is a cursor rule for Cursor from bayesimpact/bayes-platform. It costs 0 tokens per session (2,531 once invoked), scanned A, original, MIT.

Rules for the React web application, including how its user interface should request data and how code should be organised. React is a JavaScript library for building web interfaces.

In plain words
What is it for?
Use them when adding or changing web features, data requests, Redux state, services, or shared API types.
Why use it?
They keep network requests in one consistent path instead of allowing each interface component to call the server directly.

Cursor rule for Cursor

Written for Cursor: installed under .cursor/. Also seen: mentions Cursor.

Good fit Use them when adding or changing web features, data requests, Redux state, services, or shared API types.

Compare 6 cursor rules from other repositories ↓
Install with agentmods
npx agentmods add rules/bayesimpact/bayes-platform/web
Install

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.

Clone the repo
git clone --depth 1 https://github.com/bayesimpact/bayes-platform

Made for: Cursor.

Wrote 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.

agentmods badge for web

README.md
[![agentmods](https://agentmods.dev/badge/rules/bayesimpact/bayes-platform/web/github.svg)](https://agentmods.dev/rules/bayesimpact/bayes-platform/web)
Your own site
<a href="https://agentmods.dev/rules/bayesimpact/bayes-platform/web"><img src="https://agentmods.dev/badge/rules/bayesimpact/bayes-platform/web/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.

agentmods 80×15 button for web

Your own site · 80×15
<a href="https://agentmods.dev/rules/bayesimpact/bayes-platform/web"><img src="https://agentmods.dev/badge/rules/bayesimpact/bayes-platform/web.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 0 Nothing until a file matches its globs; then the whole rule loads.
When invoked 2,531 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00000 $0.02531
Opus 5 $0.00000 $0.01265
Sonnet 5 $0.00000 $0.00506
Haiku 4.5 $0.00000 $0.00253

Measured 2d ago against content hash 90d6a3e7e981, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-16, from the pricing page.

Security

Grade A, and why

web scanned grade A with 1 finding 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 2d 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.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

- The Axios client is centralized in `external/axios.ts`
.cursor/rules/web.mdc · 243 lines

How it starts

The opening of the file, as written. The whole thing — 243 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Cursor Agent Rules for CaseAI Connect - Web

Redux & Feature Architecture

API Calls Must Go Through Redux + Services

Rule: All API calls MUST go through React-Redux thunks, which in turn MUST use the shared services object. React components MUST NOT call the API client (Axios, fetch, etc.) directly.

Requirements:

  • All API calls must use Redux thunks (createAsyncThunk)
  • Thunks call extra.services.{feature} methods only (never axios / fetch directly)
  • Components dispatch thunks, never call API directly
  • API routes and DTOs come from @caseai-connect/api-contracts
  • The Axios client is centralized in external/axios.ts
  • The feature services registry is centralized in external/axios.services.ts and exposed via di/services.ts

Structure:

  • Redux slices: features/{domain}/{domain}.slice.ts
  • Redux thunks: features/{domain}/{domain}.thunks.ts
  • Redux selectors: features/{domain}/{domain}.selectors.ts
  • Axios client: external/axios.ts (singleton Axios with auth interceptors)
  • Services registry: external/axios.services.ts (builds concrete services) and di/services.ts (typed Services + getServices())

Store wiring:

  • store/index.ts:
    • Registers feature reducers under their domain keys (e.g. me, projects, organizations, agents, etc.)
    • Configures thunk.extraArgument with { services: getServices() } (typed as ThunkExtraArg)
    • Middleware and listeners must assume all side-effectful work goes through these services

Feature Service Pattern (SPI + External API + Models)

Rule: Each feature MUST follow the "me" feature architecture as the canonical pattern for defining and organizing objects inside a feature.

Canonical Example (Me Feature):

  • features/me/me.models.ts
    • Defines domain-level types (User, Me, etc.)
    • These are the types slices and components should depend on (not raw DTOs)
  • features/me/me.spi.ts
    • Declares the Service Provider Interface for the feature (IMeSpi)
    • Only exposes domain models (Me) in its API surface
  • features/me/external/me.api.ts
    • Concrete implementation of the SPI using Axios + @caseai-connect/api-contracts
    • Uses satisfies IMeSpi to ensure the implementation matches the SPI contract
    • Performs DTO → domain mapping via small helpers (e.g. fromDto(dto: MeResponseDto): Me)
  • external/axios.services.ts
    • Wires the feature implementation into the global services object:
      • me: meApi (where meApi is the SPI implementation from features/me/external/me.api.ts)
  • di/services.ts
    • Declares the Services type (e.g. me: IMeSpi, projects: IProjectsApi, etc.)
    • Exposes getServices() which returns the concrete services instance
  • features/me/me.thunks.ts
    • Uses createAsyncThunk<Me, void, { state: RootState; extra: ThunkExtraArg }>
    • Accesses the SPI through extra.services.me only
  • features/me/me.slice.ts
    • Stores domain state based on Me / Me["user"] types
    • Handles pending/fulfilled/rejected states of the feature thunks
  • features/me/me.selectors.ts
    • Selectors read from the slice and return domain models, not DTOs

Read the full file on GitHub · 243 lines

Changes

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.

  1. 2d ago First seen · 243 lines · 0 tokens per session scan A 90d6a3e7e981

Subscribe to this mod's changes

web is a cursor rule published in the GitHub repository bayesimpact/bayes-platform (18 stars, last pushed yesterday), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 2,531 tokens. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-14.