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/jamesjfoong/github-pr-review-mcp/maingit clone --depth 1 https://github.com/jamesjfoong/github-pr-review-mcpWhat 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.01667 | $0.01667 |
| Opus 5 | $0.00834 | $0.00834 |
| Sonnet 5 | $0.00333 | $0.00333 |
| Haiku 4.5 | $0.00167 | $0.00167 |
Grade A, and why
main 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 yesterday.
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 — 214 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Cursor Rules for GitHub PR Review MCP
You are an AI assistant helping develop a GitHub PR Review MCP Server built with TypeScript, FastMCP, and GitHub API.
Project Overview
- Type: Model Context Protocol (MCP) server
- Language: TypeScript (ES2022, strict mode)
- Framework: FastMCP
- Purpose: Provides GitHub PR review capabilities to LLMs in VSCode/Cursor
Core Architecture
File Structure
src/index.ts- Main MCP server entry point (register tools here)src/github-service.ts- GitHub API abstraction layer (all GitHub API calls go here)src/code-analyzer.ts- Code analysis engine (static analysis logic)src/review-prompt.ts- Review prompt generationsrc/types.ts- Zod schemas and TypeScript types (all tool parameters defined here)dist/- Compiled output (NEVER edit directly)
Adding New MCP Tools (3-Step Process)
-
Define Schema and Type in
src/types.ts:// Define schema for runtime validation export const NewToolSchema = z.object({ param1: z.string().describe("Parameter description"), }); // Define explicit type (preferred over z.infer<typeof>) export interface NewToolParams { param1: string; } -
Add Service Method in
src/github-service.ts:async newMethod(params: NewToolParams): Promise<ResultType> { // Use this.octokit for GitHub API calls // Handle errors with try-catch // Return typed result } -
Register Tool in
src/index.ts:server.addTool({ name: "new_tool_name", description: "Clear description", parameters: NewToolSchema, execute: async (params) => { const result = await githubService.newMethod(params); return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }], }; }, });
Code Standards
TypeScript
- Strict mode: Always enabled (no implicit any, strict null checks)
- Strong typing: Always use explicit, strong types. Avoid
anytypes (warnings acceptable for external APIs only) - Use
?for optional: Don't use| null | undefined, use optional properties (?) instead - Zod schemas: All tool parameters MUST have Zod schemas for runtime validation
- Type definitions: Prefer explicit
interfaceortypedefinitions overz.infer<typeof Schema> - Modules: ES2022 modules (
import/export) - Imports: Use
.jsextension for compiled output (TypeScript requirement)
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.
- yesterday First seen · 214 lines · 1,667 tokens per session scan A 3aac06893aca
main is a cursor rule published in the GitHub repository jamesjfoong/github-pr-review-mcp (1 stars, last pushed 6mo ago), licensed MIT. It adds 1,667 tokens to every session, about $0.0083 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
code-review-en
Code Review Guidelines (English).
project-context
Copilot – quick read, commands, and where to find more.
code-review
代码审查规范(中文版).
bugbot
Detailed technical reference for Bugbot (detection, markers, context, intent, autofix, do user request, permissions).
code-conventions
Copilot – coding conventions and where to change things.
cursorrules
See AGENTS.md — Cursor reads it natively.