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/safetymp/autonomous-ehs-management/ehs-ims-conventionsgit clone --depth 1 https://github.com/SafetyMP/Autonomous-EHS-ManagementWhat 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.00722 | $0.00722 |
| Opus 5 | $0.00361 | $0.00361 |
| Sonnet 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 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 — 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.
- 2d 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 (5 stars, last pushed 2d ago), licensed Apache-2.0. It adds 722 tokens to every session, about $0.0036 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
write
Writing style guide with AI detection avoidance. For tweets, LinkedIn, blogs, READMEs, commits. Activate with @write.
go-conventions
Go conventions for all Go code (modules, naming, errors, logging, metrics).
cursorrules
When the user asks about nist rmf, use nist-rmf-ai-mcp tools: assessriskprofile, mapaiimpact, generateriskcontrols, crosswalktoeuaiact, createriskreport.
readme-best-practices
README Best Practices - enforces high-quality README patterns when creating or editing README files.
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.