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/bluewatercorp/riskmodels_api/cursorrulesgit clone --depth 1 https://github.com/BlueWaterCorp/RiskModels_APIWhat 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.01536 | $0.01536 |
| Opus 5 | $0.00768 | $0.00768 |
| Sonnet 5 | $0.00307 | $0.00307 |
| Haiku 4.5 | $0.00154 | $0.00154 |
Grade A, and why
cursorrules 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 yesterday.
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 — 53 lines — stays where its author put it; the contents beside it link to each section on GitHub.
RiskModels SDK Expert Rules
Discovery Protocol (before any new API client or integration)
Before building or changing any API client (HTTP wrappers, SDK methods, CLI commands, example scripts, or MCP-aligned tools), discover the current contract and provisioning metadata from the live tool surface—not from memory:
- MCP (preferred when the RiskModels MCP server is enabled in Cursor): Call
riskmodels_list_endpointsfirst to load the latest endpoint index (ids, methods, paths, summaries, billing hints). For the endpoints you will implement, follow withriskmodels_get_capability(by capability id) and/orriskmodels_get_openapi_specfor detailed structural information about paths and query parameters. - Repo fallback (always valid): If MCP tools are unavailable in this session, read
OPENAPI_SPEC.yamlandmcp/data/openapi.json(generated/synced from the same contract) before writing code.
Do not ship new client code based only on stale chat context or older snippets. For the full step-by-step workflow, follow the project skill RiskModels API discovery (.cursor/skills/riskmodels-api-discovery/SKILL.md).
Cursor channel: Dynamic MCP tool lists and capability updates are easiest to rely on when Cursor’s Nightly update channel is enabled (Settings → Beta → Update channel → Nightly). The agent cannot toggle this for you; enable it locally if you want on-demand capability refresh behavior.
When writing or editing Python code that calls the RiskModels API, prefer the riskmodels package in this repo at sdk/ (import name riskmodels, distribution riskmodels-py). Do not invent REST paths or wire JSON shapes from memory; align with OPENAPI_SPEC.yaml and SEMANTIC_ALIASES.md after running the Discovery Protocol above.
Canonical math and field names (ERM3)
- Hedge ratios (HR) are dollars of ETF per $1 of stock (
dollar_ratio). Hedge notional ≈position_usd * hr. - Use semantic column names as returned by the SDK (e.g.
l3_market_hr,l3_sector_hr,l3_subsector_hr), not raw V3 wire keys in user-facing tables (l3_mkt_hris normalized away in DataFrames). - Explained risk (ER) values are variance fractions in
[0, 1]. At L3,l3_market_er + l3_sector_er + l3_subsector_er + l3_residual_er ≈ 1. - Sign convention: any HR may be negative (orthogonalization / long ETF leg); most common negatives are often the market factor at L2 or L3 (
l2_market_hr,l3_market_hr). Do not treat a negative sector or subsector HR as automatically wrong. GET /metrics/{ticker}returns numbers under JSONmetrics; the SDK flattens to semantic names. Do not read flatl1_market_hrat the top level of the raw JSON unless mirroring legacy examples.POST /batch/analyzeParquet/CSV long table: wire columnsl1,l2,l3are the three rolling L3 component HR series (market, sector, subsector), not “L1 model / L2 model / L3 model” levels. The SDK renames them tol3_market_hr,l3_sector_hr,l3_subsector_hr.- Portfolio-level hedge ratios in the SDK are holdings-weighted means of per-ticker scalar HRs (same idea as zarr
wmean_*indocs/ERM3_ZARR_API_PARITY.md). This is not a full portfolio optimization; it is explicit client-side aggregation.
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.
- yesterday First seen · 53 lines · 1,536 tokens per session scan A bdf7f9842a47
cursorrules is a cursor rule published in the GitHub repository BlueWaterCorp/RiskModels_API (0 stars, last pushed yesterday), licensed Apache-2.0. It adds 1,536 tokens to every session, about $0.0077 per session on Opus 5. 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.
Other cursor rules, from other repositories
angular-20
This rule provides comprehensive best practices and coding standards for Angular development, focusing on modern TypeScript, standalone components, signals, and performance optimizations.
dev-standard
Apache Superset development standards and guidelines for Cursor IDE.
typescript
Changes to these high-fan-out internals can affect every message, delta, element, or rerun. Keep work in them minimal, and benchmark changes with representative stress-test apps.
coolify-ai-docs
Master reference to all Coolify AI documentation in .ai/ directory.
python_lib
Tips and guidelines specific to the development of the Streamlit Python library, not applicable to scripts and e2e tests.
specs
This directory contains product and tech specs for Streamlit features.