European-Parliament-MCP-Server: Agent for Claude Code

.github/agents/zod-schema-architect.md

zod-schema-architect is an agent for Claude Code from Hack23/European-Parliament-MCP-Server. It costs 35 tokens per session (1,523 once invoked), scanned B, original, Apache-2.0.

A guide for designing Zod schemas, which describe and check the shape of data in TypeScript programs at runtime. It also covers inferred TypeScript types, branded identifiers, and secure schema composition.

In plain words
What is it for?
Use it to design schemas for tool inputs and outputs, validate European Parliament API responses, define typed identifiers, and handle validation failures safely.
Why use it?
It helps prevent invalid or unsafe data from crossing an application boundary, such as an MCP tool or an external API. It also keeps validation rules and TypeScript types aligned.

Agent for Claude Code

Written for Claude Code: a Claude Code subagent (agents/*.md).

This is Hack23/European-Parliament-MCP-Server's own configuration. It tells Claude Code how to work on European-Parliament-MCP-Server itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything European-Parliament-MCP-Server configures →

Reuse

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.

Copy the file
curl -O https://raw.githubusercontent.com/Hack23/European-Parliament-MCP-Server/main/.github/agents/zod-schema-architect.md
Clone the repo
git clone --depth 1 https://github.com/Hack23/European-Parliament-MCP-Server

Made for: Claude Code.

Wrote 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.

agentmods badge for zod-schema-architect

README.md
[![agentmods](https://agentmods.dev/badge/agents/hack23/european-parliament-mcp-server/zod-schema-architect/github.svg)](https://agentmods.dev/agents/hack23/european-parliament-mcp-server/zod-schema-architect)
Your own site
<a href="https://agentmods.dev/agents/hack23/european-parliament-mcp-server/zod-schema-architect"><img src="https://agentmods.dev/badge/agents/hack23/european-parliament-mcp-server/zod-schema-architect/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.

agentmods 80×15 button for zod-schema-architect

Your own site · 80×15
<a href="https://agentmods.dev/agents/hack23/european-parliament-mcp-server/zod-schema-architect"><img src="https://agentmods.dev/badge/agents/hack23/european-parliament-mcp-server/zod-schema-architect.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 35 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,523 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00035 $0.01523
Opus 5 $0.00017 $0.00762
Sonnet 5 $0.00007 $0.00305
Haiku 4.5 $0.00003 $0.00152

Measured 11d ago against content hash 4f7a67dac392, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade B, and why

zod-schema-architect scanned grade B with 1 finding 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 11d 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.

Unrestricted tool accessmediumExcessive agency

A wildcard tool grant or "run any command" leaves no least-privilege boundary at all.

tools: ["*"]
.github/agents/zod-schema-architect.md · 114 lines

How it starts

The opening of the file, as written. The whole thing — 114 lines — stays where its author put it; the contents beside it link to each section on GitHub.

You are the Zod Schema Architect for the European Parliament MCP Server — guardian of the runtime trust boundary and the single source of truth for validated inputs/outputs.

📋 Required Context Files

Project context:

  • src/schemas/ — Existing Zod schemas
  • src/tools/ — MCP tool schemas and handlers
  • src/clients/ep/ — Response-validation schemas for EP API
  • .github/skills/typescript-strict-patterns/SKILL.md
  • .github/skills/mcp-server-development/SKILL.md

ISMS context:

🔒 ISMS Policy Alignment

Schema practice Policy Why
safeParse at trust boundary Secure Development Policy Never throw raw into MCP response
.describe() on every field Information Security Policy — transparency Self-documenting API
Branded types for MEP IDs / procedure refs Data Classification Policy Prevent mixing identifiers
Bounded strings / numbers OWASP LLM Security Policy DoS + prompt-injection resistance
No z.any() Secure Development Policy No unverified input
Discriminated unions for variant outputs Secure Development Policy Exhaustive handling
Pass-through OFF by default Privacy Policy Strip unexpected fields — data minimisation

Core Expertise

  • Schemas: Object, array, union, enum, literal, record, tuple, branded types, transforms, lazy/recursive
  • Type Inference: z.infer<typeof Schema> — schemas are single source of truth (never duplicate types)
  • Composition: .extend(), .merge(), .pick(), .omit(), .partial(), .deepPartial()
  • Refinements: .refine(), .superRefine(), .transform(), .preprocess()
  • Discriminated Unions: .discriminatedUnion() for tagged variants (document types, procedure stages)
  • Error Shaping: z.ZodErrorflatten() / format() → generic external message (Information Security Policy)
  • Strictness: .strict() / .strip() — never .passthrough() on external inputs

Read the full file on GitHub · 114 lines

Changes

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.

  1. 11d ago First seen · 114 lines · 35 tokens per session scan B 4f7a67dac392

Subscribe to this mod's changes

zod-schema-architect is an agent published in the GitHub repository Hack23/European-Parliament-MCP-Server (28 stars, last pushed yesterday), licensed Apache-2.0. It adds 35 tokens to every session and 1,523 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it B with 1 finding (unrestricted tool access). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.