typescript

Enforce TypeScript strict mode, import ordering, and inference-driven typing.

Updated Apr 5, 2023
One-click install
npx skills add https://github.com/fcalell/dotfiles --skill typescript-fcalell
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: typescript
Source: https://github.com/fcalell/dotfiles/tree/main/dot_claude/skills/typescript
Command: npx skills add https://github.com/fcalell/dotfiles --skill typescript-fcalell

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

TypeScript projects often suffer from inconsistent typing, scattered import patterns, and lax safety due to mixed conventions. This skill provides a codified set of guidelines to enforce inference-driven types, organized imports, and strict mode across codebases.

Core Features & Use Cases

  • Inference-first typing: prefer schema-based type inference over manual type definitions to reduce drift.
  • Import organization: external → internal → relative to improve readability and maintenance.
  • Strict mode and safety: enable TypeScript strict settings and avoid any for robust guarantees.
  • Architectural guidelines: discourage barrel files and promote targeted type exports to preserve module boundaries.
  • Use case: apply to a medium-to-large TS project to standardize coding standards and accelerate onboarding.

Quick Start

Configure your TypeScript project to enable strict mode, rely on type inference, and organize imports.

Frequently Asked Questions about typescript

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

FAQPage Schema
How do I enforce strict TypeScript conventions and prevent inconsistent typing across my project?

Enforce strict TypeScript conventions by enabling strict mode, preferring schema-based type inference over manual definitions, and organizing imports consistently. This approach reduces type drift and improves safety across medium-to-large codebases.

What is the best way to organize TypeScript imports for better code readability?

Organize TypeScript imports by ordering them from external to internal to relative. This structured import organization improves readability and maintenance across modules, ensuring consistent import patterns throughout the project.

Why should I avoid barrel files in a TypeScript project?

Avoid barrel files in TypeScript to preserve module boundaries and promote targeted type exports. Discouraging barrel files prevents unnecessary module coupling and maintains a scalable code structure across your project.

How do I configure TypeScript strict mode and avoid using the any type?

Configure TypeScript strict mode in your project settings and prohibit the any type to ensure robust type guarantees. Relying on inference-driven types instead of any improves overall type safety and code reliability.

Can I apply these TypeScript coding standards to a large existing project?

Yes, you can apply these TypeScript coding standards to a medium-to-large existing project. Standardizing type inference, import organization, and strict mode accelerates onboarding and improves code consistency.