typescript-clean-code-cookbook

Apply clean-code guidelines to TypeScript projects for writing, reviewing, and refactoring code.

2|Updated Dec 10, 2025
One-click install
npx skills add https://github.com/cressie176/cressie176-claude-marketplace --skill typescript-clean-code-cookbook
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: typescript-clean-code-cookbook
Source: https://github.com/cressie176/cressie176-claude-marketplace/tree/main/plugins/typescript-clean-code-cookbook/skills/typescript-clean-code-cookbook
Command: npx skills add https://github.com/cressie176/cressie176-claude-marketplace --skill typescript-clean-code-cookbook

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

TypeScript code often spirals into complexity without clear guidelines. This skill provides a structured set of clean-code principles to improve readability, maintainability, and reliability of TS code.

Core Features & Use Cases

  • Apply naming conventions that reveal intent and reduce ambiguity across variables, functions, and classes.
  • Enforce explicit types and avoid any to maintain strong type safety and easier refactoring.
  • Design small, focused functions with single responsibilities and guard clauses to prevent hidden side effects.
  • Use consistent error handling and clear failure modes during development and reviews.
  • Use as a reference during code reviews or onboarding to raise coding standards.

Quick Start

Start by applying descriptive names, explicit types, small focused functions, and clear error handling to keep TypeScript code readable and maintainable.

Frequently Asked Questions about typescript-clean-code-cookbook

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
What are the best practices for writing clean and maintainable TypeScript code?

Clean TypeScript code requires explicit types, descriptive naming conventions, small focused functions with single responsibilities, guard clauses, and consistent error handling to ensure readability and maintainability.

How do I enforce type safety and avoid 'any' when refactoring TypeScript?

Enforce type safety in TypeScript refactoring by requiring explicit types and avoiding 'any' entirely. This maintains strong type checking, reduces ambiguity, and makes your codebase significantly easier to refactor safely.

How do I design small focused functions with guard clauses in TypeScript?

Design small TypeScript functions by assigning each a single responsibility and leading with guard clauses. This structure prevents hidden side effects, clarifies execution paths, and improves overall code readability.

Can I use these clean-code guidelines for TypeScript code reviews?

Yes, you can apply these TypeScript clean-code guidelines during code reviews and onboarding. They serve as a structured reference to enforce explicit types, naming conventions, and clear error handling across your team.

What naming conventions should I follow to reduce ambiguity in TypeScript?

Use descriptive naming conventions for TypeScript variables, functions, and classes to reveal intent and reduce ambiguity. Clear names act as inline documentation, making the code easier to understand during development and reviews.

Why should I use consistent error handling and clear failure modes in TypeScript?

Consistent error handling and clear failure modes in TypeScript prevent unexpected crashes during development. Establishing predictable failure paths makes debugging easier and raises the overall reliability of your codebase.