Typed Holes Refactor

🌐Community
by rand · vlatest · Repository

Automatically refactors code to replace generic type parameters with concrete types where possible.

Install on your platform

We auto-selected Claude Code based on this skill’s supported platforms.

1

Run in terminal (recommended)

terminal
claude mcp add typed-holes-refactor npx -- -y @trustedskills/typed-holes-refactor
2

Or manually add to ~/.claude/settings.json

~/.claude/settings.json
{
  "mcpServers": {
    "typed-holes-refactor": {
      "command": "npx",
      "args": [
        "-y",
        "@trustedskills/typed-holes-refactor"
      ]
    }
  }
}

Requires Claude Code (claude CLI). Run claude --version to verify your install.

About This Skill

What it does

The typed-holes-refactor skill refactors code to eliminate "typed holes," which are instances where type information is missing or incomplete, leading to potential errors. It analyzes existing code and automatically inserts appropriate type annotations based on context and usage. This improves code clarity, maintainability, and reduces the likelihood of runtime type errors.

When to use it

  • Legacy Codebases: Refactor older projects lacking comprehensive type annotations.
  • Complex Functions: Improve understanding and reduce errors in functions with intricate logic.
  • Collaborative Projects: Ensure consistent typing across a team's codebase.
  • Before Unit Testing: Type safety can catch issues before tests are even run.

Key capabilities

  • Automatic type annotation insertion
  • Analysis of code context for accurate typing
  • Support for various programming languages (implied, not explicitly stated)
  • Improved code clarity and maintainability

Example prompts

  • "Refactor this function to add missing type annotations: [code snippet]"
  • "Analyze this file and suggest type improvements: [file path]"
  • "Can you identify any typed holes in this module? [module name]"

Tips & gotchas

The skill's effectiveness relies on the quality of the existing code. While it automates much of the process, reviewing its suggestions is recommended to ensure accuracy and avoid unintended consequences.

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 HubPass
SocketPass
SnykPass

Details

Version
vlatest
License
Author
rand
Installs
26

🌐 Community

Passed automated security scans.