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.
git clone --depth 1 https://github.com/SafetyMP/Autonomous-EHS-ManagementWrote 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/safetymp/autonomous-ehs-management/ehs-ims-conventions)<a href="https://agentmods.dev/rules/safetymp/autonomous-ehs-management/ehs-ims-conventions"><img src="https://agentmods.dev/badge/rules/safetymp/autonomous-ehs-management/ehs-ims-conventions/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.
<a href="https://agentmods.dev/rules/safetymp/autonomous-ehs-management/ehs-ims-conventions"><img src="https://agentmods.dev/badge/rules/safetymp/autonomous-ehs-management/ehs-ims-conventions.svg" alt="Reviewed on agentmods" width="80" 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.1 | $0.00722 | $0.00722 |
| Opus 5.5 | $0.00289 | $0.00289 |
| Sonnet 5.5 | $0.00144 | $0.00144 |
| Haiku 4.5 | $0.00072 | $0.00072 |
Grade A, and why
ehs-ims-conventions 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 1mo 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 — 47 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Autonomous EHS — agent & developer conventions
Single system of record
- PostgreSQL + Drizzle is authoritative for commitments, statuses, approvals, and audit-relevant facts.
- Never introduce “TypeScript-only” columns or tables: every schema change needs a Drizzle migration (
npm run db:generate) and a deploy path.
RBAC
- Permission keys live in
src/lib/rbac.ts(PERMISSIONS). New procedures must callassertPermission(or equivalent) with the correct key. - Do not bypass RBAC for “internal” routes; agent/tool callers must use the same checks with a service identity if you add one later.
tRPC
- Routers live under
src/server/trpc/routers/. Register insrc/server/trpc/root.ts. - Prefer clear procedure names:
list,get,create,update,updateStatus— match existing routers (e.g.incident,capa,document). - Mutations that change regulated data should write
audit_logviawriteAuditLogwhere the codebase already does for other entities. - Compliance- or retention-affecting work (incident lifecycle,
data_retention_policy, RAG PII,COMPLIANCE.md,compliance.*routers): follow.cursor/skills/corporate-compliance-data-governance/SKILL.mdand the requestable rule compliance-data-governance.
Drizzle
- Schema:
src/server/db/schema.ts. Match naming and relation patterns already used (enums,updatedAt, FKonDelete). - After editing schema, run
npm run db:generateand commit the new SQL underdrizzle/migrations/.
Tests and risky areas
- Do not change auth session shape, proxy/dashboard auth gating, or env validation without updating Vitest and smoke E2E expectations.
- RBAC matrices and seed scripts: changing
PERMISSIONSrequiresscripts/seed.ts/ migration ofpermissionrows for existing orgs.
AI / LLM (when added)
- Structured outputs: validate model JSON against Zod schemas shared with or mirrored from API inputs — never trust free-form prose into the DB without parsing.
- Tool use: assistants must call typed tRPC or internal server handlers, not ad-hoc SQL or filesystem paths.
- Gateway: route all provider calls through
src/lib/ai/gateway.ts(or successor); no scatteredfetchto model APIs. - Safety: tie expensive AI routes to Upstash rate limits (
src/server/ratelimit.ts). Redact PII in prompts and logs where required. - Human-in-the-loop: do not auto-close investigations, auto-verify CAPA effectiveness, or silently commit regulatory classification without product policy.
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.
- 1mo ago First seen · 47 lines · 722 tokens per session scan A 1fed50f14e92
ehs-ims-conventions is a cursor rule published in the GitHub repository SafetyMP/Autonomous-EHS-Management (7 stars, last pushed 5d ago), licensed Apache-2.0. It adds 722 tokens to every session, about $0.0029 per session on Opus 5.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
vk-org-resolution
VirtualKey org resolution has TWO join chains (Project for application VKs, Owner for personal VKs); vkSelectSQL must COALESCE both or personal VKs silently return NULL org.
rulesforconvex
description: Convex guidelines globs: alwaysApply: true.
convex2
Cursor rule "convex2" from waynesutton/markdown-site, covering convex guidelines, function guidelines, new function syntax, http endpoint syntax and validators.
startup-migration-bounded-work
Production djangostartup migrate must be bounded; never run makemigrations in production.
redis_rate_limiting
Complete guide for implementing Redis-based rate limiting with authentication troubleshooting and FastAPI integration.
nodejs-mongodb-jwt-express-react-cursorrules-promp
description: "Cursor rules for Node.js development with MongoDB, JWT, Express, and React integration." globs: / alwaysApply: false.