Skip to content
Back to skills

Typescript Best Practices

ASecurity

Apply disciplined TypeScript modeling and boundary parsing. Use when reading or editing TypeScript.

  • 2 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added October 1, 2026
ai-agentstypescriptexpressapi

Works with

  • api

Security analysis

A100/100

Scanned October 1, 2026

npx -y skills add TheOnlyFusionCube/potetos-for-everyone --skill typescript-best-practices --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Typescript Best Practices?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Typescript Best Practices
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/theonlyfusioncube-typescript-best-practices/badge)](https://www.skillsdirectory.com/skills/theonlyfusioncube-typescript-best-practices)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: typescript-best-practices
description: Apply disciplined TypeScript modeling and boundary parsing. Use when reading or editing TypeScript.
---
# TypeScript Best Practices

- Parse unknown external data at the boundary; keep `unknown` until validated.
- Prefer discriminated unions for mutually exclusive states and exhaustive handling for closed variants.
- Give domain meaning to primitives when accidental mixing would be costly.
- Avoid widening useful literal information and avoid `any` as an escape hatch.
- Let callers consume one coherent return shape instead of correlated optional fields.
- Use generics only when they express a real relationship between inputs and outputs.
- Keep async/error states explicit at the public boundary.
- Test behavior through exported APIs, not private helper choreography.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.