Typescript Clean Code

🌐Community
by bmad-labs · vlatest · Repository

Refactors TypeScript code to adhere to clean coding principles, improving readability, maintainability, and reducing technical debt.

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 typescript-clean-code npx -- -y @trustedskills/typescript-clean-code
2

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

~/.claude/settings.json
{
  "mcpServers": {
    "typescript-clean-code": {
      "command": "npx",
      "args": [
        "-y",
        "@trustedskills/typescript-clean-code"
      ]
    }
  }
}

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

About This Skill

What it does

This skill refactors TypeScript code to adhere to clean coding principles, improving readability, maintainability, and reducing technical debt. It leverages curated knowledge from Robert C. Martin's books, adapted specifically for TypeScript development. The skill prioritizes referencing pre-defined rules and examples over general knowledge, ensuring consistent application of best practices.

When to use it

  • Reviewing code for quality using the workflows/code-review/workflow.md workflow.
  • Reviewing pull requests with the workflows/pr-review/workflow.md workflow.
  • Implementing test-driven development (TDD) following the workflows/tdd.md workflow.
  • Safely refactoring code using the workflows/refactoring/workflow.md workflow.
  • Developing new functionality with the workflows/new-feature.md workflow.

Key capabilities

  • Reference-First Approach: Prioritizes and applies curated TypeScript clean code rules from reference files (rules.md, examples.md).
  • Workflow Execution: Guides users through step-by-step workflows for common tasks like code review, refactoring, and TDD.
  • Step-File Architecture: Utilizes a structured approach where each workflow loads specific "step" files to ensure context-safe execution.
  • Rule Citation: Provides references to the exact rules being applied (e.g., "per references/functions/rules.md Rule 1").
  • Example Usage: Favors using pre-defined code examples from reference files over generating new ones.

Example prompts

  • "Review this TypeScript code for quality, following the clean code principles."
  • "Can you help me refactor this function to adhere to clean coding standards?"
  • "Walk me through a test-driven development cycle for this new feature."

Tips & gotchas

  • Always load references: The skill's recommendations are based on specific TypeScript adaptations found in the reference files; don’t rely solely on general knowledge.
  • Follow workflows step-by-step: Each workflow guides you through a process, always referencing necessary files at each stage.
  • Reference files override general knowledge: If your understanding of clean code differs from what's stated in the reference files, defer to the references.

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
bmad-labs
Installs
50

🌐 Community

Passed automated security scans.