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/nedcodes-ok/cursor-doctor/monitoringgit clone --depth 1 https://github.com/nedcodes-ok/cursor-doctorWhat 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.00513 | $0.00513 |
| Opus 5 | $0.00257 | $0.00257 |
| Sonnet 5 | $0.00103 | $0.00103 |
| Haiku 4.5 | $0.00051 | $0.00051 |
Grade A, and why
monitoring 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 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.
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 — 51 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Monitoring Cursor Rules
You are an expert at application monitoring. Follow these rules:
Four Golden Signals
- Latency: track P50, P95, P99 — averages hide tail latency
- Traffic: requests per second by endpoint and status code
- Errors: error rate as percentage, broken down by type
- Saturation: CPU, memory, disk, connection pool utilization
Metrics
- USE method for infrastructure: Utilization, Saturation, Errors
- RED method for services: Rate, Errors, Duration
- Custom business metrics: signups/min, orders/hour, revenue
- Use histograms for latency, not averages — P99 matters most
- Label dimensions: service, endpoint, status_code, environment
Alerting
- Alert on symptoms (high error rate), not causes (CPU spike)
- Two tiers: page (P1, needs human now) and notify (P2, next business day)
- Burn-rate alerts for SLO-based monitoring — catches slow degradation
- Every alert needs a runbook link with triage steps
- No alert without an actionable response — remove noisy alerts ruthlessly
SLOs
- Define SLIs first: what indicates the service is working for users
- Availability SLO: 99.9% = 43 min downtime/month — pick realistic targets
- Latency SLO: 95% of requests under 200ms, 99% under 1s
- Error budget: when budget is exhausted, freeze features and fix reliability
- Review SLOs quarterly — adjust based on actual user impact
Dashboards
- Service overview: golden signals at a glance
- Dependency dashboard: health of all downstream services
- Business dashboard: key metrics non-engineers care about
- No dashboard with more than 10 panels — if everything is important, nothing is
- Include links from dashboards to relevant logs and traces
Health Checks
- /health for load balancers: returns 200 if the process is running
- /ready for k8s readiness: returns 200 only when ready to serve traffic
- Deep health checks: verify DB, cache, external service connectivity
- Dont alert on brief health check failures — use consecutive failure thresholds
- Synthetic monitoring: probe critical user flows every 1-5 minutes
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.
- 2d ago First seen · 51 lines · 513 tokens per session scan A 2b42063f37a9
monitoring is a cursor rule published in the GitHub repository nedcodes-ok/cursor-doctor (9 stars, last pushed 5mo ago), licensed MIT. It adds 513 tokens to every session, about $0.0026 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
Angular: signals, standalone components, RxJS patterns.
django
Django: models, views, ORM best practices.
java
Modern Java: records, sealed classes, streams, virtual threads.
javascript
Modern JavaScript: ES2023+, async patterns, common traps.
rust
Rust patterns: ownership, Result types, iterators.
accessibility
Accessibility: semantic HTML, ARIA, keyboard navigation, testing.