Borrowing it
Nothing to install: this file belongs to jamesjfoong/github-pr-review-mcp. 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/jamesjfoong/github-pr-review-mcp/main/.cursor/agents/type-safety.mdgit 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/agents/jamesjfoong/github-pr-review-mcp/type-safety)<a href="https://agentmods.dev/agents/jamesjfoong/github-pr-review-mcp/type-safety"><img src="https://agentmods.dev/badge/agents/jamesjfoong/github-pr-review-mcp/type-safety/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/agents/jamesjfoong/github-pr-review-mcp/type-safety"><img src="https://agentmods.dev/badge/agents/jamesjfoong/github-pr-review-mcp/type-safety.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.00027 | $0.00346 |
| Opus 5.5 | $0.00011 | $0.00138 |
| Sonnet 5.5 | $0.00005 | $0.00069 |
| Haiku 4.5 | $0.00003 | $0.00035 |
Grade A, and why
type-safety 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
Type Safety Agent
Purpose: Ensures type safety and proper TypeScript usage throughout the codebase.
Responsibilities
- Verify all tool parameters have Zod schemas
- Prefer explicit
interfaceortypedefinitions overz.infer<typeof Schema> - Check for proper type definitions (no
anyunless necessary) - Use
?for optional properties (don't use| null | undefined) - Use optional chaining (
?.) when accessing values - Verify all exports have proper types
When to Use
When adding new features, modifying types, or fixing type errors.
Key Rules
- All parameters must have Zod schemas in
src/types.ts - Use explicit type definitions alongside Zod schemas
- Avoid
any- useunknownif type is truly unknown - Prefer
?over| undefinedfor optional fields - Use
| nullwhen external APIs can return null - Strong typing: Always use explicit, strong types
Examples
// CORRECT - Explicit type definition with Zod schema
export const PRParamsSchema = z.object({
owner: z.string(),
repo: z.string(),
prNumber: z.number(),
});
export interface PRParams {
owner: string;
repo: string;
prNumber: number;
}
// CORRECT - Use optional property
interface GoodType {
value?: string;
}
// CORRECT - Use optional chaining when accessing
const result = obj?.value ?? "default";
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 · 56 lines · 27 tokens per session scan A 5d206fec897b
type-safety is an agent published in the GitHub repository jamesjfoong/github-pr-review-mcp (1 stars, last pushed 9mo ago), licensed MIT. It adds 27 tokens to every session and 346 once invoked, about $0.0001 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.
type-safety compared with agents from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| type-safetyjamesjfoong/github-pr-review-mcp | Agent | 1 | 9mo ago | MIT | A | 27 | Claude Code, Cursor |
| Typescript ProTheSethRose/Copilot-Skills | Agent | 3 | 11mo ago | MIT | A | 41 | Claude Code |
| frontend-devvibeeval/vibecosystem | Agent | 539 | 2d ago | MIT | A | 22 | Claude Code |
| frontend-engineerjpoley/flowspec | Agent | 50 | 28d ago | Apache-2.0 | A | 24 | Claude Code |
| effect-architecture-reviewerbengous/claude-code-plugins | Agent | 6 | yesterday | MIT | A | 50 | Claude Code |
| typescript-code-revieweroikon48/claudecode-book | Agent | 24 | 2mo ago | MIT | A | 157 | Claude Code |
| fastmcp-ts-expertjpoutrin/product-forge | Agent | 16 | 8mo ago | MIT | A | 26 | Claude Code |