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.
git clone --depth 1 https://github.com/jamesjfoong/github-pr-review-mcpWrote 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/jamesjfoong/github-pr-review-mcp/main)<a href="https://agentmods.dev/rules/jamesjfoong/github-pr-review-mcp/main"><img src="https://agentmods.dev/badge/rules/jamesjfoong/github-pr-review-mcp/main/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/jamesjfoong/github-pr-review-mcp/main"><img src="https://agentmods.dev/badge/rules/jamesjfoong/github-pr-review-mcp/main.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.01667 | $0.01667 |
| Opus 5.5 | $0.00667 | $0.00667 |
| Sonnet 5.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 1mo 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 — 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.
- 1mo ago 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 8mo ago), licensed MIT. It adds 1,667 tokens to every session, about $0.0067 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.
Other cursor rules, from other repositories
project-context
Current repository context, commands, and documentation authority.
code-conventions
Current TypeScript and contract-change conventions.
task-summary
Enforce Summary and Session Log blocks on every coding response when session tracking is enabled.
api-steps
How to create HTTP endpoints in Motia.
virtual-steps
Connecting nodes virtually and creating a smooth flow in Workbench.
ponytail
Ponytail, lazy senior dev mode. Always pick the simplest solution that works.