Typescript Clean Code
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.
Run in terminal (recommended)
claude mcp add typescript-clean-code npx -- -y @trustedskills/typescript-clean-code
Or manually add to ~/.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.mdworkflow. - Reviewing pull requests with the
workflows/pr-review/workflow.mdworkflow. - Implementing test-driven development (TDD) following the
workflows/tdd.mdworkflow. - Safely refactoring code using the
workflows/refactoring/workflow.mdworkflow. - Developing new functionality with the
workflows/new-feature.mdworkflow.
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 Hub | Pass |
| Socket | Pass |
| Snyk | Pass |
🌐 Community
Passed automated security scans.