Borrowing it
Nothing to install: this file belongs to Hack23/European-Parliament-MCP-Server. 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/Hack23/European-Parliament-MCP-Server/main/.github/skills/typescript-strict-patterns/SKILL.mdgit clone --depth 1 https://github.com/Hack23/European-Parliament-MCP-ServerWrote 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/skills/hack23/european-parliament-mcp-server/typescript-strict-patterns)<a href="https://agentmods.dev/skills/hack23/european-parliament-mcp-server/typescript-strict-patterns"><img src="https://agentmods.dev/badge/skills/hack23/european-parliament-mcp-server/typescript-strict-patterns/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/skills/hack23/european-parliament-mcp-server/typescript-strict-patterns"><img src="https://agentmods.dev/badge/skills/hack23/european-parliament-mcp-server/typescript-strict-patterns.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector pass
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.00026 | $0.02523 |
| Opus 5 | $0.00013 | $0.01262 |
| Sonnet 5 | $0.00005 | $0.00505 |
| Haiku 4.5 | $0.00003 | $0.00252 |
Grade A, and why
typescript-strict-patterns 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 10d 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 — 361 lines — stays where its author put it; the contents beside it link to each section on GitHub.
TypeScript Strict Patterns Skill
Context
This skill applies when:
- Writing TypeScript code with strict mode enabled
- Defining types and interfaces for European Parliament data
- Creating branded types for IDs to prevent mixing
- Implementing discriminated unions for type-safe variants
- Converting Zod schemas to TypeScript types
- Using utility types (Pick, Omit, Partial, Required)
- Handling nullable types safely
- Implementing generic type patterns
- Ensuring type safety across API boundaries
TypeScript strict mode is enabled in this project with strictNullChecks, noImplicitAny, and noUncheckedIndexedAccess. All code must comply with these strict rules.
Rules
- Never Use
any: Useunknownfor truly dynamic types, then narrow with type guards - Always Define Return Types: Explicitly type all function return values
- Use Branded Types for IDs: Prevent mixing different ID types (MEP_ID vs DocumentID)
- Leverage
z.infer<>: Derive TypeScript types from Zod schemas - Handle Nulls Explicitly: Check for null/undefined before accessing properties
- Use Discriminated Unions: Type-safe variants with discriminator field
- Prefer
interfacefor Objects: Usetypefor unions, aliases, mapped types - Use Utility Types: Leverage Pick, Omit, Partial, Required, Record
- Type All Parameters: Never rely on implicit parameter types
- Use
as const: For literal types and readonly values
Examples
✅ Good Pattern: Branded Types
import { z } from 'zod';
// Branded type for MEP IDs (prevents mixing with other IDs)
const MEP_ID = z.number().int().positive().brand<'MEP_ID'>();
type MEP_ID = z.infer<typeof MEP_ID>;
// Branded type for Document IDs
const DocumentIDSchema = z.string()
.regex(/^EP-\d{8}-\d{5}$/)
.brand<'DocumentID'>();
type DocumentID = z.infer<typeof DocumentIDSchema>;
// Type safety: Can't mix IDs
function getMEP(id: MEP_ID): Promise<MEP> { /* ... */ }
function getDocument(id: DocumentID): Promise<Document> { /* ... */ }
const mepId: MEP_ID = MEP_ID.parse(12345);
const docId: DocumentID = DocumentIDSchema.parse('EP-20240101-00001');
await getMEP(mepId); // ✅ Works
await getDocument(docId); // ✅ Works
// await getMEP(docId); // ❌ Type error: DocumentID not assignable to MEP_ID
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.
- 10d ago First seen · 361 lines · 26 tokens per session scan A 91aa7e6d19fb
typescript-strict-patterns is a skill published in the GitHub repository Hack23/European-Parliament-MCP-Server (28 stars, last pushed yesterday), licensed Apache-2.0. It adds 26 tokens to every session and 2,523 once invoked, about $0.0001 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-30.
Other skills, from other repositories
scraperapi-nodejs-sdk
Best-practices reference for the ScraperAPI Node.js / JavaScript SDK (scraperapi-sdk npm package). Consult whenever the user is writing, debugging, or reviewing JavaScript or TypeScript code that calls ScraperAPI. Use when user asks: "scrape a website with Node.js and ScraperAPI", "ScraperAPI JavaScript example", "how…
api-errors
McpError constructor, JsonRpcErrorCode reference, and error handling patterns for @cyanheads/mcp-ts-core. Use when looking up error codes, understanding where errors should be thrown vs. caught, or using ErrorHandler.tryCatch in services.
api-errors
McpError constructor, JsonRpcErrorCode reference, and error handling patterns for @cyanheads/mcp-ts-core. Use when looking up error codes, understanding where errors should be thrown vs. caught, or using ErrorHandler.tryCatch in services.
trpc
// server/trpc.ts import { initTRPC, TRPCError } from '@trpc/server'; import { type Context } from './context'; import superjson from 'superjson'.
api-errors
McpError constructor, JsonRpcErrorCode reference, and error handling patterns for @cyanheads/mcp-ts-core. Use when looking up error codes, understanding where errors should be thrown vs. caught, or using ErrorHandler.tryCatch in services.
api-errors
McpError constructor, JsonRpcErrorCode reference, and error handling patterns for @cyanheads/mcp-ts-core. Use when looking up error codes, understanding where errors should be thrown vs. caught, or using ErrorHandler.tryCatch in services.