typescript

Enforces TypeScript and JavaScript coding standards for type-safe, maintainable code.

Updated Jul 29, 2026
One-click install
npx skills add https://github.com/MaiconGambini/opencode-harness-guide --skill typescript-maicongambini
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: typescript
Source: https://github.com/MaiconGambini/opencode-harness-guide/tree/main/skills/typescript
Command: npx skills add https://github.com/MaiconGambini/opencode-harness-guide --skill typescript-maicongambini

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Inconsistent TypeScript and JavaScript codebases accumulate type-safety holes, unclear naming, and structural debt that slow down reviews and cause runtime bugs. This Skill provides a concrete set of coding standards so generated or reviewed code stays strict, readable, and maintainable. ## Core Features & Use Cases - Type Safety Rules: Enforces strict TypeScript, bans any and as casting, and promotes end-to-end type-safety from API to database to UI. - Code Structure Guidelines: Mandates named exports, async/await over promise chains, types over interfaces, and early returns for flat code. - Naming & Clarity Conventions: Defines naming patterns (SNAKE_CAPS constants, camelCase functions, kebab-case files) and bans abbreviations, magic values, and redundant suffixes. - Use Case: When asking an AI to write a new API endpoint or refactor a module, apply these standards so the output uses query builders instead of raw SQL, avoids default exports, and keeps types close to usage. ## Quick Start Apply the typescript skill standards when writing or reviewing this TypeScript module to ensure strict typing and clean structure.

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 coding standards in a project?

Enable strict mode in tsconfig and apply rules that ban any types and as casting, prefer types over interfaces, and let the compiler infer response types. Combine with pre-commit hooks for linting and dead code removal.

What naming conventions should TypeScript projects follow?

Use SNAKE_CAPS for constants, camelCase for functions, and kebab-case for file names. Avoid abbreviations, redundant names like userList, and suffixes such as Manager or Helper unless essential.

Should I use types or interfaces in TypeScript?

Prefer types over interfaces and keep them close to where they are used. Types offer more flexibility for unions and computed shapes, and co-locating them improves readability and maintainability.

Why avoid raw SQL in TypeScript applications?

Raw SQL bypasses type checking and opens the door to injection vulnerabilities. Query builders provide end-to-end type-safety from database to UI and protect against injection by parameterizing inputs.

When should default exports be avoided in TypeScript?

Always prefer named exports and avoid default exports unless a framework requires them. Named exports make imports explicit, improve refactoring safety, and prevent inconsistent naming across files.