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

.github/skills/performance-optimization/SKILL.md

performance-optimization is a skill for Claude Code, Codex from Hack23/European-Parliament-MCP-Server. It costs 27 tokens per session (5,336 once invoked), scanned A, original, Apache-2.0.

Guidance for measuring and improving the speed, memory use, startup time, and request handling of Node.js and TypeScript services.

In plain words
What is it for?
Use it when optimizing MCP tool handlers, European Parliament API calls, caching, database queries, asynchronous code, concurrent work, or memory usage.
Why use it?
It helps locate slow or wasteful code before changing it, especially when a service fetches external data, handles many requests, or processes large datasets.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

This is Hack23/European-Parliament-MCP-Server's own configuration. It tells Claude Code and Codex 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/skills/performance-optimization/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/Hack23/European-Parliament-MCP-Server

Made for: Claude Code, Codex.

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 performance-optimization

README.md
[![agentmods](https://agentmods.dev/badge/skills/hack23/european-parliament-mcp-server/performance-optimization.svg)](https://agentmods.dev/skills/hack23/european-parliament-mcp-server/performance-optimization)
Your own site
<a href="https://agentmods.dev/skills/hack23/european-parliament-mcp-server/performance-optimization"><img src="https://agentmods.dev/badge/skills/hack23/european-parliament-mcp-server/performance-optimization.svg" alt="Measured on agentmods" height="20"></a>
Per session 27 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 5,336 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.00027 $0.05336
Opus 5 $0.00014 $0.02668
Sonnet 5 $0.00005 $0.01067
Haiku 4.5 $0.00003 $0.00534

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

Security

Grade A, and why

performance-optimization 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 8d 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.

.github/skills/performance-optimization/SKILL.md · 726 lines

How it starts

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

Performance Optimization Skill

Context

This skill applies when:

  • Implementing MCP protocol handlers and tool endpoints
  • Fetching data from European Parliament APIs
  • Processing large datasets or document collections
  • Designing caching strategies for API responses
  • Optimizing database queries or data transformations
  • Profiling and measuring performance bottlenecks
  • Writing async/await code or Promise chains
  • Handling concurrent requests or batch operations
  • Reducing memory allocations and garbage collection pressure
  • Optimizing startup time and initialization

Performance is critical for MCP servers as they power real-time AI interactions. Response times should be < 500ms, memory usage should be stable, and throughput should handle 100+ requests per 15-minute window.

Rules

  1. Measure Before Optimizing: Always profile and measure performance before making changes - no premature optimization
  2. Set Performance Budgets: API responses < 500ms, memory growth < 10MB per hour, startup time < 2s
  3. Cache Aggressively: Cache European Parliament API responses with appropriate TTL (5-60 minutes)
  4. Use Async/Await Properly: Avoid blocking the event loop - use async for I/O, sync for CPU-bound work
  5. Minimize Allocations: Reuse objects, use object pools, avoid creating unnecessary intermediate arrays
  6. Batch Operations: Group multiple API calls or database queries when possible
  7. Lazy Load: Defer loading of non-critical resources until needed
  8. Stream Large Data: Use Node.js streams for processing large documents or datasets
  9. Optimize Serialization: Minimize JSON parsing overhead, consider caching parsed results
  10. Index Data Structures: Use Maps/Sets for O(1) lookups instead of O(n) array searches
  11. Avoid Memory Leaks: Clear timers, remove event listeners, close connections properly
  12. Monitor Performance: Implement performance logging and alerting for regression detection
  13. Compress Responses: Use gzip/brotli for MCP responses when size exceeds 1KB
  14. Debounce/Throttle: Rate limit expensive operations like API calls or searches
  15. Use Worker Threads: Offload CPU-intensive work (parsing, transformation) to worker threads

Read the full file on GitHub · 726 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. 8d ago First seen · 726 lines · 27 tokens per session scan A bca551331044

Subscribe to this mod's changes

performance-optimization is a skill published in the GitHub repository Hack23/European-Parliament-MCP-Server (28 stars, last pushed yesterday), licensed Apache-2.0. It adds 27 tokens to every session and 5,336 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.

Related

Other skills, from other repositories

orchardcore-diagnostics

Skill for configuring Orchard Core diagnostics error handling. Covers custom error pages, status code pages, DiagnosticsStartupFilter, IConfigureOptions integration, error shapes, alternate shape names, and production exception handling. Use this skill when requests mention Orchard Core Diagnostics, custom error page…

CrestApps/CrestApps.AgentSkills · 157 tokens

diagnose-connectivity

Work out why a 3x-ui client cannot connect, in the order that finds the cause fastest — scope the outage, check the core, the inbound, the client's own limits, routing and outbounds, then the node. Use whenever someone reports "it stopped working", a client cannot connect, a site is unreachable through the proxy, or…

pyworkload/3x-ui-mcp · 83 tokens

dev-tasks

Guides for common development tasks like adding facet fields, file format support, STDIO debugging, and performance tuning. Use when working on specific development recipes.

mirkosertic/MCPLuceneServer · 35 tokens

keycloak-migration-doctor

Preflight a Keycloak export, import or migration on a Skycloak-managed cluster against the known blockers, and diagnose a job that already failed by reading the failure reason the API records but the dashboard notice does not show. Use when an export or import fails, a migration stalls, or before moving realm data in…

sky-cloak/skycloak-mcp · 72 tokens

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.

cyanheads/mcp-ts-core · 54 tokens

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.

cyanheads/workflows-mcp-server · 54 tokens