Mirror Types
This skill mirrors specific token types (e.g., "mirror") to create variations and explore different narrative paths within your story.
Install on your platform
We auto-selected Claude Code based on this skill’s supported platforms.
Run in terminal (recommended)
claude mcp add mirror-types npx -- -y @trustedskills/mirror-types
Or manually add to ~/.claude/settings.json
{
"mcpServers": {
"mirror-types": {
"command": "npx",
"args": [
"-y",
"@trustedskills/mirror-types"
]
}
}
}Requires Claude Code (claude CLI). Run claude --version to verify your install.
About This Skill
What it does
The mirror-types skill allows AI agents to reflect TypeScript types, effectively creating new types based on existing ones. This is useful for generating more complex or specialized type definitions programmatically. It can also be used to create aliases and perform type transformations within a TypeScript project. The skill facilitates advanced type manipulation without manual coding.
When to use it
- Generating custom type guards: Create specific type checks based on existing types, improving code safety and clarity.
- Automating boilerplate type definitions: Reduce repetitive typing by programmatically generating type declarations from source data or other type information.
- Creating complex union or intersection types: Simplify the creation of intricate type combinations that would be cumbersome to write manually.
- Refactoring TypeScript codebases: Automate type changes across a project, ensuring consistency and reducing errors during large-scale refactorings.
Key capabilities
- Type reflection
- Type generation
- Type aliases
- Type transformations
Example prompts
- "Generate a new type based on
interface User { name: string; age: number; }but with the property 'age' optional." - "Create an alias for the type
type ApiResponse<T> = { data: T; status: number; }calledPaginatedResponsewhereTis always an array." - “Reflect the following type and output a summary of its properties:
interface Product { id: string, price: number, description?: string }”
Tips & gotchas
This skill requires a working TypeScript environment. The agent's understanding of TypeScript syntax and semantics will influence the quality of generated types; ensure it has sufficient context for accurate reflection.
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.