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/chand1012/cursorrules/supabase-edge-functionsgit clone --depth 1 https://github.com/chand1012/cursorrulesWhat 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.00000 | $0.01039 |
| Opus 5 | $0.00000 | $0.00519 |
| Sonnet 5 | $0.00000 | $0.00208 |
| Haiku 4.5 | $0.00000 | $0.00104 |
Grade A, and why
supabase-edge-functions 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.
This is a copy
94% identical to coding-rules-for-supabase-edge-functions — 5 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.
How it starts
The opening of the file, as written. The whole thing — 116 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Writing Supabase Edge Functions
You're an expert in writing TypeScript and Deno JavaScript runtime. Generate high-quality Supabase Edge Functions that adhere to the following best practices:
Guidelines
- Try to use Web APIs and Deno’s core APIs instead of external dependencies (eg: use fetch instead of Axios, use WebSockets API instead of node-ws)
- If you are reusing utility methods between Edge Functions, add them to
supabase/functions/_sharedand import using a relative path. Do NOT have cross dependencies between Edge Functions. - Do NOT use bare specifiers when importing dependecnies. If you need to use an external dependency, make sure it's prefixed with either
npm:orjsr:. For example,@supabase/supabase-jsshould be written asnpm:@supabase/supabase-js. - For external imports, always define a version. For example,
npm:@expressshould be written asnpm:[email protected]. - For external dependencies, importing via
npm:andjsr:is preferred. Minimize the use of imports from @deno.land/x,esm.shand @unpkg.com. If you have a package from one of those CDNs, you can replace the CDN hostname withnpm:specifier. - You can also use Node built-in APIs. You will need to import them using
node:specifier. For example, to import Node process: `import process from "node:process". Use Node APIs when you find gaps in Deno APIs. - Do NOT use
import { serve } from "https://deno.land/[email protected]/http/server.ts". Instead use the built-inDeno.serve. - Following environment variables (ie. secrets) are pre-populated in both local and hosted Supabase environments. Users don't need to manually set them:
- SUPABASE_URL
- SUPABASE_ANON_KEY
- SUPABASE_SERVICE_ROLE_KEY
- SUPABASE_DB_URL
- To set other environment variables (ie. secrets) users can put them in a env file and run the
supabase secrets set --env-file path/to/env-file - A single Edge Function can handle multiple routes. It is recommended to use a library like Express or Hono to handle the routes as it's easier for developer to understand and maintain. Each route must be prefixed with
/function-nameso they are routed correctly. - File write operations are ONLY permitted on
/tmpdirectory. You can use either Deno or Node File APIs. - Use
EdgeRuntime.waitUntil(promise)static method to run long-running tasks in the background without blocking response to a request. Do NOT assume it is available in the request / execution context.
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 · 116 lines · 0 tokens per session scan A 25a6dd4b1f37
supabase-edge-functions is a cursor rule published in the GitHub repository chand1012/cursorrules (13 stars, last pushed 9mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,039 tokens. A static security scan graded it A with 0 findings. It is 94% identical to coding-rules-for-supabase-edge-functions, differing in 5 lines, and is treated as a copy.
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.