Borrowing it
Nothing to install: this file belongs to tysoncung/notion-agent-hub. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/tysoncung/notion-agent-hub/main/.cursorrulesgit clone --depth 1 https://github.com/tysoncung/notion-agent-hubWrote 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/tysoncung/notion-agent-hub/cursorrules)<a href="https://agentmods.dev/rules/tysoncung/notion-agent-hub/cursorrules"><img src="https://agentmods.dev/badge/rules/tysoncung/notion-agent-hub/cursorrules/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/tysoncung/notion-agent-hub/cursorrules"><img src="https://agentmods.dev/badge/rules/tysoncung/notion-agent-hub/cursorrules.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.00437 | $0.00437 |
| Opus 5.5 | $0.00175 | $0.00175 |
| Sonnet 5.5 | $0.00087 | $0.00087 |
| Haiku 4.5 | $0.00044 | $0.00044 |
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 2mo 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.
What it actually says
Cursor Rules for Notion Agent Hub
Project Context
This is an MCP (Model Context Protocol) server that provides Notion integration tools and AI agent workflows. Built with TypeScript, using the MCP SDK for server implementation.
Code Style
- TypeScript strict mode
- ES modules (import/export, .js extensions in imports)
- Zod for input validation
- Functional style preferred over classes
- Descriptive variable names, JSDoc comments on exports
MCP Patterns
- Tools are registered via
server.tool()with Zod schemas - Tool handlers return
{ content: [{ type: "text", text: string }] } - Errors return
{ content: [...], isError: true } - Server uses stdio transport (stdout reserved for MCP)
- All logging goes to stderr via the logger utility
Notion API
- Use @notionhq/client for all Notion operations
- Singleton client via
getNotionClient() - Handle rich_text arrays with
richTextToPlain()/plainToRichText() - Page properties vary by type — check
prop.typebefore accessing - Database queries support filters, sorts, and pagination
File Organization
src/tools/— Individual MCP tools (one per file)src/agents/— Agent workflows that compose toolssrc/queue/— Task queue for Notion DB pollingsrc/utils/— Shared utilities (Notion client, logger)tests/tools/— Vitest unit tests with mocked Notion client
Testing
- Use vitest for testing
- Mock the Notion client in tests (vi.mock)
- Test tool functions directly, not MCP handlers
- Each tool has its own test file
Environment Variables
- NOTION_API_KEY — Required for Notion operations
- NOTION_DATABASE_ID — Default database for task queue
- OPENAI_API_KEY — Optional, for content generation
- BRAVE_API_KEY — Optional, for web search
- LOG_LEVEL — debug | info | warn | error (default: info)
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.
- 2mo ago First seen · 46 lines · 437 tokens per session scan A 69cd3695521c
cursorrules is a cursor rule published in the GitHub repository tysoncung/notion-agent-hub (9 stars, last pushed 7mo ago), licensed MIT. It adds 437 tokens to every session, about $0.0017 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.
cursorrules compared with cursor rules from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| cursorrulestysoncung/notion-agent-hub | Cursor rule | 9 | 7mo ago | MIT | A | 437 | Cursor |
| swift-developmentmadebyaris/rakitui-ai | Cursor rule | 5 | 9mo ago | MIT | A | 0 | Cursor |
| lighter-safetyiamgoatedaf/lighter-mcp | Cursor rule | 2 | 6mo ago | MIT | A | 18 | Cursor |
| nix-securityghuntley/groundhog | Cursor rule | 406 | 1y ago | AGPL-3.0 | A | 489 | Cursor |
| terminal-commandsbrettdavies/cursor-template | Cursor rule | 1 | 1y ago | none | A | 1,291 | Cursor |
| ponytailDietrichGebert/ponytail | Cursor rule | 185k | 8d ago | MIT | A | 604 | Cursor |
| angular-20angular/angular | Cursor rule | 101k | yesterday | MIT | A | 0 | Cursor |