Type Design Performance
Helps with design, performance optimization as part of agent workflows workflows.
Install on your platform
We auto-selected Claude Code based on this skill’s supported platforms.
Run in terminal (recommended)
claude mcp add type-design-performance npx -- -y @trustedskills/type-design-performance
Or manually add to ~/.claude/settings.json
{
"mcpServers": {
"type-design-performance": {
"command": "npx",
"args": [
"-y",
"@trustedskills/type-design-performance"
]
}
}
}Requires Claude Code (claude CLI). Run claude --version to verify your install.
About This Skill
What it does
This skill provides guidance and best practices for designing types and APIs in .NET with a focus on performance optimization. It emphasizes principles like sealing classes, using readonly structs for value types, preferring static pure functions, deferring enumeration, and returning immutable collections. The goal is to help developers write more efficient and maintainable code by applying these design patterns.
When to use it
- When designing new types and APIs in .NET.
- During code reviews to identify potential performance bottlenecks related to type design.
- To determine whether a class, struct, or record is the most appropriate choice for a given scenario.
- While working with collections and enumerables to ensure efficient data handling.
Key capabilities
- Provides guidance on sealing classes to enable JIT devirtualization and communicate API intent.
- Recommends using
readonlystructs for small, immutable value types to prevent defensive copies. - Encourages the use of static pure functions for improved performance and testability.
- Suggests deferring enumeration until it's actually needed.
- Promotes returning immutable collections from API boundaries.
Example prompts
- "I'm designing a new data type in C#. What are some considerations for performance?"
- "Should I use a class or struct for this value object? What are the tradeoffs?"
- "How can I optimize the way I’m working with collections in my .NET application?"
Tips & gotchas
- This skill focuses specifically on type design and performance optimization within .NET. It is not a general coding assistant.
- Sealing classes communicates intent; be sure you understand the implications before doing so, as it prevents inheritance.
Tags
TrustedSkills Verification
Unlike other registries that point to live repositories, TrustedSkills pins every skill to a verified commit hash. This protects you from malicious updates — what you install today is exactly what was reviewed and verified.
Security Audits
| Gen Agent Trust Hub | Pass |
| Socket | Pass |
| Snyk | Pass |
🌐 Community
Passed automated security scans.