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/oolab-labs/patchwork-os/cursorrulesgit clone --depth 1 https://github.com/Oolab-labs/patchwork-osWhat 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.01019 | $0.01019 |
| Opus 5 | $0.00509 | $0.00509 |
| Sonnet 5 | $0.00204 | $0.00204 |
| Haiku 4.5 | $0.00102 | $0.00102 |
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 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
100% identical to cursorrules — 0 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 — 77 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Claude IDE Bridge — Cursor Rules
Build
- Run
npm run buildfor bridge,cd vscode-extension && npm run build && npm run packagefor extension. - Run
npx biome check .before every commit. - Run
npm testbefore every commit. - Always rebuild bridge + extension + VSIX before testing changes.
Tool Pattern
- Create tools using
createXxxTool(deps)returning{ schema, handler }. - Register every tool in
src/tools/index.ts. - Set
extensionRequired: trueif the tool needs the VS Code extension. - Tool names must match
/^[a-zA-Z0-9_]+$/. - Use
readOnlyHint: truein annotations for tools that do not modify state. - Never throw from a tool handler — catch and return
{ content: [...], isError: true }.
Extension Handlers
- Create handlers as standalone async functions.
- Register in
vscode-extension/src/handlers/index.ts. - All
ws.send()calls must usesafeSend()or readyState check + try-catch.
Error Handling
- Tool execution errors: return
isError: truein content blocks. See docs/adr/0004-tool-errors-as-content.md. - Protocol errors: use
ErrorCodes(JSON-RPC -32xxx). Never mix the two. - Never use JSON-RPC error codes in tool handlers.
Input Validation
- All tool arguments are validated by AJV schemas at the transport layer.
- Use
resolveFilePath()for any user-supplied path — blocks null bytes, symlinks, and workspace escapes. - Use
isValidRef()for git ref arguments — blocks leading-dash refs. - Clipboard operations enforce 1MB cap via
Buffer.byteLength. searchAndReplacerejects null bytes and--prefixed glob patterns.
Security
runCommandonly executes allowlisted commands. Interpreter commands (node, python, bash) are permanently blocked.sendHttpRequestblocks private/loopback IPs (SSRF). DNS pre-resolves hostnames. Host header overridden after user headers.- Never include auth tokens, IPs, or domain names in source code or documentation.
- Lock files use
O_EXCLcreation (symlink attack prevention) andchmod 0o600.
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 · 77 lines · 1,019 tokens per session scan A a532bccc3f69
cursorrules is a cursor rule published in the GitHub repository Oolab-labs/patchwork-os (30 stars, last pushed 2d ago), licensed MIT. It adds 1,019 tokens to every session, about $0.0051 per session on Opus 5. A static security scan graded it A with 0 findings. It is 100% identical to cursorrules, differing in 0 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.